aind-mri-utils 0.0.24__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 (56) hide show
  1. aind_mri_utils-0.0.24/.flake8 +6 -0
  2. aind_mri_utils-0.0.24/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  3. aind_mri_utils-0.0.24/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. aind_mri_utils-0.0.24/.github/ISSUE_TEMPLATE/user-story.md +27 -0
  5. aind_mri_utils-0.0.24/.github/workflows/tag_and_publish.yml +30 -0
  6. aind_mri_utils-0.0.24/.github/workflows/test_and_lint.yml +26 -0
  7. aind_mri_utils-0.0.24/.gitignore +142 -0
  8. aind_mri_utils-0.0.24/LICENSE +21 -0
  9. aind_mri_utils-0.0.24/PKG-INFO +106 -0
  10. aind_mri_utils-0.0.24/README.md +80 -0
  11. aind_mri_utils-0.0.24/doc_template/Makefile +20 -0
  12. aind_mri_utils-0.0.24/doc_template/make.bat +35 -0
  13. aind_mri_utils-0.0.24/doc_template/source/_static/dark-logo.svg +129 -0
  14. aind_mri_utils-0.0.24/doc_template/source/_static/favicon.ico +0 -0
  15. aind_mri_utils-0.0.24/doc_template/source/_static/light-logo.svg +128 -0
  16. aind_mri_utils-0.0.24/doc_template/source/conf.py +48 -0
  17. aind_mri_utils-0.0.24/pyproject.toml +82 -0
  18. aind_mri_utils-0.0.24/scripts/run_linters_and_checks.sh +24 -0
  19. aind_mri_utils-0.0.24/setup.cfg +4 -0
  20. aind_mri_utils-0.0.24/setup.py +4 -0
  21. aind_mri_utils-0.0.24/src/aind_mri_utils/__init__.py +4 -0
  22. aind_mri_utils-0.0.24/src/aind_mri_utils/coordinate_systems.py +131 -0
  23. aind_mri_utils-0.0.24/src/aind_mri_utils/file_io/__init__.py +2 -0
  24. aind_mri_utils-0.0.24/src/aind_mri_utils/file_io/image_files.py +224 -0
  25. aind_mri_utils-0.0.24/src/aind_mri_utils/file_io/obj_files.py +48 -0
  26. aind_mri_utils-0.0.24/src/aind_mri_utils/file_io/simpleitk.py +78 -0
  27. aind_mri_utils-0.0.24/src/aind_mri_utils/file_io/slicer_files.py +277 -0
  28. aind_mri_utils-0.0.24/src/aind_mri_utils/headframe_rotation.py +782 -0
  29. aind_mri_utils-0.0.24/src/aind_mri_utils/manual_keypoints.py +61 -0
  30. aind_mri_utils-0.0.24/src/aind_mri_utils/measurement.py +245 -0
  31. aind_mri_utils-0.0.24/src/aind_mri_utils/optimization.py +499 -0
  32. aind_mri_utils-0.0.24/src/aind_mri_utils/plots.py +146 -0
  33. aind_mri_utils-0.0.24/src/aind_mri_utils/rotations.py +170 -0
  34. aind_mri_utils-0.0.24/src/aind_mri_utils/sitk_volume.py +190 -0
  35. aind_mri_utils-0.0.24/src/aind_mri_utils/utils.py +130 -0
  36. aind_mri_utils-0.0.24/src/aind_mri_utils.egg-info/PKG-INFO +106 -0
  37. aind_mri_utils-0.0.24/src/aind_mri_utils.egg-info/SOURCES.txt +54 -0
  38. aind_mri_utils-0.0.24/src/aind_mri_utils.egg-info/dependency_links.txt +1 -0
  39. aind_mri_utils-0.0.24/src/aind_mri_utils.egg-info/requires.txt +15 -0
  40. aind_mri_utils-0.0.24/src/aind_mri_utils.egg-info/top_level.txt +1 -0
  41. aind_mri_utils-0.0.24/test.fcsv +6 -0
  42. aind_mri_utils-0.0.24/test2.fcsv +6 -0
  43. aind_mri_utils-0.0.24/tests/__init__.py +1 -0
  44. aind_mri_utils-0.0.24/tests/test_coordinate_systems.py +145 -0
  45. aind_mri_utils-0.0.24/tests/test_file_io_obj_files.py +73 -0
  46. aind_mri_utils-0.0.24/tests/test_file_io_simpleitk.py +78 -0
  47. aind_mri_utils-0.0.24/tests/test_file_io_slicer_files.py +96 -0
  48. aind_mri_utils-0.0.24/tests/test_headframe_rotation.py +283 -0
  49. aind_mri_utils-0.0.24/tests/test_manual_keypoints.py +29 -0
  50. aind_mri_utils-0.0.24/tests/test_measurments.py +70 -0
  51. aind_mri_utils-0.0.24/tests/test_optimization.py +185 -0
  52. aind_mri_utils-0.0.24/tests/test_plots.py +131 -0
  53. aind_mri_utils-0.0.24/tests/test_rotations.py +96 -0
  54. aind_mri_utils-0.0.24/tests/test_sitk.py +83 -0
  55. aind_mri_utils-0.0.24/tests/test_utils.py +120 -0
  56. aind_mri_utils-0.0.24/testxyz.fcsv +6 -0
@@ -0,0 +1,6 @@
1
+ [flake8]
2
+ exclude =
3
+ .git,
4
+ __pycache__,
5
+ build
6
+ max-complexity = 10
@@ -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,30 @@
1
+ name: Tag and publish
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ jobs:
7
+ tag:
8
+ uses: AllenNeuralDynamics/aind-github-actions/.github/workflows/tag.yml@main
9
+ secrets:
10
+ SERVICE_TOKEN: ${{ secrets.SERVICE_TOKEN }}
11
+ publish:
12
+ needs: tag
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Pull latest changes
17
+ run: git pull origin main
18
+ - name: Set up Python 3.8
19
+ uses: actions/setup-python@v2
20
+ with:
21
+ python-version: 3.8
22
+ - name: Install dependencies
23
+ run: |
24
+ pip install --upgrade setuptools wheel twine build
25
+ python -m build
26
+ twine check dist/*
27
+ - name: Publish on PyPI
28
+ uses: pypa/gh-action-pypi-publish@release/v1
29
+ with:
30
+ password: ${{ secrets.AIND_PYPI_TOKEN }}
@@ -0,0 +1,26 @@
1
+ name: CI
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' ]
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 linters
24
+ run: flake8 . && interrogate .
25
+ - name: Run tests and coverage
26
+ run: coverage run -m unittest discover && coverage report
@@ -0,0 +1,142 @@
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
+
141
+ # VS Code
142
+ .vscode/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 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,106 @@
1
+ Metadata-Version: 2.1
2
+ Name: aind_mri_utils
3
+ Version: 0.0.24
4
+ Summary: MRI utilities library for aind teams.
5
+ Author: Allen Institute for Neural Dynamics
6
+ Author-email: Galen Lynch <galen@galenlynch.com>, Yoni Browning <yoni.browning@alleninstitute.org>
7
+ License: MIT
8
+ Classifier: Programming Language :: Python :: 3
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: matplotlib<4,>=3
13
+ Requires-Dist: numpy<3,>=1.7
14
+ Requires-Dist: pywavefront<2,>=1.3
15
+ Requires-Dist: scipy<2,>=1
16
+ Requires-Dist: SimpleITK<3,>=2
17
+ Requires-Dist: vtk<10,>=9
18
+ Provides-Extra: dev
19
+ Requires-Dist: black; extra == "dev"
20
+ Requires-Dist: coverage; extra == "dev"
21
+ Requires-Dist: flake8; extra == "dev"
22
+ Requires-Dist: interrogate; extra == "dev"
23
+ Requires-Dist: isort; extra == "dev"
24
+ Requires-Dist: Sphinx; extra == "dev"
25
+ Requires-Dist: furo; extra == "dev"
26
+
27
+ # aind-mri-utils
28
+
29
+ [![License](https://img.shields.io/badge/license-MIT-brightgreen)](LICENSE)
30
+ ![Code Style](https://img.shields.io/badge/code%20style-black-black)
31
+ [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
32
+
33
+ Library for aind mri utilities.
34
+
35
+ ## Installation
36
+ To use the software, in the root directory, run
37
+ ```bash
38
+ pip install -e .
39
+ ```
40
+
41
+ To develop the code, run
42
+ ```bash
43
+ pip install -e .[dev]
44
+ ```
45
+
46
+ ## Contributing
47
+
48
+ ### Linters and testing
49
+
50
+ There are several libraries used to run linters, check documentation, and run tests.
51
+
52
+ - Please test your changes using the **coverage** library, which will run the tests and log a coverage report:
53
+
54
+ ```bash
55
+ coverage run -m unittest discover && coverage report
56
+ ```
57
+
58
+ - Use **interrogate** to check that modules, methods, etc. have been documented thoroughly:
59
+
60
+ ```bash
61
+ interrogate .
62
+ ```
63
+
64
+ - Use **flake8** to check that code is up to standards (no unused imports, etc.):
65
+ ```bash
66
+ flake8 .
67
+ ```
68
+
69
+ - Use **black** to automatically format the code into PEP standards:
70
+ ```bash
71
+ black .
72
+ ```
73
+
74
+ - Use **isort** to automatically sort import statements:
75
+ ```bash
76
+ isort .
77
+ ```
78
+
79
+ ### Pull requests
80
+
81
+ 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:
82
+ ```text
83
+ <type>(<scope>): <short summary>
84
+ ```
85
+
86
+ where scope (optional) describes the packages affected by the code changes and type (mandatory) is one of:
87
+
88
+ - **build**: Changes that affect build tools or external dependencies (example scopes: pyproject.toml, setup.py)
89
+ - **ci**: Changes to our CI configuration files and scripts (examples: .github/workflows/ci.yml)
90
+ - **docs**: Documentation only changes
91
+ - **feat**: A new feature
92
+ - **fix**: A bugfix
93
+ - **perf**: A code change that improves performance
94
+ - **refactor**: A code change that neither fixes a bug nor adds a feature
95
+ - **test**: Adding missing tests or correcting existing tests
96
+
97
+ ### Documentation
98
+ To generate the rst files source files for documentation, run
99
+ ```bash
100
+ sphinx-apidoc -o doc_template/source/ src
101
+ ```
102
+ Then to create the documentation HTML files, run
103
+ ```bash
104
+ sphinx-build -b html doc_template/source/ doc_template/build/html
105
+ ```
106
+ More info on sphinx installation can be found [here](https://www.sphinx-doc.org/en/master/usage/installation.html).
@@ -0,0 +1,80 @@
1
+ # aind-mri-utils
2
+
3
+ [![License](https://img.shields.io/badge/license-MIT-brightgreen)](LICENSE)
4
+ ![Code Style](https://img.shields.io/badge/code%20style-black-black)
5
+ [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
6
+
7
+ Library for aind mri utilities.
8
+
9
+ ## Installation
10
+ To use the software, in the root directory, run
11
+ ```bash
12
+ pip install -e .
13
+ ```
14
+
15
+ To develop the code, run
16
+ ```bash
17
+ pip install -e .[dev]
18
+ ```
19
+
20
+ ## Contributing
21
+
22
+ ### Linters and testing
23
+
24
+ There are several libraries used to run linters, check documentation, and run tests.
25
+
26
+ - Please test your changes using the **coverage** library, which will run the tests and log a coverage report:
27
+
28
+ ```bash
29
+ coverage run -m unittest discover && coverage report
30
+ ```
31
+
32
+ - Use **interrogate** to check that modules, methods, etc. have been documented thoroughly:
33
+
34
+ ```bash
35
+ interrogate .
36
+ ```
37
+
38
+ - Use **flake8** to check that code is up to standards (no unused imports, etc.):
39
+ ```bash
40
+ flake8 .
41
+ ```
42
+
43
+ - Use **black** to automatically format the code into PEP standards:
44
+ ```bash
45
+ black .
46
+ ```
47
+
48
+ - Use **isort** to automatically sort import statements:
49
+ ```bash
50
+ isort .
51
+ ```
52
+
53
+ ### Pull requests
54
+
55
+ 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:
56
+ ```text
57
+ <type>(<scope>): <short summary>
58
+ ```
59
+
60
+ where scope (optional) describes the packages affected by the code changes and type (mandatory) is one of:
61
+
62
+ - **build**: Changes that affect build tools or external dependencies (example scopes: pyproject.toml, setup.py)
63
+ - **ci**: Changes to our CI configuration files and scripts (examples: .github/workflows/ci.yml)
64
+ - **docs**: Documentation only changes
65
+ - **feat**: A new feature
66
+ - **fix**: A bugfix
67
+ - **perf**: A code change that improves performance
68
+ - **refactor**: A code change that neither fixes a bug nor adds a feature
69
+ - **test**: Adding missing tests or correcting existing tests
70
+
71
+ ### Documentation
72
+ To generate the rst files source files for documentation, run
73
+ ```bash
74
+ sphinx-apidoc -o doc_template/source/ src
75
+ ```
76
+ Then to create the documentation HTML files, run
77
+ ```bash
78
+ sphinx-build -b html doc_template/source/ doc_template/build/html
79
+ ```
80
+ 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