snews-data-formats


Namesnews-data-formats JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/SNEWS2/snews-data-formats
SummaryA unified collection of SNEWS data, models, and schema
upload_time2024-08-19 18:21:24
maintainerJustin Vasel
docs_urlNone
authorSNEWS Collaboration
requires_python<3.13,>=3.9
licenseBSD 3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SNEWS Data Formats

This package contains common data models and utilities for standardizing data formats across SNEWS packages.

## Features

- Data models for key SNEWS data types like messages and timestamps with validation via Pydantic
- Message models for different tiers like heartbeat, retraction, timing, significance, and coincidence
- Utilities for handling nanosecond timestamps and leap seconds
- Static data for supported detectors
- Generation of JSON schemas for data models
- Comprehensive testing suite

## Getting Started

If you don't have [poetry](https://python-poetry.org/docs/#installing-with-the-official-installer), install that first.

Install the package:
```bash
poetry install
```

Use it in your code:
```python
from snews.models.messages import SignificanceTierMessage

message = SignificanceTierMessage(
    detector_name="Super-K",
    p_values: [0.43, 0.32, 0.01],
    t_bin_width_sec: 5e-3
)

print(message.model_dump())
```

See the [documentation](docs/index.md) for more details on the available data models and utilities.

See `snews/examples` for ipython notebooks.

## Contributing
Contributions are welcome!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SNEWS2/snews-data-formats",
    "name": "snews-data-formats",
    "maintainer": "Justin Vasel",
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": "justin.vasel@gmail.com",
    "keywords": null,
    "author": "SNEWS Collaboration",
    "author_email": "snews2.0@lists.bnl.gov",
    "download_url": "https://files.pythonhosted.org/packages/e5/06/8c2faa53b82cc851844bd1afb521bd03d559395b3c2640db875749deb9b7/snews_data_formats-1.0.0.tar.gz",
    "platform": null,
    "description": "# SNEWS Data Formats\n\nThis package contains common data models and utilities for standardizing data formats across SNEWS packages.\n\n## Features\n\n- Data models for key SNEWS data types like messages and timestamps with validation via Pydantic\n- Message models for different tiers like heartbeat, retraction, timing, significance, and coincidence\n- Utilities for handling nanosecond timestamps and leap seconds\n- Static data for supported detectors\n- Generation of JSON schemas for data models\n- Comprehensive testing suite\n\n## Getting Started\n\nIf you don't have [poetry](https://python-poetry.org/docs/#installing-with-the-official-installer), install that first.\n\nInstall the package:\n```bash\npoetry install\n```\n\nUse it in your code:\n```python\nfrom snews.models.messages import SignificanceTierMessage\n\nmessage = SignificanceTierMessage(\n    detector_name=\"Super-K\",\n    p_values: [0.43, 0.32, 0.01],\n    t_bin_width_sec: 5e-3\n)\n\nprint(message.model_dump())\n```\n\nSee the [documentation](docs/index.md) for more details on the available data models and utilities.\n\nSee `snews/examples` for ipython notebooks.\n\n## Contributing\nContributions are welcome!\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause",
    "summary": "A unified collection of SNEWS data, models, and schema",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/SNEWS2/snews-data-formats",
        "Repository": "https://github.com/SNEWS2/snews-data-formats"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ab960f3075007e1c4e1186cbe842745bf4735846261f33f6ad7a674909b7d94",
                "md5": "5ac36f198f8920e576909239d6cb9452",
                "sha256": "fcf057cda7ccd3465d80967082484cf490c33e88e39bce80816b67ff56d83bc3"
            },
            "downloads": -1,
            "filename": "snews_data_formats-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ac36f198f8920e576909239d6cb9452",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 39374,
            "upload_time": "2024-08-19T18:21:23",
            "upload_time_iso_8601": "2024-08-19T18:21:23.197001Z",
            "url": "https://files.pythonhosted.org/packages/1a/b9/60f3075007e1c4e1186cbe842745bf4735846261f33f6ad7a674909b7d94/snews_data_formats-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e5068c2faa53b82cc851844bd1afb521bd03d559395b3c2640db875749deb9b7",
                "md5": "bfa6f2377fdd2e49e870296d4d09fff0",
                "sha256": "b4329635b4d9350cc045c324983971a839eeb4828c6e9aaf8ef42bfe8b35c367"
            },
            "downloads": -1,
            "filename": "snews_data_formats-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bfa6f2377fdd2e49e870296d4d09fff0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 43813,
            "upload_time": "2024-08-19T18:21:24",
            "upload_time_iso_8601": "2024-08-19T18:21:24.620976Z",
            "url": "https://files.pythonhosted.org/packages/e5/06/8c2faa53b82cc851844bd1afb521bd03d559395b3c2640db875749deb9b7/snews_data_formats-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-19 18:21:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SNEWS2",
    "github_project": "snews-data-formats",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "snews-data-formats"
}
        
Elapsed time: 1.05453s