{"id":15912332,"url":"https://github.com/cdeil/gammapy-config","last_synced_at":"2025-04-03T02:27:44.175Z","repository":{"id":137887148,"uuid":"222747096","full_name":"cdeil/gammapy-config","owner":"cdeil","description":"Explore config handling options for Gammapy","archived":false,"fork":false,"pushed_at":"2019-11-21T10:09:19.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T16:41:30.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdeil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-19T17:03:35.000Z","updated_at":"2019-11-21T10:09:21.000Z","dependencies_parsed_at":"2023-04-28T02:47:23.838Z","dependency_job_id":null,"html_url":"https://github.com/cdeil/gammapy-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Fgammapy-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Fgammapy-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Fgammapy-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Fgammapy-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdeil","download_url":"https://codeload.github.com/cdeil/gammapy-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246924260,"owners_count":20855697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T16:04:03.952Z","updated_at":"2025-04-03T02:27:44.154Z","avatar_url":"https://github.com/cdeil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gammapy-config\n\n- Explore config handling options for Gammapy.\n- José Enrique Ruiz \u0026 Christoph Deil\n- Nov 19, 2019\n\n## What is this?\n\nOur goal is to make a decision how to do config handling\nfor the Analysis class in Gammapy. Our goal is not to\nfind the solution for models, that might or might not\nbe the same.\n\nSee https://github.com/gammapy/gammapy/issues/401\n\n## Conclusion\n\n- We recommend to replace `python-jsonschema` dependency by something new \n- Effort: approx 1 day coding and 1-2 time to improve documentation\n- We recommend to use: **TBD**\n\n## Requirements and wishes\n\n- Support hierarchical config (`general.logging.level`)\n- Support to and from dict / JSON / YAML \n- Property dot access and tab completion for getting \u0026 setting\n- Nice representation of overall config and specific settings\n- Support for config update with a file or dict as in dict.update()\n- Validation for python and custom types at init and setting:\n    - regexp (short syntax for complex params)\n    - astropy quantities and angles / type casting\n    - dependencies and required values\n- Support \"frozen\" config to guard against mistyping,\n  i.e. `config.something = \"spam\"` will raise an error\n  if `config.something` isn't defined in the config \n- Good error messages\n\n## Options\n\nWe considered the following options:\n\n- [pydantic](https://github.com/samuelcolvin/pydantic) - [config_pydantic.py](config_pydantic.py) - [test_config_pydantic.py](config_pydantic.py) \n- [traitlets](https://traitlets.readthedocs.io/) - [config_traitlets.py](config_traitlets.py)\n- [astropy.config](http://docs.astropy.org/en/stable/config/index.html) - [config_astropy.py](config_astropy.py) \n- [configurator](https://configurator.readthedocs.io) - no prototype\n- [attrs](http://www.attrs.org/) - no prototype\n- [dataclasses-jsonschema](https://github.com/s-knibbs/dataclasses-jsonschema) - no prototype\n- [python-jsonchema-objects](https://github.com/cwacek/python-jsonschema-objects) - no prototype\n- [marshmallow](https://github.com/marshmallow-code/marshmallow) - no prototype\n- [warlock](https://github.com/bcwaldon/warlock) - no prototype\n- [anyconfig](https://github.com/ssato/python-anyconfig) - no prototype\n- [python-box](https://github.com/cdgriffith/Box) - no prototype\n- [lsst/pex_config](https://github.com/lsst/pex_config) - no prototype\n\n|              | Hierarchical | YAML/JSON |   Dot  |  Repr  | Update | Typed | Frozen | Messages |\n| :----------: | :----------: | :-------: | :----: | :----: | :----: | :---: | :----: | :------: |\n| current      |      o       |     o     |    x   |    c   |    c   |   i   |    o   |    o     |\n| pydantic     |      o       |     o     |    o   |    o   |    x   |   o   |    o   |    o     |\n\n- o: ok\n- c: custom devel\n- i: on init\n\n## Syntax for configuration settings\n\n- [Proposed example file](example-config.yaml)\n- [Existing options](docs.yaml)\n- [Template basic](template-basic.yaml)\n- [Template 1D](template-1d.yaml)\n- [Template 3D](template-3d.yaml)\n\n## Notes\n\n- https://github.com/s-knibbs/dataclasses-jsonschema/issues/117\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdeil%2Fgammapy-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdeil%2Fgammapy-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdeil%2Fgammapy-config/lists"}