aind-data-schema-models 0.1.0__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.
- aind_data_schema_models-0.1.0/.flake8 +7 -0
- aind_data_schema_models-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- aind_data_schema_models-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- aind_data_schema_models-0.1.0/.github/ISSUE_TEMPLATE/user-story.md +27 -0
- aind_data_schema_models-0.1.0/.github/workflows/tag_and_publish.yml +85 -0
- aind_data_schema_models-0.1.0/.github/workflows/test_and_lint.yml +26 -0
- aind_data_schema_models-0.1.0/.gitignore +139 -0
- aind_data_schema_models-0.1.0/LICENSE +21 -0
- aind_data_schema_models-0.1.0/PKG-INFO +117 -0
- aind_data_schema_models-0.1.0/README.md +96 -0
- aind_data_schema_models-0.1.0/doc_template/Makefile +20 -0
- aind_data_schema_models-0.1.0/doc_template/make.bat +35 -0
- aind_data_schema_models-0.1.0/doc_template/source/_static/dark-logo.svg +129 -0
- aind_data_schema_models-0.1.0/doc_template/source/_static/favicon.ico +0 -0
- aind_data_schema_models-0.1.0/doc_template/source/_static/light-logo.svg +128 -0
- aind_data_schema_models-0.1.0/doc_template/source/conf.py +54 -0
- aind_data_schema_models-0.1.0/doc_template/source/index.rst +22 -0
- aind_data_schema_models-0.1.0/pyproject.toml +81 -0
- aind_data_schema_models-0.1.0/setup.cfg +4 -0
- aind_data_schema_models-0.1.0/setup.py +4 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/__init__.py +3 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/harp_types.py +150 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/modalities.py +144 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/organizations.py +894 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/pid_names.py +24 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/platforms.py +150 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/process_names.py +45 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/registry.py +68 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/species.py +77 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models/units.py +129 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models.egg-info/PKG-INFO +117 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models.egg-info/SOURCES.txt +39 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models.egg-info/dependency_links.txt +1 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models.egg-info/requires.txt +11 -0
- aind_data_schema_models-0.1.0/src/aind_data_schema_models.egg-info/top_level.txt +1 -0
- aind_data_schema_models-0.1.0/tests/__init__.py +7 -0
- aind_data_schema_models-0.1.0/tests/test_modalities.py +18 -0
- aind_data_schema_models-0.1.0/tests/test_models.py +57 -0
- aind_data_schema_models-0.1.0/tests/test_organizations.py +18 -0
- aind_data_schema_models-0.1.0/tests/test_process_names.py +18 -0
- aind_data_schema_models-0.1.0/tests/test_units.py +30 -0
|
@@ -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,85 @@
|
|
|
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.8
|
|
18
|
+
uses: actions/setup-python@v3
|
|
19
|
+
with:
|
|
20
|
+
python-version: 3.8
|
|
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/aind-github-actions/.github/workflows/tag.yml@main
|
|
64
|
+
secrets:
|
|
65
|
+
SERVICE_TOKEN: ${{ secrets.SERVICE_TOKEN }}
|
|
66
|
+
publish:
|
|
67
|
+
needs: tag
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v3
|
|
71
|
+
- name: Pull latest changes
|
|
72
|
+
run: git pull origin main
|
|
73
|
+
- name: Set up Python 3.8
|
|
74
|
+
uses: actions/setup-python@v2
|
|
75
|
+
with:
|
|
76
|
+
python-version: 3.8
|
|
77
|
+
- name: Install dependencies
|
|
78
|
+
run: |
|
|
79
|
+
pip install --upgrade setuptools wheel twine build
|
|
80
|
+
python -m build
|
|
81
|
+
twine check dist/*
|
|
82
|
+
- name: Publish on PyPI
|
|
83
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
84
|
+
with:
|
|
85
|
+
password: ${{ secrets.AIND_PYPI_TOKEN }}
|
|
@@ -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.8', '3.9', '3.10', '3.11' ]
|
|
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,139 @@
|
|
|
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
|
|
@@ -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.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aind-data-schema-models
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Generated from aind-library-template
|
|
5
|
+
Author: Allen Institute for Neural Dynamics
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: pydantic>=2.0
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: codespell; extra == "dev"
|
|
14
|
+
Requires-Dist: black; extra == "dev"
|
|
15
|
+
Requires-Dist: coverage; extra == "dev"
|
|
16
|
+
Requires-Dist: flake8; extra == "dev"
|
|
17
|
+
Requires-Dist: interrogate; extra == "dev"
|
|
18
|
+
Requires-Dist: isort; extra == "dev"
|
|
19
|
+
Requires-Dist: Sphinx; extra == "dev"
|
|
20
|
+
Requires-Dist: furo; extra == "dev"
|
|
21
|
+
|
|
22
|
+
# aind-data-schema-models
|
|
23
|
+
|
|
24
|
+
[](LICENSE)
|
|
25
|
+

|
|
26
|
+
[](https://github.com/semantic-release/semantic-release)
|
|
27
|
+

|
|
28
|
+

|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
To install from pypi, run
|
|
33
|
+
```bash
|
|
34
|
+
pip install aind-data-schema-models
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
To install from source, in the root directory, run
|
|
38
|
+
```bash
|
|
39
|
+
pip install -e .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
To develop the code, run
|
|
43
|
+
```bash
|
|
44
|
+
pip install -e .[dev]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Contributing
|
|
48
|
+
|
|
49
|
+
### Linters and testing
|
|
50
|
+
|
|
51
|
+
There are several libraries used to run linters, check documentation, and run tests.
|
|
52
|
+
|
|
53
|
+
- Please test your changes using the **coverage** library, which will run the tests and log a coverage report:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
coverage run -m unittest discover && coverage report
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- Use **interrogate** to check that modules, methods, etc. have been documented thoroughly:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
interrogate .
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- Use **flake8** to check that code is up to standards (no unused imports, etc.):
|
|
66
|
+
```bash
|
|
67
|
+
flake8 .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- Use **black** to automatically format the code into PEP standards:
|
|
71
|
+
```bash
|
|
72
|
+
black .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- Use **isort** to automatically sort import statements:
|
|
76
|
+
```bash
|
|
77
|
+
isort .
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Pull requests
|
|
81
|
+
|
|
82
|
+
For internal members, please create a branch. For external members, please fork the repository and open a pull request from the fork. We'll primarily use [Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit) style for commit messages. Roughly, they should follow the pattern:
|
|
83
|
+
```text
|
|
84
|
+
<type>(<scope>): <short summary>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
where scope (optional) describes the packages affected by the code changes and type (mandatory) is one of:
|
|
88
|
+
|
|
89
|
+
- **build**: Changes that affect build tools or external dependencies (example scopes: pyproject.toml, setup.py)
|
|
90
|
+
- **ci**: Changes to our CI configuration files and scripts (examples: .github/workflows/ci.yml)
|
|
91
|
+
- **docs**: Documentation only changes
|
|
92
|
+
- **feat**: A new feature
|
|
93
|
+
- **fix**: A bugfix
|
|
94
|
+
- **perf**: A code change that improves performance
|
|
95
|
+
- **refactor**: A code change that neither fixes a bug nor adds a feature
|
|
96
|
+
- **test**: Adding missing tests or correcting existing tests
|
|
97
|
+
|
|
98
|
+
### Semantic Release
|
|
99
|
+
|
|
100
|
+
The table below, from [semantic release](https://github.com/semantic-release/semantic-release), shows which commit message gets you which release type when `semantic-release` runs (using the default configuration):
|
|
101
|
+
|
|
102
|
+
| Commit message | Release type |
|
|
103
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
|
|
104
|
+
| `fix(pencil): stop graphite breaking when too much pressure applied` | ~~Patch~~ Fix Release, Default release |
|
|
105
|
+
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
|
|
106
|
+
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release <br /> (Note that the `BREAKING CHANGE: ` token must be in the footer of the commit) |
|
|
107
|
+
|
|
108
|
+
### Documentation
|
|
109
|
+
To generate the rst files source files for documentation, run
|
|
110
|
+
```bash
|
|
111
|
+
sphinx-apidoc -o doc_template/source/ src
|
|
112
|
+
```
|
|
113
|
+
Then to create the documentation HTML files, run
|
|
114
|
+
```bash
|
|
115
|
+
sphinx-build -b html doc_template/source/ doc_template/build/html
|
|
116
|
+
```
|
|
117
|
+
More info on sphinx installation can be found [here](https://www.sphinx-doc.org/en/master/usage/installation.html).
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# aind-data-schema-models
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+

|
|
5
|
+
[](https://github.com/semantic-release/semantic-release)
|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
To install from pypi, run
|
|
12
|
+
```bash
|
|
13
|
+
pip install aind-data-schema-models
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
To install from source, in the root directory, run
|
|
17
|
+
```bash
|
|
18
|
+
pip install -e .
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
To develop the code, run
|
|
22
|
+
```bash
|
|
23
|
+
pip install -e .[dev]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Contributing
|
|
27
|
+
|
|
28
|
+
### Linters and testing
|
|
29
|
+
|
|
30
|
+
There are several libraries used to run linters, check documentation, and run tests.
|
|
31
|
+
|
|
32
|
+
- Please test your changes using the **coverage** library, which will run the tests and log a coverage report:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
coverage run -m unittest discover && coverage report
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- Use **interrogate** to check that modules, methods, etc. have been documented thoroughly:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
interrogate .
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- Use **flake8** to check that code is up to standards (no unused imports, etc.):
|
|
45
|
+
```bash
|
|
46
|
+
flake8 .
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- Use **black** to automatically format the code into PEP standards:
|
|
50
|
+
```bash
|
|
51
|
+
black .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- Use **isort** to automatically sort import statements:
|
|
55
|
+
```bash
|
|
56
|
+
isort .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Pull requests
|
|
60
|
+
|
|
61
|
+
For internal members, please create a branch. For external members, please fork the repository and open a pull request from the fork. We'll primarily use [Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit) style for commit messages. Roughly, they should follow the pattern:
|
|
62
|
+
```text
|
|
63
|
+
<type>(<scope>): <short summary>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
where scope (optional) describes the packages affected by the code changes and type (mandatory) is one of:
|
|
67
|
+
|
|
68
|
+
- **build**: Changes that affect build tools or external dependencies (example scopes: pyproject.toml, setup.py)
|
|
69
|
+
- **ci**: Changes to our CI configuration files and scripts (examples: .github/workflows/ci.yml)
|
|
70
|
+
- **docs**: Documentation only changes
|
|
71
|
+
- **feat**: A new feature
|
|
72
|
+
- **fix**: A bugfix
|
|
73
|
+
- **perf**: A code change that improves performance
|
|
74
|
+
- **refactor**: A code change that neither fixes a bug nor adds a feature
|
|
75
|
+
- **test**: Adding missing tests or correcting existing tests
|
|
76
|
+
|
|
77
|
+
### Semantic Release
|
|
78
|
+
|
|
79
|
+
The table below, from [semantic release](https://github.com/semantic-release/semantic-release), shows which commit message gets you which release type when `semantic-release` runs (using the default configuration):
|
|
80
|
+
|
|
81
|
+
| Commit message | Release type |
|
|
82
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
|
|
83
|
+
| `fix(pencil): stop graphite breaking when too much pressure applied` | ~~Patch~~ Fix Release, Default release |
|
|
84
|
+
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
|
|
85
|
+
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release <br /> (Note that the `BREAKING CHANGE: ` token must be in the footer of the commit) |
|
|
86
|
+
|
|
87
|
+
### Documentation
|
|
88
|
+
To generate the rst files source files for documentation, run
|
|
89
|
+
```bash
|
|
90
|
+
sphinx-apidoc -o doc_template/source/ src
|
|
91
|
+
```
|
|
92
|
+
Then to create the documentation HTML files, run
|
|
93
|
+
```bash
|
|
94
|
+
sphinx-build -b html doc_template/source/ doc_template/build/html
|
|
95
|
+
```
|
|
96
|
+
More info on sphinx installation can be found [here](https://www.sphinx-doc.org/en/master/usage/installation.html).
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = source
|
|
9
|
+
BUILDDIR = build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
pushd %~dp0
|
|
4
|
+
|
|
5
|
+
REM Command file for Sphinx documentation
|
|
6
|
+
|
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
|
8
|
+
set SPHINXBUILD=sphinx-build
|
|
9
|
+
)
|
|
10
|
+
set SOURCEDIR=source
|
|
11
|
+
set BUILDDIR=build
|
|
12
|
+
|
|
13
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
14
|
+
if errorlevel 9009 (
|
|
15
|
+
echo.
|
|
16
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
17
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
18
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
19
|
+
echo.may add the Sphinx directory to PATH.
|
|
20
|
+
echo.
|
|
21
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
22
|
+
echo.https://www.sphinx-doc.org/
|
|
23
|
+
exit /b 1
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
if "%1" == "" goto help
|
|
27
|
+
|
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
29
|
+
goto end
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
33
|
+
|
|
34
|
+
:end
|
|
35
|
+
popd
|