# csv2bufr
The csv2bufr Python module contains both a command line interface and an API to convert data stored in a CSV file to the WMO BUFR data format.
More information on the BUFR format can be found in the [WMO Manual on Codes, Volume I.2](https://library.wmo.int/doc_num.php?explnum_id=10722).
## Installation
### Requirements
- Python 3 and above
- [ecCodes](https://confluence.ecmwf.int/display/ECC)
### Dependencies
Dependencies are listed in [requirements.txt](https://github.com/wmo-im/csv2bufr/blob/main/requirements.txt). Dependencies are automatically installed during csv2bufr installation.
```bash
docker pull wmoim/csv2bufr
```
## Running
Transform data from file ``<my-csv-file.csv>`` for station ``<wigos_station_identifier>`` to BUFR using template
specified in file ``<csv-to-bufr-mapping.json>`` and with station metadata file the file ``<metadata-file.csv>``.
Write output to ``<output-directory-path>``.
```bash
csv2bufr data transform <my-csv-file.csv> \
<wigos_station_identifier> \
--station-metadata <metadata-file.csv> \
--bufr-template <csv-to-bufr-mapping.json> \
--output <output-directory-path>
```
## Releasing
```bash
# create release (x.y.z is the release version)
vi csv2bufr/__init__.py # update __version__
git commit -am 'update release version vx.y.z'
git push origin main
git tag -a vx.y.z -m 'tagging release version vx.y.z'
git push --tags
# upload to PyPI
rm -fr build dist *.egg-info
python setup.py sdist bdist_wheel --universal
twine upload dist/*
# publish release on GitHub (https://github.com/wmo-im/csv2bufr/releases/new)
# bump version back to dev
vi csv2bufr/__init__.py # update __version__
git commit -am 'back to dev'
git push origin main
```
## Documentation
The full documentation for csv2bufr can be found at [https://csv2bufr.readthedocs.io](https://csv2bufr.readthedocs.io), including sample files.
### Code Conventions
* [PEP8](https://www.python.org/dev/peps/pep-0008)
### Bugs and Issues
All bugs, enhancements and issues are managed on [GitHub](https://github.com/wmo-im/csv2bufr/issues).
## Contact
* [David Berry](https://github.com/david-i-berry)
Raw data
{
"_id": null,
"home_page": "https://github.com/wmo-im/csv2bufr",
"name": "csv2bufr",
"maintainer": "David I. Berry",
"docs_url": null,
"requires_python": null,
"maintainer_email": "DBerry@wmo.int",
"keywords": "WMO BUFR csv encoding weather observations",
"author": "David I. Berry",
"author_email": "DBerry@wmo.int",
"download_url": "https://files.pythonhosted.org/packages/1d/46/a0d4b81c3ea2089d5d165ac5c2374cf163fb46ba62f88662598663ca027b/csv2bufr-0.8.5.tar.gz",
"platform": "all",
"description": "# csv2bufr\n\nThe csv2bufr Python module contains both a command line interface and an API to convert data stored in a CSV file to the WMO BUFR data format.\nMore information on the BUFR format can be found in the [WMO Manual on Codes, Volume I.2](https://library.wmo.int/doc_num.php?explnum_id=10722).\n\n## Installation\n\n### Requirements\n- Python 3 and above\n- [ecCodes](https://confluence.ecmwf.int/display/ECC)\n\n### Dependencies\n\nDependencies are listed in [requirements.txt](https://github.com/wmo-im/csv2bufr/blob/main/requirements.txt). Dependencies are automatically installed during csv2bufr installation.\n\n```bash\ndocker pull wmoim/csv2bufr\n```\n\n## Running\n\nTransform data from file ``<my-csv-file.csv>`` for station ``<wigos_station_identifier>`` to BUFR using template \nspecified in file ``<csv-to-bufr-mapping.json>`` and with station metadata file the file ``<metadata-file.csv>``. \nWrite output to ``<output-directory-path>``.\n\n```bash\ncsv2bufr data transform <my-csv-file.csv> \\\n <wigos_station_identifier> \\\n --station-metadata <metadata-file.csv> \\\n --bufr-template <csv-to-bufr-mapping.json> \\\n --output <output-directory-path>\n```\n\n## Releasing\n\n```bash\n# create release (x.y.z is the release version)\nvi csv2bufr/__init__.py # update __version__\ngit commit -am 'update release version vx.y.z'\ngit push origin main\ngit tag -a vx.y.z -m 'tagging release version vx.y.z'\ngit push --tags\n\n# upload to PyPI\nrm -fr build dist *.egg-info\npython setup.py sdist bdist_wheel --universal\ntwine upload dist/*\n\n# publish release on GitHub (https://github.com/wmo-im/csv2bufr/releases/new)\n\n# bump version back to dev\nvi csv2bufr/__init__.py # update __version__\ngit commit -am 'back to dev'\ngit push origin main\n```\n## Documentation\n\nThe full documentation for csv2bufr can be found at [https://csv2bufr.readthedocs.io](https://csv2bufr.readthedocs.io), including sample files.\n\n### Code Conventions\n\n* [PEP8](https://www.python.org/dev/peps/pep-0008)\n\n### Bugs and Issues\n\nAll bugs, enhancements and issues are managed on [GitHub](https://github.com/wmo-im/csv2bufr/issues).\n\n## Contact\n\n* [David Berry](https://github.com/david-i-berry)\n",
"bugtrack_url": null,
"license": "Apache Software License",
"summary": "Configurable module to convert data from CSV to WMO BUFR format",
"version": "0.8.5",
"project_urls": {
"Homepage": "https://github.com/wmo-im/csv2bufr"
},
"split_keywords": [
"wmo",
"bufr",
"csv",
"encoding",
"weather",
"observations"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "543c656be26d89a3cad8c112bd7ce2656722b968860b656466b6083736814095",
"md5": "4dfbd07b6f8138986be03e621ba0a01b",
"sha256": "21c7ba2e5eebd1d7d3a4bc0a4f8b706a5d27335d6d59bcd0a9f14d5e65458fa9"
},
"downloads": -1,
"filename": "csv2bufr-0.8.5-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "4dfbd07b6f8138986be03e621ba0a01b",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 24293,
"upload_time": "2025-01-09T12:36:14",
"upload_time_iso_8601": "2025-01-09T12:36:14.475779Z",
"url": "https://files.pythonhosted.org/packages/54/3c/656be26d89a3cad8c112bd7ce2656722b968860b656466b6083736814095/csv2bufr-0.8.5-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1d46a0d4b81c3ea2089d5d165ac5c2374cf163fb46ba62f88662598663ca027b",
"md5": "f9806c8b75e02951467ca7cf9baf4503",
"sha256": "2bc6c0f90df0bfa49072695b17e38a6c468720cfcccd14c752598ed219a077c5"
},
"downloads": -1,
"filename": "csv2bufr-0.8.5.tar.gz",
"has_sig": false,
"md5_digest": "f9806c8b75e02951467ca7cf9baf4503",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25880,
"upload_time": "2025-01-09T12:36:16",
"upload_time_iso_8601": "2025-01-09T12:36:16.989685Z",
"url": "https://files.pythonhosted.org/packages/1d/46/a0d4b81c3ea2089d5d165ac5c2374cf163fb46ba62f88662598663ca027b/csv2bufr-0.8.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-09 12:36:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wmo-im",
"github_project": "csv2bufr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "click",
"specs": []
},
{
"name": "eccodes",
"specs": []
},
{
"name": "jsonschema",
"specs": []
}
],
"lcname": "csv2bufr"
}