biodata-models 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. biodata_models-0.0.4/.flake8 +12 -0
  2. biodata_models-0.0.4/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  3. biodata_models-0.0.4/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. biodata_models-0.0.4/.github/ISSUE_TEMPLATE/user-story.md +27 -0
  5. biodata_models-0.0.4/.github/workflows/link-issues-by-milestone.yml +56 -0
  6. biodata_models-0.0.4/.github/workflows/publish_models_dev.yml +40 -0
  7. biodata_models-0.0.4/.github/workflows/publish_models_main.yml +40 -0
  8. biodata_models-0.0.4/.github/workflows/tag_and_publish_main.yml +86 -0
  9. biodata_models-0.0.4/.github/workflows/test_and_lint.yml +26 -0
  10. biodata_models-0.0.4/.gitignore +141 -0
  11. biodata_models-0.0.4/CODE_OF_CONDUCT.md +133 -0
  12. biodata_models-0.0.4/LICENSE +21 -0
  13. biodata_models-0.0.4/PKG-INFO +80 -0
  14. biodata_models-0.0.4/README.md +50 -0
  15. biodata_models-0.0.4/doc_template/Makefile +20 -0
  16. biodata_models-0.0.4/doc_template/make.bat +35 -0
  17. biodata_models-0.0.4/doc_template/source/_static/dark-logo.svg +129 -0
  18. biodata_models-0.0.4/doc_template/source/_static/favicon.ico +0 -0
  19. biodata_models-0.0.4/doc_template/source/_static/light-logo.svg +128 -0
  20. biodata_models-0.0.4/doc_template/source/conf.py +54 -0
  21. biodata_models-0.0.4/doc_template/source/index.rst +22 -0
  22. biodata_models-0.0.4/pyproject.toml +94 -0
  23. biodata_models-0.0.4/run_all.sh +12 -0
  24. biodata_models-0.0.4/scripts/__init__.py +1 -0
  25. biodata_models-0.0.4/scripts/get_developmental_stage_ontologies.py +70 -0
  26. biodata_models-0.0.4/scripts/get_protocols.py +92 -0
  27. biodata_models-0.0.4/scripts/test_developmental_stage_integration.py +53 -0
  28. biodata_models-0.0.4/scripts/test_genbank_integration.py +26 -0
  29. biodata_models-0.0.4/scripts/test_mouse_anatomy_integration.py +26 -0
  30. biodata_models-0.0.4/scripts/write_to_docdb.py +88 -0
  31. biodata_models-0.0.4/setup.cfg +4 -0
  32. biodata_models-0.0.4/setup.py +4 -0
  33. biodata_models-0.0.4/src/biodata_models/__init__.py +3 -0
  34. biodata_models-0.0.4/src/biodata_models/_generators/__init__.py +1 -0
  35. biodata_models-0.0.4/src/biodata_models/_generators/dev_utils.py +40 -0
  36. biodata_models-0.0.4/src/biodata_models/_generators/generator.py +109 -0
  37. biodata_models-0.0.4/src/biodata_models/_generators/models/atlas.csv +3 -0
  38. biodata_models-0.0.4/src/biodata_models/_generators/models/brain_atlas.csv +841 -0
  39. biodata_models-0.0.4/src/biodata_models/_generators/models/celegans_developmental_stage.csv +775 -0
  40. biodata_models-0.0.4/src/biodata_models/_generators/models/drosophila_developmental_stage.csv +211 -0
  41. biodata_models-0.0.4/src/biodata_models/_generators/models/harp_types.csv +46 -0
  42. biodata_models-0.0.4/src/biodata_models/_generators/models/human_developmental_stage.csv +240 -0
  43. biodata_models-0.0.4/src/biodata_models/_generators/models/modalities.csv +22 -0
  44. biodata_models-0.0.4/src/biodata_models/_generators/models/mouse_anatomy.csv +8037 -0
  45. biodata_models-0.0.4/src/biodata_models/_generators/models/mouse_developmental_stage.csv +135 -0
  46. biodata_models-0.0.4/src/biodata_models/_generators/models/organizations.csv +128 -0
  47. biodata_models-0.0.4/src/biodata_models/_generators/models/process_names.csv +48 -0
  48. biodata_models-0.0.4/src/biodata_models/_generators/models/protocols.csv +68 -0
  49. biodata_models-0.0.4/src/biodata_models/_generators/models/registries.csv +15 -0
  50. biodata_models-0.0.4/src/biodata_models/_generators/models/slap2_acquisition_type.csv +3 -0
  51. biodata_models-0.0.4/src/biodata_models/_generators/models/species.csv +18 -0
  52. biodata_models-0.0.4/src/biodata_models/_generators/models/specimen_procedure_types.csv +18 -0
  53. biodata_models-0.0.4/src/biodata_models/_generators/models/stimulus_modality.csv +9 -0
  54. biodata_models-0.0.4/src/biodata_models/_generators/templates/atlas.txt +11 -0
  55. biodata_models-0.0.4/src/biodata_models/_generators/templates/brain_atlas.txt +52 -0
  56. biodata_models-0.0.4/src/biodata_models/_generators/templates/celegans_developmental_stage.txt +124 -0
  57. biodata_models-0.0.4/src/biodata_models/_generators/templates/drosophila_developmental_stage.txt +124 -0
  58. biodata_models-0.0.4/src/biodata_models/_generators/templates/harp_types.txt +29 -0
  59. biodata_models-0.0.4/src/biodata_models/_generators/templates/human_developmental_stage.txt +124 -0
  60. biodata_models-0.0.4/src/biodata_models/_generators/templates/modalities.txt +37 -0
  61. biodata_models-0.0.4/src/biodata_models/_generators/templates/mouse_anatomy.txt +185 -0
  62. biodata_models-0.0.4/src/biodata_models/_generators/templates/mouse_developmental_stage.txt +124 -0
  63. biodata_models-0.0.4/src/biodata_models/_generators/templates/organizations.txt +52 -0
  64. biodata_models-0.0.4/src/biodata_models/_generators/templates/process_names.txt +11 -0
  65. biodata_models-0.0.4/src/biodata_models/_generators/templates/protocols.txt +52 -0
  66. biodata_models-0.0.4/src/biodata_models/_generators/templates/registries.txt +11 -0
  67. biodata_models-0.0.4/src/biodata_models/_generators/templates/slap2_acquisition_type.txt +11 -0
  68. biodata_models-0.0.4/src/biodata_models/_generators/templates/species.txt +81 -0
  69. biodata_models-0.0.4/src/biodata_models/_generators/templates/specimen_procedure_types.txt +11 -0
  70. biodata_models-0.0.4/src/biodata_models/_generators/templates/stimulus_modality.txt +11 -0
  71. biodata_models-0.0.4/src/biodata_models/_generators/update_harp_types.py +8 -0
  72. biodata_models-0.0.4/src/biodata_models/atlas.py +10 -0
  73. biodata_models-0.0.4/src/biodata_models/brain_atlas.py +5085 -0
  74. biodata_models-0.0.4/src/biodata_models/celegans_developmental_stage.py +902 -0
  75. biodata_models-0.0.4/src/biodata_models/coordinates.py +70 -0
  76. biodata_models-0.0.4/src/biodata_models/data_name_patterns.py +116 -0
  77. biodata_models-0.0.4/src/biodata_models/devices.py +181 -0
  78. biodata_models-0.0.4/src/biodata_models/drosophila_developmental_stage.py +332 -0
  79. biodata_models-0.0.4/src/biodata_models/gene.py +54 -0
  80. biodata_models-0.0.4/src/biodata_models/harp_types.py +432 -0
  81. biodata_models-0.0.4/src/biodata_models/human_developmental_stage.py +361 -0
  82. biodata_models-0.0.4/src/biodata_models/licenses.py +10 -0
  83. biodata_models-0.0.4/src/biodata_models/modalities.py +231 -0
  84. biodata_models-0.0.4/src/biodata_models/mouse_anatomy.py +8796 -0
  85. biodata_models-0.0.4/src/biodata_models/mouse_developmental_stage.py +256 -0
  86. biodata_models-0.0.4/src/biodata_models/organizations.py +1448 -0
  87. biodata_models-0.0.4/src/biodata_models/pid_names.py +25 -0
  88. biodata_models-0.0.4/src/biodata_models/process_names.py +55 -0
  89. biodata_models-0.0.4/src/biodata_models/protocols.py +904 -0
  90. biodata_models-0.0.4/src/biodata_models/reagent.py +25 -0
  91. biodata_models-0.0.4/src/biodata_models/registries.py +22 -0
  92. biodata_models-0.0.4/src/biodata_models/slap2_acquisition_type.py +10 -0
  93. biodata_models-0.0.4/src/biodata_models/species.py +260 -0
  94. biodata_models-0.0.4/src/biodata_models/specimen_procedure_types.py +25 -0
  95. biodata_models-0.0.4/src/biodata_models/stimulus_modality.py +16 -0
  96. biodata_models-0.0.4/src/biodata_models/system_architecture.py +53 -0
  97. biodata_models-0.0.4/src/biodata_models/units.py +173 -0
  98. biodata_models-0.0.4/src/biodata_models.egg-info/PKG-INFO +80 -0
  99. biodata_models-0.0.4/src/biodata_models.egg-info/SOURCES.txt +131 -0
  100. biodata_models-0.0.4/src/biodata_models.egg-info/dependency_links.txt +1 -0
  101. biodata_models-0.0.4/src/biodata_models.egg-info/requires.txt +20 -0
  102. biodata_models-0.0.4/src/biodata_models.egg-info/top_level.txt +1 -0
  103. biodata_models-0.0.4/tests/__init__.py +7 -0
  104. biodata_models-0.0.4/tests/resources/genbank_response.txt +54 -0
  105. biodata_models-0.0.4/tests/resources/harp_types.csv +4 -0
  106. biodata_models-0.0.4/tests/resources/protocols_response.json +508 -0
  107. biodata_models-0.0.4/tests/test_atlas.py +18 -0
  108. biodata_models-0.0.4/tests/test_brain_atlas.py +123 -0
  109. biodata_models-0.0.4/tests/test_celegans_developmental_stage.py +91 -0
  110. biodata_models-0.0.4/tests/test_coordinates.py +18 -0
  111. biodata_models-0.0.4/tests/test_data_name_patterns.py +145 -0
  112. biodata_models-0.0.4/tests/test_dev_utils.py +186 -0
  113. biodata_models-0.0.4/tests/test_devices.py +18 -0
  114. biodata_models-0.0.4/tests/test_drosophila_developmental_stage.py +91 -0
  115. biodata_models-0.0.4/tests/test_gene.py +68 -0
  116. biodata_models-0.0.4/tests/test_generator.py +158 -0
  117. biodata_models-0.0.4/tests/test_human_developmental_stage.py +91 -0
  118. biodata_models-0.0.4/tests/test_licenses.py +18 -0
  119. biodata_models-0.0.4/tests/test_modalities.py +34 -0
  120. biodata_models-0.0.4/tests/test_models.py +146 -0
  121. biodata_models-0.0.4/tests/test_mouse_anatomy.py +102 -0
  122. biodata_models-0.0.4/tests/test_mouse_developmental_stage.py +91 -0
  123. biodata_models-0.0.4/tests/test_organizations.py +28 -0
  124. biodata_models-0.0.4/tests/test_pid_names.py +23 -0
  125. biodata_models-0.0.4/tests/test_process_names.py +18 -0
  126. biodata_models-0.0.4/tests/test_protocols.py +27 -0
  127. biodata_models-0.0.4/tests/test_reagent.py +18 -0
  128. biodata_models-0.0.4/tests/test_registries.py +18 -0
  129. biodata_models-0.0.4/tests/test_slap2_acquisition_type.py +18 -0
  130. biodata_models-0.0.4/tests/test_specimen_procedure_types.py +18 -0
  131. biodata_models-0.0.4/tests/test_stimulus_modality.py +18 -0
  132. biodata_models-0.0.4/tests/test_system_architecture.py +16 -0
  133. biodata_models-0.0.4/tests/test_units.py +22 -0
@@ -0,0 +1,12 @@
1
+ [flake8]
2
+ exclude =
3
+ .git,
4
+ .venv,
5
+ __pycache__,
6
+ build
7
+ max-complexity = 10
8
+ max-line-length = 120
9
+
10
+ [flake8:local-plugins]
11
+ extension =
12
+ PF = aind_flake8_extensions.plugin:run_ast_checks
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+ - OS: [e.g. iOS]
28
+ - Browser [e.g. chrome, safari]
29
+ - Version [e.g. 22]
30
+
31
+ **Smartphone (please complete the following information):**
32
+ - Device: [e.g. iPhone6]
33
+ - OS: [e.g. iOS8.1]
34
+ - Browser [e.g. stock browser, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Additional context**
38
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: User story
3
+ about: This template provides a basic structure for user story issues.
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ # User story
11
+ As a ..., I want to ..., so I can ...
12
+
13
+ *Ideally, this is in the issue title, but if not, you can put it here. If so, delete this section.*
14
+
15
+ # Acceptance criteria
16
+ - [ ] This is something that can be verified to show that this user story is satisfied.
17
+
18
+ # Sprint Ready Checklist
19
+ - [ ] 1. Acceptance criteria defined
20
+ - [ ] 2. Team understands acceptance criteria
21
+ - [ ] 3. Team has defined solution / steps to satisfy acceptance criteria
22
+ - [ ] 4. Acceptance criteria is verifiable / testable
23
+ - [ ] 5. External / 3rd Party dependencies identified
24
+ - [ ] 6. Ticket is prioritized and sized
25
+
26
+ # Notes
27
+ *Add any helpful notes here.*
@@ -0,0 +1,56 @@
1
+ name: Link issue to cross-repo milestone parent
2
+
3
+ on:
4
+ issues:
5
+ types: [milestoned]
6
+
7
+ jobs:
8
+ link:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Link to parent issue in aind-scientific-computing
13
+ uses: actions/github-script@v7
14
+ with:
15
+ github-token: ${{ secrets.SERVICE_TOKEN }}
16
+ script: |
17
+ const issue = context.payload.issue;
18
+ const milestone = issue.milestone;
19
+
20
+ if (!milestone) return;
21
+
22
+ const targetOwner = "AllenNeuralDynamics";
23
+ const targetRepo = "aind-scientific-computing";
24
+
25
+ const url = milestone.description;
26
+ const match = url?.match(/\/issues\/(\d+)$/);
27
+
28
+ if (!match) {
29
+ console.log(`Milestone description is not a roadmap URL: ${url}`);
30
+ return;
31
+ }
32
+
33
+ const parentNumber = parseInt(match[1]);
34
+
35
+ const { data: parent } = await github.rest.issues.get({
36
+ owner: targetOwner,
37
+ repo: targetRepo,
38
+ issue_number: parentNumber
39
+ });
40
+
41
+ if (!parent) {
42
+ console.log(`No issue found at ${url}`);
43
+ return;
44
+ }
45
+
46
+ await github.request("POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues", {
47
+ owner: targetOwner,
48
+ repo: targetRepo,
49
+ issue_number: parentNumber,
50
+ sub_issue_id: issue.id,
51
+ headers: {
52
+ "X-GitHub-Api-Version": "2022-11-28"
53
+ }
54
+ });
55
+
56
+ console.log(`Linked issue #${issue.number} as sub-issue of ${targetRepo}#${parentNumber}`);
@@ -0,0 +1,40 @@
1
+ name: Publish models to dev docdb
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ paths:
7
+ - 'src/biodata_models/_generators/models/**'
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ publish_models:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ id-token: write
15
+ contents: read
16
+ env:
17
+ AWS_DATA_SCHEMA_MODELS_ROLE: ${{ secrets.AWS_DATA_SCHEMA_MODELS_ROLE_DEV }}
18
+ DOCDB_HOST: ${{ vars.DOCDB_HOST_DEV }}
19
+ DOCDB_DATABASE: ${{ vars.DOCDB_DATABASE }}
20
+ DOCDB_COLLECTION: ${{ vars.DOCDB_COLLECTION }}
21
+ AWS_DEFAULT_REGION : ${{ vars.AWS_REGION_DEV }}
22
+ PATH_TO_MODELS: ${{ vars.PATH_TO_MODELS }}
23
+ steps:
24
+ - uses: actions/checkout@v5
25
+ - name: Set up Python 3.10
26
+ uses: actions/setup-python@v3
27
+ with:
28
+ python-version: '3.10'
29
+ - name: Configure aws credentials
30
+ uses: aws-actions/configure-aws-credentials@v2
31
+ with:
32
+ role-to-assume: ${{ env.AWS_DATA_SCHEMA_MODELS_ROLE }}
33
+ role-session-name: github-schema-upload-session
34
+ aws-region: ${{ env.AWS_DEFAULT_REGION }}
35
+ - name: Install dependencies
36
+ run: |
37
+ python -m pip install -e .[build]
38
+ - name: Publish models to docdb
39
+ run: |
40
+ python ./scripts/write_to_docdb.py
@@ -0,0 +1,40 @@
1
+ name: Publish models to prod docdb
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ paths:
7
+ - 'src/biodata_models/_generators/models/**'
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ publish_models:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ id-token: write
15
+ contents: read
16
+ env:
17
+ AWS_DATA_SCHEMA_MODELS_ROLE: ${{ secrets.AWS_DATA_SCHEMA_MODELS_ROLE_PROD }}
18
+ DOCDB_HOST: ${{ vars.DOCDB_HOST_PROD }}
19
+ DOCDB_DATABASE: ${{ vars.DOCDB_DATABASE }}
20
+ DOCDB_COLLECTION: ${{ vars.DOCDB_COLLECTION }}
21
+ AWS_DEFAULT_REGION : ${{ vars.AWS_REGION_PROD }}
22
+ PATH_TO_MODELS: ${{ vars.PATH_TO_MODELS }}
23
+ steps:
24
+ - uses: actions/checkout@v5
25
+ - name: Set up Python 3.10
26
+ uses: actions/setup-python@v3
27
+ with:
28
+ python-version: '3.10'
29
+ - name: Configure aws credentials
30
+ uses: aws-actions/configure-aws-credentials@v2
31
+ with:
32
+ role-to-assume: ${{ env.AWS_DATA_SCHEMA_MODELS_ROLE }}
33
+ role-session-name: github-schema-upload-session
34
+ aws-region: ${{ env.AWS_DEFAULT_REGION }}
35
+ - name: Install dependencies
36
+ run: |
37
+ python -m pip install -e .[build]
38
+ - name: Publish models to docdb
39
+ run: |
40
+ python ./scripts/write_to_docdb.py
@@ -0,0 +1,86 @@
1
+ name: Tag and publish
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+
7
+ jobs:
8
+ update_badges:
9
+ runs-on: ubuntu-latest
10
+ continue-on-error: true
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ ref: ${{ env.DEFAULT_BRANCH }}
15
+ fetch-depth: 0
16
+ token: ${{ secrets.SERVICE_TOKEN }}
17
+ - name: Set up Python 3.10
18
+ uses: actions/setup-python@v3
19
+ with:
20
+ python-version: '3.10'
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install -e .[dev] --no-cache-dir
24
+ - name: Get Python version and Update README.md
25
+ run: |
26
+ python_version=$(grep "requires-python" pyproject.toml | grep -o ">=[^\"]*")
27
+ python_badge=$(grep -o 'python-[^)]*' README.md)
28
+ new_python_badge="python-$python_version-blue?logo=python"
29
+ sed -i "s/$python_badge/$new_python_badge/g" README.md
30
+ - name: Get interrogate values and Update README.md
31
+ run: |
32
+ interrogate_val=$(interrogate . | grep -o 'actual: [0-9]*\.[0-9]*' | awk '{print $2}')
33
+ interrogate_badge=$(grep -o 'interrogate-[^)]*' README.md)
34
+ if (( $(echo "$interrogate_val >= 90.00" | bc -l) )); then
35
+ new_interrogate_badge="interrogate-$interrogate_val%25-brightgreen"
36
+ elif (( $(echo "$interrogate_val < 80.00" | bc -l) )); then
37
+ new_interrogate_badge="interrogate-$interrogate_val%25-red"
38
+ else
39
+ new_interrogate_badge="interrogate-$interrogate_val%25-yellow"
40
+ fi
41
+ sed -i "s/$interrogate_badge/$new_interrogate_badge/g" README.md
42
+ - name: Get Coverage values and Update README.md
43
+ run: |
44
+ coverage run -m unittest discover
45
+ coverage_val=$(coverage report | grep "^TOTAL" | grep -o '[0-9]\+%' | grep -o '[0-9]\+')
46
+ coverage_badge=$(grep -o "coverage-[^?]*" README.md)
47
+ if (( $(echo "$coverage_val >= 90.00" | bc -l) )); then
48
+ new_coverage_badge="coverage-$coverage_val%25-brightgreen"
49
+ elif (( $(echo "$coverage_val < 80.00" | bc -l) )); then
50
+ new_coverage_badge="coverage-$coverage_val%25-red"
51
+ else
52
+ new_coverage_badge="coverage-$coverage_val%25-yellow"
53
+ fi
54
+ sed -i "s/$coverage_badge/$new_coverage_badge/g" README.md
55
+ - name: Commit changes
56
+ uses: EndBug/add-and-commit@v9
57
+ with:
58
+ default_author: github_actions
59
+ message: "ci: update badges [skip actions]"
60
+ add: '["README.md"]'
61
+ tag:
62
+ needs: update_badges
63
+ uses: AllenNeuralDynamics/.github/.github/workflows/release-bump-version.yml@main
64
+ secrets:
65
+ repo-token: ${{ secrets.SERVICE_TOKEN }}
66
+ publish:
67
+ needs: tag
68
+ runs-on: ubuntu-latest
69
+ permissions:
70
+ id-token: write
71
+ contents: read
72
+ steps:
73
+ - uses: actions/checkout@v3
74
+ - name: Pull latest changes
75
+ run: git pull origin main
76
+ - name: Set up Python 3.10
77
+ uses: actions/setup-python@v2
78
+ with:
79
+ python-version: '3.10'
80
+ - name: Install dependencies
81
+ run: |
82
+ pip install --upgrade setuptools wheel twine build
83
+ python -m build
84
+ twine check dist/*
85
+ - name: Publish on PyPI
86
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,26 @@
1
+ name: Lint and run tests
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ ci:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Set up Python ${{ matrix.python-version }}
17
+ uses: actions/setup-python@v3
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - name: Install dependencies
21
+ run: |
22
+ python -m pip install -e .[dev]
23
+ - name: Run linter checks
24
+ run: flake8 . && interrogate --verbose .
25
+ - name: Run tests and coverage
26
+ run: coverage run -m unittest discover && coverage report
@@ -0,0 +1,141 @@
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
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # PyCharm
132
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
133
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
134
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
135
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
136
+ .idea/
137
+
138
+ # MacOs
139
+ **/.DS_Store
140
+ .vscode/settings.json
141
+ uv.lock
@@ -0,0 +1,133 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, religion, or sexual identity
11
+ and orientation.
12
+
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
15
+
16
+ ## Our Standards
17
+
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
20
+
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the
27
+ overall community
28
+
29
+ Examples of unacceptable behavior include:
30
+
31
+ * The use of sexualized language or imagery, and sexual attention or
32
+ advances of any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
34
+ * Public or private harassment
35
+ * Publishing others' private information, such as a physical or email
36
+ address, without their explicit permission
37
+ * Other conduct which could reasonably be considered inappropriate in a
38
+ professional setting
39
+
40
+ ## Enforcement Responsibilities
41
+
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
46
+
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
51
+
52
+ ## Scope
53
+
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official email address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
59
+
60
+ ## Enforcement
61
+
62
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
+ reported to the community leaders responsible for enforcement at
64
+ ScientificComputing@AllenInstitute.onmicrosoft.com.
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series
87
+ of actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or
94
+ permanent ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within
114
+ the community.
115
+
116
+ ## Attribution
117
+
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.0, available at
120
+ [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121
+
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
+ at [https://www.contributor-covenant.org/translations][translations].
128
+
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131
+ [Mozilla CoC]: https://github.com/mozilla/diversity
132
+ [FAQ]: https://www.contributor-covenant.org/faq
133
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Allen Institute for Neural Dynamics
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.