Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.9%) to scientific vocabulary
Repository
"Griddles" of parameters
Basic Info
- Host: GitHub
- Owner: CDCgov
- Language: Python
- Default Branch: main
- Homepage: https://cdcgov.github.io/pygriddler/
- Size: 784 KB
Statistics
- Stars: 3
- Watchers: 13
- Forks: 2
- Open Issues: 11
- Releases: 2
Metadata Files
README.md
Griddler: a grammar of parameters
Griddler is a tool for converting human-written specifications for simulation experiments into lists of machine-readable specifications.
Why griddler?
Modelers often want to run multiple simulations with different but related parameterizations. Some parameters should be in common across all simulations, while others should vary in patterns like "grids" or "bundles."
Griddler provides a grammar of these kinds of multiple parameterizations that aims to separate the specification of parameterizations from the running of simulations. Ideally, a user can write a single "griddle" file (or, in more complex cases, a griddle-importing Python script) that produces all the different simulation parameterizations of interest.
Getting started
Read the GitHub pages documentation!
If you have a griddle written in a supported schema, the easiest way to use griddler is from the command line:
bash
python -m griddler my_griddle.yaml > my_experiment.json
Or, from within Python:
```python import griddler import yaml
with open("mygriddle.yaml") as f: mygriddle = yaml.safe_load(f)
myexperiment = griddler.parse(mygriddle) myparametersets = myexperiment.todicts() ```
Examples
For complex experiments, you might want to write a Python file that manipulates Parameter, Spec, and Experiment objects directly. See the API reference for more details.
For simpler experiments, griddler supports multiple griddle schemas. A griddle is a human-written file, usually a YAML or JSON, that contains some metadata and then whatever is needed to uniquely specify the experiment. See the griddle for more details.
In the v0.4 schema, the trivial example is:
yaml
schema: v0.4
experiment: []
The minimal example of a single, fixed parameter is:
yaml
schema: v0.4
experiment: [{ R0: 1.0 }]
The output, serialized as JSON, is:
json
[{ "R0": 1.0 }]
An example of the product might be:
yaml
schema: v0.4
experiment:
product:
- [{ R0: 1.5 }, { R0: 2.0 }]
- [{ gamma: 0.3 }, { gamma: 0.4 }]
which produces a list of 4 outputs, with all combinations of input varying parameters:
json
[
{ "R0": 1.5, "gamma": 0.3 },
{ "R0": 1.5, "gamma": 0.4 },
{ "R0": 2.0, "gamma": 0.3 },
{ "R0": 2.0, "gamma": 0.4 }
]
Unions become useful when combining experiments that vary different parameters. For example, an experiment might consist of some simulations where a simulated quantity follows the normal distribution and other simulations where it follows the gamma distribution. For the normal distribution simulations, we might want to grid over values of the mean and standard deviation, while in the gamma distribution simulations, we want to grid over shape and scale parameters:
yaml
schema: v0.4
experiment:
product:
- [{ R0: 1.5 }]
- union:
- product:
- [{ distribution: normal }]
- [{ mean: 0.5 }, { mean: 1.0 }, { mean: 1.5 }]
- [{ sd: 0.5 }, { sd: 1.0 }]
- product:
- [{ distribution: gamma }]
- [{ shape: 0.5 }, { shape: 1.0 }]
- [{ scale: 0.5 }, { scale: 1.0 }]
which produces multiple outputs:
json
[
{ "R0": 1.5, "distribution": "normal", "mean": 0.5, "sd": 0.5 },
{ "R0": 1.5, "distribution": "normal", "mean": 0.5, "sd": 1.0 },
{ "R0": 1.5, "distribution": "normal", "mean": 1.0, "sd": 0.5 },
// etc. with further mean/sd combinations
{ "R0": 1.5, "distribution": "gamma", "shape": 0.5, "scale": 0.5 }
// etc. with further shape/scale combinations
]
Project Admin
Scott Olesen ulp7@cdc.gov (CDC/IOD/ORR/CFA)
Changelog
See the repo releases.
General Disclaimer
This repository was created for use by CDC programs to collaborate on public health related projects in support of the CDC mission. GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise.
Public Domain Standard Notice
This repository constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105. This repository is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication. All contributions to this repository will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest.
License Standard Notice
This repository is licensed under ASL v2 or later.
This source code in this repository is free: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version.
This source code in this repository is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details.
You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html
The source code forked from other open source projects will inherit its license.
Privacy Standard Notice
This repository contains only non-sensitive, publicly available data and information. All material and community participation is covered by the Disclaimer and Code of Conduct. For more information about CDC's privacy policy, please visit http://www.cdc.gov/other/privacy.html.
Contributing Standard Notice
Anyone is encouraged to contribute to the repository by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the Apache Software License v2 or later.
All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. Learn more at http://www.cdc.gov/other/privacy.html.
Records Management Standard Notice
This repository is not a source of government records but is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC web site.
Owner
- Name: Centers for Disease Control and Prevention
- Login: CDCgov
- Kind: organization
- Email: data@cdc.gov
- Location: Atlanta, GA
- Website: http://open.cdc.gov/
- Twitter: CDCgov
- Repositories: 114
- Profile: https://github.com/CDCgov
CDC's collaborative software projects to protect America from health, safety, and security threats, both foreign and in the U.S.
GitHub Events
Total
- Create event: 27
- Release event: 2
- Issues event: 50
- Watch event: 3
- Delete event: 21
- Issue comment event: 35
- Push event: 83
- Pull request review comment event: 18
- Pull request review event: 23
- Pull request event: 48
- Fork event: 2
Last Year
- Create event: 27
- Release event: 2
- Issues event: 50
- Watch event: 3
- Delete event: 21
- Issue comment event: 35
- Push event: 83
- Pull request review comment event: 18
- Pull request review event: 23
- Pull request event: 48
- Fork event: 2
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 41
- Total pull requests: 56
- Average time to close issues: 2 months
- Average time to close pull requests: 2 days
- Total issue authors: 4
- Total pull request authors: 5
- Average comments per issue: 0.61
- Average comments per pull request: 0.2
- Merged pull requests: 47
- Bot issues: 0
- Bot pull requests: 8
Past Year
- Issues: 31
- Pull requests: 49
- Average time to close issues: about 2 months
- Average time to close pull requests: 2 days
- Issue authors: 4
- Pull request authors: 5
- Average comments per issue: 0.71
- Average comments per pull request: 0.22
- Merged pull requests: 40
- Bot issues: 0
- Bot pull requests: 8
Top Authors
Issue Authors
- swo (39)
- natemcintosh (1)
- cherz4 (1)
- damonbayer (1)
Pull Request Authors
- swo (54)
- dependabot[bot] (7)
- pre-commit-ci[bot] (2)
- bbbruce (2)
- damonbayer (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/cache v4 composite
- actions/setup-python v5 composite
- actions/cache v3 composite
- ./.github/actions/mkdocs_build * composite
- actions/checkout v4 composite
- ./.github/actions/mkdocs_build * composite
- actions/checkout v4 composite
- ./.github/actions/pre-commit * composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- appnope 0.1.4
- asttokens 2.4.1
- babel 2.16.0
- certifi 2024.8.30
- cffi 1.17.1
- charset-normalizer 3.4.0
- click 8.1.7
- colorama 0.4.6
- comm 0.2.2
- debugpy 1.8.7
- decorator 5.1.1
- exceptiongroup 1.2.2
- executing 2.1.0
- ghp-import 2.1.0
- griffe 1.5.1
- idna 3.10
- iniconfig 2.0.0
- ipykernel 6.29.5
- ipython 8.29.0
- jedi 0.19.1
- jinja2 3.1.4
- jupyter-client 8.6.3
- jupyter-core 5.7.2
- markdown 3.7
- markupsafe 3.0.2
- matplotlib-inline 0.1.7
- mdx-truly-sane-lists 1.3
- mergedeep 1.3.4
- mkdocs 1.6.1
- mkdocs-autorefs 1.2.0
- mkdocs-get-deps 0.2.0
- mkdocs-material 9.5.43
- mkdocs-material-extensions 1.3.1
- mkdocstrings 0.25.2
- mkdocstrings-python 1.10.9
- nest-asyncio 1.6.0
- packaging 24.1
- paginate 0.5.7
- parso 0.8.4
- pathspec 0.12.1
- pexpect 4.9.0
- platformdirs 4.3.6
- pluggy 1.5.0
- polars 1.12.0
- prompt-toolkit 3.0.48
- psutil 6.1.0
- ptyprocess 0.7.0
- pure-eval 0.2.3
- pycparser 2.22
- pygments 2.18.0
- pymdown-extensions 10.12
- pytest 8.3.3
- python-dateutil 2.9.0.post0
- pywin32 308
- pyyaml 6.0.2
- pyyaml-env-tag 0.1
- pyzmq 26.2.0
- regex 2024.9.11
- requests 2.32.3
- six 1.16.0
- stack-data 0.6.3
- tomli 2.0.2
- tornado 6.4.1
- traitlets 5.14.3
- typing-extensions 4.12.2
- urllib3 2.2.3
- watchdog 6.0.0
- wcwidth 0.2.13
- ipykernel ^6.29.4 develop
- mdx-truly-sane-lists ^1.3 develop
- mkdocs ^1.6.0 develop
- mkdocs-material ^9.5.28 develop
- mkdocstrings ^0.25.1 develop
- mkdocstrings-python ^1.10.5 develop
- pytest ^8.3.3 develop
- polars ^1.7.1
- python ^3.10
- pyyaml ^6.0.1