openlifu 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.
Files changed (156) hide show
  1. openlifu-0.1.0/.dvc/.gitignore +3 -0
  2. openlifu-0.1.0/.dvc/config +7 -0
  3. openlifu-0.1.0/.dvcignore +3 -0
  4. openlifu-0.1.0/.git_archival.txt +4 -0
  5. openlifu-0.1.0/.gitattributes +1 -0
  6. openlifu-0.1.0/.github/CONTRIBUTING.md +107 -0
  7. openlifu-0.1.0/.github/dependabot.yml +17 -0
  8. openlifu-0.1.0/.github/matchers/pylint.json +32 -0
  9. openlifu-0.1.0/.github/workflows/cd.yml +50 -0
  10. openlifu-0.1.0/.github/workflows/ci.yml +73 -0
  11. openlifu-0.1.0/.gitignore +162 -0
  12. openlifu-0.1.0/.pre-commit-config.yaml +90 -0
  13. openlifu-0.1.0/.readthedocs.yaml +18 -0
  14. openlifu-0.1.0/LICENSE +660 -0
  15. openlifu-0.1.0/PKG-INFO +896 -0
  16. openlifu-0.1.0/README.rst +175 -0
  17. openlifu-0.1.0/db_dvc.dvc +6 -0
  18. openlifu-0.1.0/docs/Makefile +20 -0
  19. openlifu-0.1.0/docs/_static/.gitkeep +0 -0
  20. openlifu-0.1.0/docs/_templates/custom-class-template.rst +7 -0
  21. openlifu-0.1.0/docs/_templates/custom-module-template.rst +66 -0
  22. openlifu-0.1.0/docs/api.rst +11 -0
  23. openlifu-0.1.0/docs/conf.py +75 -0
  24. openlifu-0.1.0/docs/includeme.rst +5 -0
  25. openlifu-0.1.0/docs/index.rst +16 -0
  26. openlifu-0.1.0/docs/make.bat +35 -0
  27. openlifu-0.1.0/notebooks/LIFUTestWidget.py +249 -0
  28. openlifu-0.1.0/notebooks/OpenLIFU_2x_1.json +1931 -0
  29. openlifu-0.1.0/notebooks/README.md +25 -0
  30. openlifu-0.1.0/notebooks/pinmap.json +969 -0
  31. openlifu-0.1.0/notebooks/run_self_test.py +27 -0
  32. openlifu-0.1.0/notebooks/stress_test.py +94 -0
  33. openlifu-0.1.0/notebooks/test_console.py +129 -0
  34. openlifu-0.1.0/notebooks/test_first.py +132 -0
  35. openlifu-0.1.0/notebooks/test_multiple_modules.py +45 -0
  36. openlifu-0.1.0/notebooks/test_nifti.py +106 -0
  37. openlifu-0.1.0/notebooks/test_nucleo.py +119 -0
  38. openlifu-0.1.0/notebooks/test_registers.py +158 -0
  39. openlifu-0.1.0/notebooks/test_reset.py +26 -0
  40. openlifu-0.1.0/notebooks/test_solution.py +80 -0
  41. openlifu-0.1.0/notebooks/test_temp.py +59 -0
  42. openlifu-0.1.0/notebooks/test_ti_cfg.py +74 -0
  43. openlifu-0.1.0/notebooks/test_transmitter.py +72 -0
  44. openlifu-0.1.0/notebooks/test_updated_if.py +161 -0
  45. openlifu-0.1.0/notebooks/test_updated_pwr.py +88 -0
  46. openlifu-0.1.0/notebooks/test_watertank.py +162 -0
  47. openlifu-0.1.0/notebooks/ti_example.cfg +400 -0
  48. openlifu-0.1.0/noxfile.py +119 -0
  49. openlifu-0.1.0/pyproject.toml +253 -0
  50. openlifu-0.1.0/scripts/standardize_database.py +88 -0
  51. openlifu-0.1.0/src/openlifu/__init__.py +71 -0
  52. openlifu-0.1.0/src/openlifu/_version.py +21 -0
  53. openlifu-0.1.0/src/openlifu/_version.pyi +4 -0
  54. openlifu-0.1.0/src/openlifu/bf/__init__.py +17 -0
  55. openlifu-0.1.0/src/openlifu/bf/apod_methods/__init__.py +13 -0
  56. openlifu-0.1.0/src/openlifu/bf/apod_methods/apodmethod.py +32 -0
  57. openlifu-0.1.0/src/openlifu/bf/apod_methods/maxangle.py +29 -0
  58. openlifu-0.1.0/src/openlifu/bf/apod_methods/piecewiselinear.py +33 -0
  59. openlifu-0.1.0/src/openlifu/bf/apod_methods/uniform.py +21 -0
  60. openlifu-0.1.0/src/openlifu/bf/delay_methods/__init__.py +9 -0
  61. openlifu-0.1.0/src/openlifu/bf/delay_methods/delaymethod.py +31 -0
  62. openlifu-0.1.0/src/openlifu/bf/delay_methods/direct.py +30 -0
  63. openlifu-0.1.0/src/openlifu/bf/focal_patterns/__init__.py +11 -0
  64. openlifu-0.1.0/src/openlifu/bf/focal_patterns/focal_pattern.py +65 -0
  65. openlifu-0.1.0/src/openlifu/bf/focal_patterns/single.py +31 -0
  66. openlifu-0.1.0/src/openlifu/bf/focal_patterns/wheel.py +63 -0
  67. openlifu-0.1.0/src/openlifu/bf/pulse.py +55 -0
  68. openlifu-0.1.0/src/openlifu/bf/sequence.py +54 -0
  69. openlifu-0.1.0/src/openlifu/db/__init__.py +13 -0
  70. openlifu-0.1.0/src/openlifu/db/database.py +1190 -0
  71. openlifu-0.1.0/src/openlifu/db/session.py +231 -0
  72. openlifu-0.1.0/src/openlifu/db/subject.py +55 -0
  73. openlifu-0.1.0/src/openlifu/db/user.py +78 -0
  74. openlifu-0.1.0/src/openlifu/geo.py +273 -0
  75. openlifu-0.1.0/src/openlifu/io/LIFUConfig.py +73 -0
  76. openlifu-0.1.0/src/openlifu/io/LIFUHVController.py +866 -0
  77. openlifu-0.1.0/src/openlifu/io/LIFUInterface.py +227 -0
  78. openlifu-0.1.0/src/openlifu/io/LIFUSignal.py +38 -0
  79. openlifu-0.1.0/src/openlifu/io/LIFUTXDevice.py +2052 -0
  80. openlifu-0.1.0/src/openlifu/io/LIFUUart.py +484 -0
  81. openlifu-0.1.0/src/openlifu/io/__init__.py +8 -0
  82. openlifu-0.1.0/src/openlifu/meshroom_pipelines/__init__.py +0 -0
  83. openlifu-0.1.0/src/openlifu/meshroom_pipelines/default_pipeline.mg +180 -0
  84. openlifu-0.1.0/src/openlifu/photoscan.py +322 -0
  85. openlifu-0.1.0/src/openlifu/plan/__init__.py +16 -0
  86. openlifu-0.1.0/src/openlifu/plan/protocol.py +346 -0
  87. openlifu-0.1.0/src/openlifu/plan/run.py +88 -0
  88. openlifu-0.1.0/src/openlifu/plan/solution.py +452 -0
  89. openlifu-0.1.0/src/openlifu/plan/solution_analysis.py +386 -0
  90. openlifu-0.1.0/src/openlifu/plan/target_constraints.py +41 -0
  91. openlifu-0.1.0/src/openlifu/py.typed +0 -0
  92. openlifu-0.1.0/src/openlifu/seg/__init__.py +15 -0
  93. openlifu-0.1.0/src/openlifu/seg/material.py +127 -0
  94. openlifu-0.1.0/src/openlifu/seg/seg_methods/__init__.py +14 -0
  95. openlifu-0.1.0/src/openlifu/seg/seg_methods/seg_method.py +96 -0
  96. openlifu-0.1.0/src/openlifu/seg/seg_methods/tissue.py +13 -0
  97. openlifu-0.1.0/src/openlifu/seg/seg_methods/water.py +13 -0
  98. openlifu-0.1.0/src/openlifu/seg/skinseg.py +422 -0
  99. openlifu-0.1.0/src/openlifu/sim/__init__.py +11 -0
  100. openlifu-0.1.0/src/openlifu/sim/kwave_if.py +130 -0
  101. openlifu-0.1.0/src/openlifu/sim/sim_setup.py +165 -0
  102. openlifu-0.1.0/src/openlifu/util/annotations.py +25 -0
  103. openlifu-0.1.0/src/openlifu/util/checkgpu.py +14 -0
  104. openlifu-0.1.0/src/openlifu/util/dict_conversion.py +40 -0
  105. openlifu-0.1.0/src/openlifu/util/json.py +46 -0
  106. openlifu-0.1.0/src/openlifu/util/strings.py +41 -0
  107. openlifu-0.1.0/src/openlifu/util/units.py +244 -0
  108. openlifu-0.1.0/src/openlifu/virtual_fit.py +276 -0
  109. openlifu-0.1.0/src/openlifu/xdc/__init__.py +12 -0
  110. openlifu-0.1.0/src/openlifu/xdc/element.py +230 -0
  111. openlifu-0.1.0/src/openlifu/xdc/transducer.py +294 -0
  112. openlifu-0.1.0/tests/helpers.py +36 -0
  113. openlifu-0.1.0/tests/resources/example_db/protocols/example_protocol/example_protocol.json +122 -0
  114. openlifu-0.1.0/tests/resources/example_db/protocols/protocols.json +3 -0
  115. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/example_subject.json +5 -0
  116. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/example_session.json +71 -0
  117. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/photoscans/example_photoscan/example_photoscan.json +7 -0
  118. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/photoscans/example_photoscan/example_photoscan.obj +38 -0
  119. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/photoscans/example_photoscan/example_photoscan_texture.exr +0 -0
  120. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/photoscans/photoscans.json +1 -0
  121. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/runs/example_run/example_run.json +7 -0
  122. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/runs/example_run/example_run_protocol_snapshot.json +93 -0
  123. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/runs/example_run/example_run_session_snapshot.json +30 -0
  124. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/runs/runs.json +3 -0
  125. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/solutions/example_solution/example_solution.json +72 -0
  126. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/solutions/example_solution/example_solution.nc +0 -0
  127. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/solutions/example_solution/example_solution_analysis.json +18 -0
  128. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/example_session/solutions/solutions.json +3 -0
  129. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/sessions/sessions.json +3 -0
  130. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/volumes/example_volume/example_volume.json +5 -0
  131. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/volumes/example_volume/example_volume.nii +0 -0
  132. openlifu-0.1.0/tests/resources/example_db/subjects/example_subject/volumes/volumes.json +3 -0
  133. openlifu-0.1.0/tests/resources/example_db/subjects/subjects.json +3 -0
  134. openlifu-0.1.0/tests/resources/example_db/systems/systems.json +3 -0
  135. openlifu-0.1.0/tests/resources/example_db/transducers/example_transducer/example_transducer.json +975 -0
  136. openlifu-0.1.0/tests/resources/example_db/transducers/transducers.json +1 -0
  137. openlifu-0.1.0/tests/resources/example_db/users/example_user/example_user.json +7 -0
  138. openlifu-0.1.0/tests/resources/example_db/users/users.json +1 -0
  139. openlifu-0.1.0/tests/test_database.py +745 -0
  140. openlifu-0.1.0/tests/test_geo.py +102 -0
  141. openlifu-0.1.0/tests/test_offset_grid.py +58 -0
  142. openlifu-0.1.0/tests/test_package.py +9 -0
  143. openlifu-0.1.0/tests/test_photoscans.py +139 -0
  144. openlifu-0.1.0/tests/test_point.py +28 -0
  145. openlifu-0.1.0/tests/test_protocol.py +136 -0
  146. openlifu-0.1.0/tests/test_run.py +36 -0
  147. openlifu-0.1.0/tests/test_seg_method.py +35 -0
  148. openlifu-0.1.0/tests/test_sequence.py +12 -0
  149. openlifu-0.1.0/tests/test_sim.py +47 -0
  150. openlifu-0.1.0/tests/test_skinseg.py +195 -0
  151. openlifu-0.1.0/tests/test_solution.py +157 -0
  152. openlifu-0.1.0/tests/test_sonication_control_mock.py +42 -0
  153. openlifu-0.1.0/tests/test_transducer.py +91 -0
  154. openlifu-0.1.0/tests/test_units.py +84 -0
  155. openlifu-0.1.0/tests/test_user.py +20 -0
  156. openlifu-0.1.0/tests/test_virtual_fit.py +24 -0
@@ -0,0 +1,3 @@
1
+ /config.local
2
+ /tmp
3
+ /cache
@@ -0,0 +1,7 @@
1
+ [core]
2
+ remote = shared_gdrive
3
+ autostage = true
4
+ ['remote "shared_gdrive"']
5
+ url = gdrive://1rGAzqdikeTUzUQADjdP7-fTPdfF15eaO
6
+ gdrive_acknowledge_abuse = true
7
+ gdrive_client_id = 78626142150-1ikhqfnmr5p1aa63ji5opa7gveeksn90.apps.googleusercontent.com
@@ -0,0 +1,3 @@
1
+ # Add patterns of files dvc should ignore, which could improve
2
+ # the performance. Learn more at
3
+ # https://dvc.org/doc/user-guide/dvcignore
@@ -0,0 +1,4 @@
1
+ node: $Format:%H$
2
+ node-date: $Format:%cI$
3
+ describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4
+ ref-names: $Format:%D$
@@ -0,0 +1 @@
1
+ .git_archival.txt export-subst
@@ -0,0 +1,107 @@
1
+ See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
2
+ description of best practices for developing scientific packages.
3
+
4
+ [spc-dev-intro]: https://learn.scientific-python.org/development/
5
+
6
+ # Commit and pull request expectations
7
+
8
+ - Every commit should reference the issue number with which it is associated.
9
+ - Commits should be reasonably granular and semantically atomic.
10
+ - Pull requests should not be squashed upon merging.
11
+
12
+ # Quick development
13
+
14
+ The fastest way to start with development is to use nox. If you don't have nox,
15
+ you can use `pipx run nox` to run it without installing, or `pipx install nox`.
16
+ If you don't have pipx (pip for applications), then you can install with
17
+ `pip install pipx` (the only case were installing an application with regular
18
+ pip is reasonable). If you use macOS, then pipx and nox are both in brew, use
19
+ `brew install pipx nox`.
20
+
21
+ To use, run `nox`. This will lint and test using every installed version of
22
+ Python on your system, skipping ones that are not installed. You can also run
23
+ specific jobs:
24
+
25
+ ```console
26
+ $ nox -s lint # Lint only
27
+ $ nox -s tests # Python tests
28
+ $ nox -s docs -- --serve # Build and serve the docs
29
+ $ nox -s build # Make an SDist and wheel
30
+ ```
31
+
32
+ Nox handles everything for you, including setting up an temporary virtual
33
+ environment for each run.
34
+
35
+ # Setting up a development environment manually
36
+
37
+ You can set up a development environment by running:
38
+
39
+ ```bash
40
+ python3 -m venv .venv
41
+ source ./.venv/bin/activate
42
+ pip install -v -e '.[dev]'
43
+ ```
44
+
45
+ If you have the
46
+ [Python Launcher for Unix](https://github.com/brettcannon/python-launcher), you
47
+ can instead do:
48
+
49
+ ```bash
50
+ py -m venv .venv
51
+ py -m install -v -e '.[dev]'
52
+ ```
53
+
54
+ # Post setup
55
+
56
+ You should prepare pre-commit, which will help you by checking that commits pass
57
+ required checks:
58
+
59
+ ```bash
60
+ pip install pre-commit # or brew install pre-commit on macOS
61
+ pre-commit install # Will install a pre-commit hook into the git repo
62
+ ```
63
+
64
+ You can also/alternatively run `pre-commit run` (changes only) or
65
+ `pre-commit run --all-files` to check even without installing the hook.
66
+
67
+ # Testing
68
+
69
+ Use pytest to run the unit checks:
70
+
71
+ ```bash
72
+ pytest
73
+ ```
74
+
75
+ # Coverage
76
+
77
+ Use pytest-cov to generate coverage reports:
78
+
79
+ ```bash
80
+ pytest --cov=openlifu
81
+ ```
82
+
83
+ # Building docs
84
+
85
+ You can build the docs using:
86
+
87
+ ```bash
88
+ nox -s docs
89
+ ```
90
+
91
+ You can see a preview with:
92
+
93
+ ```bash
94
+ nox -s docs -- --serve
95
+ ```
96
+
97
+ # Pre-commit
98
+
99
+ This project uses pre-commit for all style checking. While you can run it with
100
+ nox, this is such an important tool that it deserves to be installed on its own.
101
+ Install pre-commit and run:
102
+
103
+ ```bash
104
+ pre-commit run -a
105
+ ```
106
+
107
+ to check all files.
@@ -0,0 +1,17 @@
1
+ version: 2
2
+ updates:
3
+ # Maintain dependencies for GitHub Actions
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ groups:
9
+ actions:
10
+ patterns:
11
+ - "*"
12
+
13
+ # Maintain dependencies for Python
14
+ - package-ecosystem: "pip"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "weekly"
@@ -0,0 +1,32 @@
1
+ {
2
+ "problemMatcher": [
3
+ {
4
+ "severity": "warning",
5
+ "pattern": [
6
+ {
7
+ "regexp": "^([^:]+):(\\d+):(\\d+): ([A-DF-Z]\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
8
+ "file": 1,
9
+ "line": 2,
10
+ "column": 3,
11
+ "code": 4,
12
+ "message": 5
13
+ }
14
+ ],
15
+ "owner": "pylint-warning"
16
+ },
17
+ {
18
+ "severity": "error",
19
+ "pattern": [
20
+ {
21
+ "regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
22
+ "file": 1,
23
+ "line": 2,
24
+ "column": 3,
25
+ "code": 4,
26
+ "message": 5
27
+ }
28
+ ],
29
+ "owner": "pylint-error"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,50 @@
1
+ name: CD
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+ release:
10
+ types:
11
+ - published
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ env:
18
+ # Many color libraries just need this to be set to any value, but at least
19
+ # one distinguishes color depth, where "3" -> "256-bit color".
20
+ FORCE_COLOR: 3
21
+
22
+ jobs:
23
+ dist:
24
+ name: Distribution build
25
+ runs-on: ubuntu-latest
26
+
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ with:
30
+ fetch-depth: 0
31
+
32
+ - uses: hynek/build-and-inspect-python-package@v2
33
+
34
+ publish:
35
+ needs: [dist]
36
+ name: Publish to PyPI
37
+ environment: pypi
38
+ permissions:
39
+ id-token: write
40
+ runs-on: ubuntu-latest
41
+ if: github.event_name == 'release' && github.event.action == 'published'
42
+
43
+ steps:
44
+ - uses: actions/download-artifact@v4
45
+ with:
46
+ name: Packages
47
+ path: dist
48
+
49
+ - uses: pypa/gh-action-pypi-publish@release/v1
50
+ if: github.event_name == 'release' && github.event.action == 'published'
@@ -0,0 +1,73 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ env:
15
+ # Many color libraries just need this to be set to any value, but at least
16
+ # one distinguishes color depth, where "3" -> "256-bit color".
17
+ FORCE_COLOR: 3
18
+
19
+ jobs:
20
+ pre-commit:
21
+ name: Format
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ with:
26
+ fetch-depth: 0
27
+ - uses: actions/setup-python@v5
28
+ with:
29
+ python-version: "3.x"
30
+ - uses: pre-commit/action@v3.0.1
31
+ with:
32
+ extra_args: --hook-stage manual --all-files
33
+ - name: Run PyLint
34
+ run: |
35
+ echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
36
+ pipx run nox -s pylint
37
+
38
+ checks:
39
+ name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
40
+ runs-on: ${{ matrix.runs-on }}
41
+ needs: [pre-commit]
42
+ strategy:
43
+ fail-fast: false
44
+ matrix:
45
+ python-version: ["3.9", "3.12"]
46
+ runs-on: [ubuntu-latest, windows-latest, macos-latest]
47
+
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ with:
51
+ fetch-depth: 0
52
+
53
+ - uses: actions/setup-python@v5
54
+ with:
55
+ python-version: ${{ matrix.python-version }}
56
+ allow-prereleases: true
57
+
58
+ - name: Install system dependencies
59
+ if: runner.os == 'macOS'
60
+ run: brew install hdf5 fftw zlib libomp
61
+
62
+ - name: Install package
63
+ run: python -m pip install .[test]
64
+
65
+ - name: Test package
66
+ run: >-
67
+ python -m pytest -ra --cov --cov-report=xml --cov-report=term
68
+ --durations=20
69
+
70
+ - name: Upload coverage report
71
+ uses: codecov/codecov-action@v5.4.0
72
+ with:
73
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,162 @@
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
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
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
+ docs/_autosummary/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+ *.ipynb
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
100
+ __pypackages__/
101
+
102
+ # Celery stuff
103
+ celerybeat-schedule
104
+ celerybeat.pid
105
+
106
+ # SageMath parsed files
107
+ *.sage.py
108
+
109
+ # Environments
110
+ .env
111
+ .venv
112
+ env/
113
+ venv/
114
+ ENV/
115
+ env.bak/
116
+ venv.bak/
117
+
118
+ # Spyder project settings
119
+ .spyderproject
120
+ .spyproject
121
+
122
+ # Rope project settings
123
+ .ropeproject
124
+
125
+ # mkdocs documentation
126
+ /site
127
+
128
+ # mypy
129
+ .mypy_cache/
130
+ .dmypy.json
131
+ dmypy.json
132
+
133
+ # Pyre type checker
134
+ .pyre/
135
+
136
+ # pytype static type analyzer
137
+ .pytype/
138
+
139
+ # Cython debug symbols
140
+ cython_debug/
141
+
142
+ # setuptools_scm
143
+ src/*/_version.py
144
+
145
+
146
+ # ruff
147
+ .ruff_cache/
148
+
149
+ # OS specific stuff
150
+ .DS_Store
151
+ .DS_Store?
152
+ ._*
153
+ .Spotlight-V100
154
+ .Trashes
155
+ ehthumbs.db
156
+ Thumbs.db
157
+
158
+ # Common editor files
159
+ *~
160
+ *.swp
161
+ .vscode
162
+ /db_dvc
@@ -0,0 +1,90 @@
1
+ ci:
2
+ autoupdate_commit_msg: "chore: update pre-commit hooks"
3
+ autofix_commit_msg: "style: pre-commit fixes"
4
+
5
+ repos:
6
+ - repo: https://github.com/adamchainz/blacken-docs
7
+ rev: "1.16.0"
8
+ hooks:
9
+ - id: blacken-docs
10
+ additional_dependencies: [black==24.*]
11
+
12
+ - repo: https://github.com/pre-commit/pre-commit-hooks
13
+ rev: "v4.6.0"
14
+ hooks:
15
+ - id: check-added-large-files
16
+ - id: check-case-conflict
17
+ - id: check-merge-conflict
18
+ - id: check-symlinks
19
+ - id: check-yaml
20
+ - id: debug-statements
21
+ - id: end-of-file-fixer
22
+ - id: mixed-line-ending
23
+ - id: name-tests-test
24
+ args: ["--pytest-test-first"]
25
+ exclude: ^tests/helpers\.py$
26
+ - id: requirements-txt-fixer
27
+ - id: trailing-whitespace
28
+
29
+ - repo: https://github.com/pre-commit/pygrep-hooks
30
+ rev: "v1.10.0"
31
+ hooks:
32
+ - id: rst-backticks
33
+ - id: rst-directive-colons
34
+ - id: rst-inline-touching-normal
35
+
36
+ - repo: https://github.com/pre-commit/mirrors-prettier
37
+ rev: "v3.1.0"
38
+ hooks:
39
+ - id: prettier
40
+ types_or: [yaml, markdown, html, css, scss, javascript, json]
41
+ args: [--prose-wrap=always]
42
+
43
+ - repo: https://github.com/astral-sh/ruff-pre-commit
44
+ rev: "v0.4.1"
45
+ hooks:
46
+ - id: ruff
47
+ args: ["--fix", "--show-fixes"]
48
+ # - id: ruff-format # Omitting ruff-format for now
49
+
50
+ # Disabling static typechecking for now!
51
+ # - repo: https://github.com/pre-commit/mirrors-mypy
52
+ # rev: "v1.9.0"
53
+ # hooks:
54
+ # - id: mypy
55
+ # files: src|tests
56
+ # args: []
57
+ # additional_dependencies:
58
+ # - pytest
59
+
60
+ - repo: https://github.com/codespell-project/codespell
61
+ rev: "v2.2.6"
62
+ hooks:
63
+ - id: codespell
64
+ exclude: .*\.ipynb # exclude notebooks because images are sometimes captured in spell check
65
+
66
+ - repo: https://github.com/shellcheck-py/shellcheck-py
67
+ rev: "v0.10.0.1"
68
+ hooks:
69
+ - id: shellcheck
70
+
71
+ - repo: local
72
+ hooks:
73
+ - id: disallow-caps
74
+ name: Disallow improper capitalization
75
+ language: pygrep
76
+ entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
77
+ exclude: .pre-commit-config.yaml
78
+
79
+ - repo: https://github.com/abravalheri/validate-pyproject
80
+ rev: "v0.16"
81
+ hooks:
82
+ - id: validate-pyproject
83
+ additional_dependencies: ["validate-pyproject-schema-store[all]"]
84
+
85
+ - repo: https://github.com/python-jsonschema/check-jsonschema
86
+ rev: "0.28.2"
87
+ hooks:
88
+ - id: check-dependabot
89
+ - id: check-github-workflows
90
+ - id: check-readthedocs
@@ -0,0 +1,18 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ version: 2
5
+
6
+ build:
7
+ os: ubuntu-22.04
8
+ tools:
9
+ python: "3.9"
10
+ sphinx:
11
+ configuration: docs/conf.py
12
+
13
+ python:
14
+ install:
15
+ - method: pip
16
+ path: .
17
+ extra_requirements:
18
+ - docs