pyfsviz 0.1.1__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 (52) hide show
  1. pyfsviz-0.1.1/CHANGELOG.md +31 -0
  2. pyfsviz-0.1.1/CODE_OF_CONDUCT.md +84 -0
  3. pyfsviz-0.1.1/CONTRIBUTING.md +122 -0
  4. pyfsviz-0.1.1/LICENSE +21 -0
  5. pyfsviz-0.1.1/PKG-INFO +57 -0
  6. pyfsviz-0.1.1/README.md +19 -0
  7. pyfsviz-0.1.1/config/coverage.ini +25 -0
  8. pyfsviz-0.1.1/config/git-changelog.toml +9 -0
  9. pyfsviz-0.1.1/config/mypy.ini +5 -0
  10. pyfsviz-0.1.1/config/pytest.ini +16 -0
  11. pyfsviz-0.1.1/config/pytest_39.ini +17 -0
  12. pyfsviz-0.1.1/config/ruff.toml +92 -0
  13. pyfsviz-0.1.1/config/vscode/launch.json +57 -0
  14. pyfsviz-0.1.1/config/vscode/settings.json +33 -0
  15. pyfsviz-0.1.1/config/vscode/tasks.json +97 -0
  16. pyfsviz-0.1.1/docs/.overrides/partials/comments.html +57 -0
  17. pyfsviz-0.1.1/docs/.overrides/partials/path-item.html +22 -0
  18. pyfsviz-0.1.1/docs/changelog.md +5 -0
  19. pyfsviz-0.1.1/docs/code_of_conduct.md +5 -0
  20. pyfsviz-0.1.1/docs/contributing.md +5 -0
  21. pyfsviz-0.1.1/docs/credits.md +9 -0
  22. pyfsviz-0.1.1/docs/css/colors.css +4 -0
  23. pyfsviz-0.1.1/docs/css/material.css +4 -0
  24. pyfsviz-0.1.1/docs/css/mkdocstrings.css +72 -0
  25. pyfsviz-0.1.1/docs/index.md +7 -0
  26. pyfsviz-0.1.1/docs/js/feedback.js +14 -0
  27. pyfsviz-0.1.1/docs/license.md +11 -0
  28. pyfsviz-0.1.1/duties.py +220 -0
  29. pyfsviz-0.1.1/mkdocs.yml +153 -0
  30. pyfsviz-0.1.1/pyproject.toml +125 -0
  31. pyfsviz-0.1.1/scripts/gen_credits.py +178 -0
  32. pyfsviz-0.1.1/scripts/get_version.py +31 -0
  33. pyfsviz-0.1.1/scripts/make +1 -0
  34. pyfsviz-0.1.1/scripts/make.py +224 -0
  35. pyfsviz-0.1.1/src/pyfsviz/__init__.py +26 -0
  36. pyfsviz-0.1.1/src/pyfsviz/__main__.py +14 -0
  37. pyfsviz-0.1.1/src/pyfsviz/_internal/__init__.py +0 -0
  38. pyfsviz-0.1.1/src/pyfsviz/_internal/cli.py +59 -0
  39. pyfsviz-0.1.1/src/pyfsviz/_internal/debug.py +110 -0
  40. pyfsviz-0.1.1/src/pyfsviz/_internal/html/individual.html +120 -0
  41. pyfsviz-0.1.1/src/pyfsviz/_internal/mni305.cor.mgz +0 -0
  42. pyfsviz-0.1.1/src/pyfsviz/_internal/mni305.cor.nii.gz +0 -0
  43. pyfsviz-0.1.1/src/pyfsviz/freesurfer.py +616 -0
  44. pyfsviz-0.1.1/src/pyfsviz/py.typed +0 -0
  45. pyfsviz-0.1.1/src/pyfsviz/reports.py +48 -0
  46. pyfsviz-0.1.1/tests/__init__.py +7 -0
  47. pyfsviz-0.1.1/tests/conftest.py +63 -0
  48. pyfsviz-0.1.1/tests/test_api.py +196 -0
  49. pyfsviz-0.1.1/tests/test_cli.py +55 -0
  50. pyfsviz-0.1.1/tests/test_data_generator.py +400 -0
  51. pyfsviz-0.1.1/tests/test_freesurfer.py +140 -0
  52. pyfsviz-0.1.1/tests/test_reports.py +727 -0
@@ -0,0 +1,31 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+ <!-- insertion marker -->
9
+ ## [0.1.1](https://github.com/mcw-meier-lab/pyFSViz/releases/tag/0.1.1) - 2025-10-28
10
+
11
+ <small>[Compare with 0.1.0](https://github.com/mcw-meier-lab/pyFSViz/compare/0.1.0...0.1.1)</small>
12
+
13
+ ## [0.1.0](https://github.com/mcw-meier-lab/pyFSViz/releases/tag/0.1.0) - 2025-10-27
14
+
15
+ <small>[Compare with first commit](https://github.com/mcw-meier-lab/pyFSViz/compare/2acb6743e94b41c05bfeed9c5a1c94f2b566483a...0.1.0)</small>
16
+
17
+ ### Build
18
+
19
+ - drop python 3.9 ([4b21f95](https://github.com/mcw-meier-lab/pyFSViz/commit/4b21f955150bfaefe3c1aa6e68490636f05ee907) by Lezlie Espana).
20
+
21
+ ### Features
22
+
23
+ - inital commit ([2acb674](https://github.com/mcw-meier-lab/pyFSViz/commit/2acb6743e94b41c05bfeed9c5a1c94f2b566483a) by Lezlie Espana).
24
+
25
+ ### Code Refactoring
26
+
27
+ - add batch html report workflow ([10d6423](https://github.com/mcw-meier-lab/pyFSViz/commit/10d64237dad1f8b46496b25a0f2c63dc254134b6) by Lezlie Espana).
28
+ - add initial html reports ([d118911](https://github.com/mcw-meier-lab/pyFSViz/commit/d118911420a0e886e2a0c6fa1aa1fd128057d0af) by Lezlie Espana).
29
+ - add initial figure generation ([0ff4807](https://github.com/mcw-meier-lab/pyFSViz/commit/0ff48073e87e9f17b1e9ba6abf42b30759cf06c0) by Lezlie Espana).
30
+ - style, typing, testing ([fb176fa](https://github.com/mcw-meier-lab/pyFSViz/commit/fb176faf46bdc7351ea030fd617dfef36fc6b3dd) by Lezlie Espana).
31
+ - add initial fs class ([53864e8](https://github.com/mcw-meier-lab/pyFSViz/commit/53864e8a5168e8ab5ec8016998a81109d444bc6e) by Lezlie Espana).
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
22
+ * Trolling, insulting or derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at lespana@mcw.edu. All complaints will be reviewed and investigated promptly and fairly.
40
+
41
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
+
43
+ ## Enforcement Guidelines
44
+
45
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
+
47
+ ### 1. Correction
48
+
49
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
+
51
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
+
53
+ ### 2. Warning
54
+
55
+ **Community Impact**: A violation through a single incident or series of actions.
56
+
57
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
+
59
+ ### 3. Temporary Ban
60
+
61
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
+
63
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
+
65
+ ### 4. Permanent Ban
66
+
67
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
+
69
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
70
+
71
+ ## Attribution
72
+
73
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
+
75
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
+
77
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
+
79
+ [homepage]: https://www.contributor-covenant.org
80
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
+ [Mozilla CoC]: https://github.com/mozilla/diversity
82
+ [FAQ]: https://www.contributor-covenant.org/faq
83
+ [translations]: https://www.contributor-covenant.org/translations
84
+
@@ -0,0 +1,122 @@
1
+ # Contributing
2
+
3
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
4
+
5
+ ## Environment setup
6
+
7
+ Nothing easier!
8
+
9
+ Fork and clone the repository, then:
10
+
11
+ ```bash
12
+ cd pyFSViz
13
+ make setup
14
+ ```
15
+
16
+ > NOTE: If it fails for some reason, you'll need to install [uv](https://github.com/astral-sh/uv) manually.
17
+ >
18
+ > You can install it with:
19
+ >
20
+ > ```bash
21
+ > curl -LsSf https://astral.sh/uv/install.sh | sh
22
+ > ```
23
+ >
24
+ > Now you can try running `make setup` again, or simply `uv sync`.
25
+
26
+ You now have the dependencies installed.
27
+
28
+ You can run the application with `make run pyfsviz [ARGS...]`.
29
+
30
+ Run `make help` to see all the available actions!
31
+
32
+ ## Tasks
33
+
34
+ The entry-point to run commands and tasks is the `make` Python script, located in the `scripts` directory. Try running `make` to show the available commands and tasks. The *commands* do not need the Python dependencies to be installed,
35
+ while the *tasks* do. The cross-platform tasks are written in Python, thanks to [duty](https://github.com/pawamoy/duty).
36
+
37
+ If you work in VSCode, we provide [an action to configure VSCode](https://pawamoy.github.io/copier-uv/work/#vscode-setup) for the project.
38
+
39
+ ## Development
40
+
41
+ As usual:
42
+
43
+ 1. create a new branch: `git switch -c feature-or-bugfix-name`
44
+ 1. edit the code and/or the documentation
45
+
46
+ **Before committing:**
47
+
48
+ 1. run `make format` to auto-format the code
49
+ 1. run `make check` to check everything (fix any warning)
50
+ 1. run `make test` to run the tests (fix any issue)
51
+ 1. if you updated the documentation or the project dependencies:
52
+ 1. run `make docs`
53
+ 1. go to http://localhost:8000 and check that everything looks good
54
+ 1. follow our [commit message convention](#commit-message-convention)
55
+
56
+ If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.
57
+
58
+ Don't bother updating the changelog, we will take care of this.
59
+
60
+ ## Commit message convention
61
+
62
+ Commit messages must follow our convention based on the [Angular style](https://gist.github.com/stephenparish/9941e89d80e2bc58a153#format-of-the-commit-message) or the [Karma convention](https://karma-runner.github.io/4.0/dev/git-commit-msg.html):
63
+
64
+ ```
65
+ <type>[(scope)]: Subject
66
+
67
+ [Body]
68
+ ```
69
+
70
+ **Subject and body must be valid Markdown.** Subject must have proper casing (uppercase for first letter if it makes sense), but no dot at the end, and no punctuation in general.
71
+
72
+ Scope and body are optional. Type can be:
73
+
74
+ - `build`: About packaging, building wheels, etc.
75
+ - `chore`: About packaging or repo/files management.
76
+ - `ci`: About Continuous Integration.
77
+ - `deps`: Dependencies update.
78
+ - `docs`: About documentation.
79
+ - `feat`: New feature.
80
+ - `fix`: Bug fix.
81
+ - `perf`: About performance.
82
+ - `refactor`: Changes that are not features or bug fixes.
83
+ - `style`: A change in code style/format.
84
+ - `tests`: About tests.
85
+
86
+ If you write a body, please add trailers at the end (for example issues and PR references, or co-authors), without relying on GitHub's flavored Markdown:
87
+
88
+ ```
89
+ Body.
90
+
91
+ Issue #10: https://github.com/namespace/project/issues/10
92
+ Related to PR namespace/other-project#15: https://github.com/namespace/other-project/pull/15
93
+ ```
94
+
95
+ These "trailers" must appear at the end of the body, without any blank lines between them. The trailer title can contain any character except colons `:`. We expect a full URI for each trailer, not just GitHub autolinks (for example, full GitHub URLs for commits and issues, not the hash or the #issue-number).
96
+
97
+ We do not enforce a line length on commit messages summary and body, but please avoid very long summaries, and very long lines in the body, unless they are part of code blocks that must not be wrapped.
98
+
99
+ ## Pull requests guidelines
100
+
101
+ Link to any related issue in the Pull Request message.
102
+
103
+ During the review, we recommend using fixups:
104
+
105
+ ```bash
106
+ # SHA is the SHA of the commit you want to fix
107
+ git commit --fixup=SHA
108
+ ```
109
+
110
+ Once all the changes are approved, you can squash your commits:
111
+
112
+ ```bash
113
+ git rebase -i --autosquash main
114
+ ```
115
+
116
+ And force-push:
117
+
118
+ ```bash
119
+ git push -f
120
+ ```
121
+
122
+ If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.
pyfsviz-0.1.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 mcw-meier-lab
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.
pyfsviz-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyfsviz
3
+ Version: 0.1.1
4
+ Summary: Python tools for FreeSurfer visualization and QA
5
+ Author-Email: Lezlie Espana <lespana@mcw.edu>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Documentation
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Utilities
21
+ Classifier: Typing :: Typed
22
+ Project-URL: Homepage, https://mcw-meier-lab.github.io/pyFSViz
23
+ Project-URL: Documentation, https://mcw-meier-lab.github.io/pyFSViz
24
+ Project-URL: Changelog, https://mcw-meier-lab.github.io/pyFSViz/changelog
25
+ Project-URL: Repository, https://github.com/mcw-meier-lab/pyFSViz
26
+ Project-URL: Issues, https://github.com/mcw-meier-lab/pyFSViz/issues
27
+ Project-URL: Discussions, https://github.com/mcw-meier-lab/pyFSViz/discussions
28
+ Requires-Python: >=3.10
29
+ Requires-Dist: importlib-resources>=6.5.2
30
+ Requires-Dist: matplotlib>=3.9.4
31
+ Requires-Dist: nilearn>=0.12.1
32
+ Requires-Dist: nipype>=1.10.0
33
+ Requires-Dist: nireports>=25.0.1
34
+ Requires-Dist: numpy>=2.0.2
35
+ Requires-Dist: pandas>=2.3.3
36
+ Requires-Dist: plotly>=6.3.1
37
+ Description-Content-Type: text/markdown
38
+
39
+ # pyFSViz
40
+
41
+ [![ci](https://github.com/mcw-meier-lab/pyFSViz/workflows/ci/badge.svg)](https://github.com/mcw-meier-lab/pyFSViz/actions?query=workflow%3Aci)
42
+ [![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mcw-meier-lab.github.io/pyFSViz/)
43
+ [![pypi version](https://img.shields.io/pypi/v/pyfsviz.svg)](https://pypi.org/project/pyfsviz/)
44
+
45
+ Python tools for FreeSurfer visualization and QA
46
+
47
+ ## Installation
48
+
49
+ ```bash
50
+ pip install pyfsviz
51
+ ```
52
+
53
+ With [`uv`](https://docs.astral.sh/uv/):
54
+
55
+ ```bash
56
+ uv tool install pyfsviz
57
+ ```
@@ -0,0 +1,19 @@
1
+ # pyFSViz
2
+
3
+ [![ci](https://github.com/mcw-meier-lab/pyFSViz/workflows/ci/badge.svg)](https://github.com/mcw-meier-lab/pyFSViz/actions?query=workflow%3Aci)
4
+ [![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mcw-meier-lab.github.io/pyFSViz/)
5
+ [![pypi version](https://img.shields.io/pypi/v/pyfsviz.svg)](https://pypi.org/project/pyfsviz/)
6
+
7
+ Python tools for FreeSurfer visualization and QA
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install pyfsviz
13
+ ```
14
+
15
+ With [`uv`](https://docs.astral.sh/uv/):
16
+
17
+ ```bash
18
+ uv tool install pyfsviz
19
+ ```
@@ -0,0 +1,25 @@
1
+ [coverage:run]
2
+ branch = true
3
+ parallel = true
4
+ source =
5
+ src/
6
+ tests/
7
+
8
+ [coverage:paths]
9
+ equivalent =
10
+ src/
11
+ .venv/lib/*/site-packages/
12
+ .venvs/*/lib/*/site-packages/
13
+
14
+ [coverage:report]
15
+ precision = 2
16
+ omit =
17
+ src/*/__init__.py
18
+ src/*/__main__.py
19
+ tests/__init__.py
20
+ exclude_lines =
21
+ pragma: no cover
22
+ if TYPE_CHECKING
23
+
24
+ [coverage:json]
25
+ output = htmlcov/coverage.json
@@ -0,0 +1,9 @@
1
+ bump = "auto"
2
+ convention = "angular"
3
+ in-place = true
4
+ output = "CHANGELOG.md"
5
+ parse-refs = false
6
+ parse-trailers = true
7
+ sections = ["build", "deps", "feat", "fix", "refactor"]
8
+ template = "keepachangelog"
9
+ versioning = "pep440"
@@ -0,0 +1,5 @@
1
+ [mypy]
2
+ ignore_missing_imports = true
3
+ exclude = tests/fixtures/
4
+ warn_unused_ignores = true
5
+ show_error_codes = true
@@ -0,0 +1,16 @@
1
+ [pytest]
2
+ python_files =
3
+ test_*.py
4
+ addopts =
5
+ --cov
6
+ --cov-config config/coverage.ini
7
+ testpaths =
8
+ tests
9
+
10
+ # action:message_regex:warning_class:module_regex:line
11
+ filterwarnings =
12
+ error
13
+ default::EncodingWarning
14
+ error::EncodingWarning:pyfsviz
15
+ # TODO: remove once pytest-xdist 4 is released
16
+ ignore:.*rsyncdir:DeprecationWarning:xdist
@@ -0,0 +1,17 @@
1
+ # YORE: EOL 3.9: Remove file.
2
+ # This file is used on 3.9 due to forward compatibility issue with filterwarnings.
3
+ # See https://github.com/pytest-dev/pytest/issues/11101.
4
+ [pytest]
5
+ python_files =
6
+ test_*.py
7
+ addopts =
8
+ --cov
9
+ --cov-config config/coverage.ini
10
+ testpaths =
11
+ tests
12
+
13
+ # action:message_regex:warning_class:module_regex:line
14
+ filterwarnings =
15
+ error
16
+ # TODO: remove once pytest-xdist 4 is released
17
+ ignore:.*rsyncdir:DeprecationWarning:xdist
@@ -0,0 +1,92 @@
1
+ target-version = "py310"
2
+ line-length = 120
3
+
4
+ [lint]
5
+ exclude = [
6
+ "tests/fixtures/*.py",
7
+ ]
8
+ select = [
9
+ "A", "ANN", "ARG",
10
+ "B", "BLE",
11
+ "C", "C4",
12
+ "COM",
13
+ "D", "DTZ",
14
+ "E", "ERA", "EXE",
15
+ "F", "FBT",
16
+ "G",
17
+ "I", "ICN", "INP", "ISC",
18
+ "N",
19
+ "PGH", "PIE", "PL", "PLC", "PLE", "PLR", "PLW", "PT", "PYI",
20
+ "Q",
21
+ "RUF", "RSE", "RET",
22
+ "S", "SIM", "SLF",
23
+ "T", "T10", "T20", "TCH", "TID", "TRY",
24
+ "UP",
25
+ "W",
26
+ "YTT",
27
+ ]
28
+ ignore = [
29
+ "A001", # Variable is shadowing a Python builtin
30
+ "ANN101", # Missing type annotation for self
31
+ "ANN102", # Missing type annotation for cls
32
+ "ANN204", # Missing return type annotation for special method __str__
33
+ "ANN401", # Dynamically typed expressions (typing.Any) are disallowed
34
+ "ARG005", # Unused lambda argument
35
+ "C901", # Too complex
36
+ "D105", # Missing docstring in magic method
37
+ "D401", # Imperative mood
38
+ "D417", # Missing argument description in the docstring
39
+ "E501", # Line too long
40
+ "ERA001", # Commented out code
41
+ "G004", # Logging statement uses f-string
42
+ "PLR0911", # Too many return statements
43
+ "PLR0912", # Too many branches
44
+ "PLR0913", # Too many arguments to function call
45
+ "PLR0915", # Too many statements
46
+ "SLF001", # Private member accessed
47
+ "TRY003", # Avoid specifying long messages outside the exception class
48
+ ]
49
+
50
+ [lint.per-file-ignores]
51
+ "src/**/cli.py" = [
52
+ "T201", # Print statement
53
+ ]
54
+ "src/*/debug.py" = [
55
+ "T201", # Print statement
56
+ ]
57
+ "!src/*/*.py" = [
58
+ "D100", # Missing docstring in public module
59
+ ]
60
+ "!src/**.py" = [
61
+ "D101", # Missing docstring in public class
62
+ "D103", # Missing docstring in public function
63
+ ]
64
+ "scripts/*.py" = [
65
+ "INP001", # File is part of an implicit namespace package
66
+ "T201", # Print statement
67
+ ]
68
+ "tests/**.py" = [
69
+ "ARG005", # Unused lambda argument
70
+ "FBT001", # Boolean positional arg in function definition
71
+ "PLR2004", # Magic value used in comparison
72
+ "S101", # Use of assert detected
73
+ ]
74
+
75
+ [lint.flake8-quotes]
76
+ docstring-quotes = "double"
77
+
78
+ [lint.flake8-tidy-imports]
79
+ ban-relative-imports = "all"
80
+
81
+ [lint.isort]
82
+ known-first-party = ["pyfsviz"]
83
+
84
+ [lint.pydocstyle]
85
+ convention = "numpy"
86
+
87
+ [format]
88
+ exclude = [
89
+ "tests/fixtures/*.py",
90
+ ]
91
+ docstring-code-format = true
92
+ docstring-code-line-length = 80
@@ -0,0 +1,57 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "python (current file)",
6
+ "type": "debugpy",
7
+ "request": "launch",
8
+ "program": "${file}",
9
+ "console": "integratedTerminal",
10
+ "justMyCode": false,
11
+ "args": "${command:pickArgs}"
12
+ },
13
+ {
14
+ "name": "run",
15
+ "type": "debugpy",
16
+ "request": "launch",
17
+ "module": "pyfsviz",
18
+ "console": "integratedTerminal",
19
+ "justMyCode": false,
20
+ "args": "${command:pickArgs}"
21
+ },
22
+ {
23
+ "name": "docs",
24
+ "type": "debugpy",
25
+ "request": "launch",
26
+ "module": "mkdocs",
27
+ "justMyCode": false,
28
+ "args": [
29
+ "serve",
30
+ "-v"
31
+ ]
32
+ },
33
+ {
34
+ "name": "test",
35
+ "type": "debugpy",
36
+ "request": "launch",
37
+ "module": "pytest",
38
+ "justMyCode": false,
39
+ "args": [
40
+ "-c=config/pytest.ini",
41
+ "-vvv",
42
+ "--no-cov",
43
+ "--dist=no",
44
+ "tests",
45
+ "-k=${input:tests_selection}"
46
+ ]
47
+ }
48
+ ],
49
+ "inputs": [
50
+ {
51
+ "id": "tests_selection",
52
+ "type": "promptString",
53
+ "description": "Tests selection",
54
+ "default": ""
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "files.watcherExclude": {
3
+ "**/.venv*/**": true,
4
+ "**/.venvs*/**": true,
5
+ "**/venv*/**": true
6
+ },
7
+ "mypy-type-checker.args": [
8
+ "--config-file=config/mypy.ini"
9
+ ],
10
+ "python.testing.unittestEnabled": false,
11
+ "python.testing.pytestEnabled": true,
12
+ "python.testing.pytestArgs": [
13
+ "--config-file=config/pytest.ini"
14
+ ],
15
+ "ruff.enable": true,
16
+ "ruff.format.args": [
17
+ "--config=config/ruff.toml"
18
+ ],
19
+ "ruff.lint.args": [
20
+ "--config=config/ruff.toml"
21
+ ],
22
+ "yaml.schemas": {
23
+ "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
24
+ },
25
+ "yaml.customTags": [
26
+ "!ENV scalar",
27
+ "!ENV sequence",
28
+ "!relative scalar",
29
+ "tag:yaml.org,2002:python/name:materialx.emoji.to_svg",
30
+ "tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
31
+ "tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
32
+ ]
33
+ }