Skip to content

Commit 930268a

Browse files
committed
Initialize Repository
0 parents  commit 930268a

File tree

134 files changed

+10917
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+10917
-0
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# default owners
2+
* @albrja @hussain-jafari @patricktnast @rmudambi @stevebachmeier

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Title: Summary, imperative, start upper case, don't end with a period
2+
<!-- Ideally, <=50 chars. 50 chars is here..: -->
3+
4+
### Description
5+
<!-- For use in commit message, wrap at 72 chars. 72 chars is here: -->
6+
- *Category*: <!-- one of bugfix, data artifact, implementation, observers,
7+
post-processing, refactor, revert, test, release, other/misc -->
8+
- *JIRA issue*: https://jira.ihme.washington.edu/browse/MIC-XYZ
9+
- *Research reference*: <!--Link to research documentation for code -->
10+
11+
### Changes and notes
12+
<!--
13+
Change description – why, what, anything unexplained by the above.
14+
Include guidance to reviewers if changes are complex.
15+
-->
16+
17+
### Verification and Testing
18+
<!--
19+
Details on how code was verified. Consider: plots, images, (small) csv files.
20+
-->
21+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -----------------------------------------------------------------------------
2+
# - invoked on push to any branch
3+
# -----------------------------------------------------------------------------
4+
name: update README
5+
on: push
6+
7+
jobs:
8+
update-readme:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.11
17+
- name: Update README
18+
run: |
19+
pip install packaging
20+
python update_readme.py
21+
- name: Commit and push changes
22+
run: |
23+
git config --local user.email "action@github.com"
24+
git config --local user.name "github-actions"
25+
git diff --quiet && git diff --staged --quiet || (
26+
git add README.rst
27+
git commit -am "update README with supported Python versions"
28+
git pull --rebase origin ${{ github.ref_name }}
29+
git push origin ${{ github.ref_name }}
30+
)
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
.hypothesis/
51+
.pytest_cache/
52+
53+
# Translations
54+
*.mo
55+
*.pot
56+
57+
# Django stuff:
58+
*.log
59+
local_settings.py
60+
db.sqlite3
61+
db.sqlite3-journal
62+
63+
# Flask stuff:
64+
instance/
65+
.webassets-cache
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
73+
# PyBuilder
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# IPython
80+
profile_default/
81+
ipython_config.py
82+
83+
# pyenv
84+
.python-version
85+
86+
# pipenv
87+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
88+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
89+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
90+
# install all needed dependencies.
91+
#Pipfile.lock
92+
93+
# celery beat schedule file
94+
celerybeat-schedule
95+
96+
# SageMath parsed files
97+
*.sage.py
98+
99+
# Environments
100+
.env
101+
.venv
102+
env/
103+
venv/
104+
ENV/
105+
env.bak/
106+
venv.bak/
107+
108+
# Spyder project settings
109+
.spyderproject
110+
.spyproject
111+
112+
# Rope project settings
113+
.ropeproject
114+
115+
# mkdocs documentation
116+
/site
117+
118+
# mypy
119+
.mypy_cache/
120+
.dmypy.json
121+
dmypy.json
122+
123+
# Pyre type checker
124+
.pyre/
125+
126+
# Pycharm project settings
127+
.idea/
128+
129+
# Version file
130+
src/*/_version.py
131+
132+
# Copilot instructions
133+
.github/copilot_instructions.md
134+
.github/prompts/
135+
136+
# VS Code settings
137+
.vscode/

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**v0.0.1 - 10/20/2025**
2+
3+
- Initial release

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# default owners
2+
* @albrja @hussain-jafari @patricktnast @rmudambi @stevebachmeier

Jenkinsfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* This Jenkinsfile simply loads the `reusable_pipeline` pipeline from the
2+
vivariu_build_utils repository (https://github.com/ihmeuw/vivarium_build_utils).
3+
4+
vivarium_build_utils is loaded as a Jenkins shared library
5+
(https://www.jenkins.io/doc/book/pipeline/shared-libraries/).
6+
Jenkins shared library convention dictates that importable modules must be stored
7+
in the 'vars' folder.
8+
9+
Jenkins shared libraries can be configured in the Jenkins UI:
10+
* Manage Jenkins
11+
* Configure System
12+
* Global Pipeline Libraries section
13+
* Library subsection
14+
* Name: The Name for the lib
15+
* Version: The branch you want to use. Throws an error
16+
for nonexistent branches.
17+
* Project Repository: Url to the shared lib
18+
* Credentials: SSH key to access the repo
19+
20+
Note that updating the shared repo will take affect on the next pipeline invocation.
21+
*/
22+
23+
// Load the get_vbu_version function from vivarium_build_utils/bootstrap/
24+
// (the directory to load from is defined in the Jenkins shared library configuration)
25+
@Library("get_vbu_version@main") _
26+
27+
// Load the full vivarium_build_utils library at the expected version
28+
library("vivarium_build_utils@${get_vbu_version()}")
29+
30+
reusable_pipeline(
31+
scheduled_branches: ['main'],
32+
skip_doc_build: true,
33+
upstream_repos: ['vivarium', 'vivarium_public_health', 'gbd_mapping', 'vivarium_cluster_tools', 'vivarium_inputs'],
34+
)

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright 2022 Institute for Health Metrics and Evaluation
4+
All rights reserved
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include LICENSE
2+
include README.rst
3+
4+
recursive-include src/vivarium_profiling *.py *.yaml *.ipynb
5+
recursive-include tests *.py *txt *.yaml

Makefile

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Check if we're running in Jenkins
2+
ifdef JENKINS_URL
3+
# Files are already in workspace from shared library
4+
MAKE_INCLUDES := .
5+
else
6+
# For local dev, use the installed vivarium_build_utils package if it exists
7+
# First, check if we can import vivarium_build_utils and assign 'yes' or 'no'.
8+
# We do this by importing the package in python and redirecting stderr to the null device.
9+
# If the import is successful (&&), it will print 'yes', otherwise (||) it will print 'no'.
10+
VIVARIUM_BUILD_UTILS_AVAILABLE := $(shell python -c "import vivarium_build_utils" 2>/dev/null && echo "yes" || echo "no")
11+
# If vivarium_build_utils is available, get the makefiles path or else set it to empty
12+
ifeq ($(VIVARIUM_BUILD_UTILS_AVAILABLE),yes)
13+
MAKE_INCLUDES := $(shell python -c "from vivarium_build_utils.resources import get_makefiles_path; print(get_makefiles_path())")
14+
else
15+
MAKE_INCLUDES :=
16+
endif
17+
endif
18+
19+
# Set the package name as the last part of this file's parent directory path
20+
PACKAGE_NAME = $(notdir $(CURDIR))
21+
22+
ifneq ($(MAKE_INCLUDES),) # not empty
23+
# Include makefiles from vivarium_build_utils
24+
include $(MAKE_INCLUDES)/base.mk
25+
include $(MAKE_INCLUDES)/test.mk
26+
else # empty
27+
# Use this help message (since the vivarium_build_utils version is not available)
28+
help:
29+
@echo
30+
@echo "For Make's standard help, run 'make --help'."
31+
@echo
32+
@echo "Most of our Makefile targets are provided by the vivarium_build_utils"
33+
@echo "package. To access them, you need to create a development environment first."
34+
@echo
35+
@echo "make build-env"
36+
@echo
37+
@echo "USAGE:"
38+
@echo " make build-env name=<environment_name> [py=<python_version>]"
39+
@echo
40+
@echo "ARGUMENTS:"
41+
@echo " name [required] Name of the conda environment to create"
42+
@echo " py [optional] Python version (defaults to latest supported)"
43+
@echo
44+
@echo "EXAMPLE:"
45+
@echo " make build-env name=vivarium_dev"
46+
@echo " make build-env name=vivarium_dev py=3.9"
47+
@echo
48+
@echo "After creating the environment:"
49+
@echo " 1. Activate it: 'conda activate <environment_name>'"
50+
@echo " 2. Run 'make help' again to see all newly available targets"
51+
@echo
52+
endif
53+
54+
build-env: # Create a new environment with installed packages
55+
ifndef name
56+
@echo "Error: name is required and must be passed in as a keyword argument."
57+
@echo "Usage: make build-env name=<ENV_NAME> py=<PYTHON_VERSION>"
58+
@exit 1
59+
endif
60+
# Check if py is set, otherwise use the latest supported version
61+
@$(eval py ?= $(shell python -c "import json; versions = json.load(open('python_versions.json')); print(max(versions, key=lambda x: tuple(map(int, x.split('.')))))"))
62+
conda create -n $(name) python=$(py) --yes
63+
# Bootstrap vivarium_build_utils into the new environment
64+
conda run -n $(name) pip install vivarium_build_utils
65+
conda run -n $(name) make install
66+
@echo
67+
@echo "Environment built ($(name))"
68+
@echo "Don't forget to activate it with: 'conda activate $(name)'"
69+
@echo

0 commit comments

Comments
 (0)