-
Notifications
You must be signed in to change notification settings - Fork 0
Add pyproject.toml file #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a5f2d23
Added pyproject.toml and test functions for it, updated copier.yml an…
h-chmeruk f34c717
Fixed deprecation warning 3.13
h-chmeruk 06673db
Applied suggestions from review by @ahms5
h-chmeruk 3b960f3
Adjusted the test functions to the new default_project fixture
h-chmeruk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| [project] | ||
| name = "{{ project_slug }}" | ||
| version = "{{ version }}" | ||
| description = "{{ project_short_description }}" | ||
| readme = "README.md" | ||
| license = {file = "LICENSE"} | ||
| requires-python = ">={{ minimum_python_version }}" | ||
|
|
||
| authors = [ | ||
| { name = "The pyfar developers", email = "info@pyfar.org" } | ||
| ] | ||
| keywords = [ | ||
| {%- for key in keywords.split(',') %} | ||
| "{{ key.strip() }}", | ||
| {%- endfor %} | ||
| ] | ||
|
|
||
| classifiers = [ | ||
| "Development Status :: 4 - Beta", | ||
| "Intended Audience :: Science/Research", | ||
| "{{ pypi_license_classifier }}", | ||
| "Natural Language :: English", | ||
| "Programming Language :: Python :: 3", | ||
| {%- for version in valid_python_versions %} | ||
| "Programming Language :: Python :: {{ version }}", | ||
| {%- endfor %} | ||
| ] | ||
|
|
||
| dependencies = [ | ||
| {%- for key in dependencies.split(',') %} | ||
| "{{ key.strip() }}", | ||
| {%- endfor %} | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| deploy = [ | ||
| "twine", | ||
| "wheel", | ||
| "build", | ||
| "setuptools", | ||
| "bump-my-version", | ||
| ] | ||
| tests = [ | ||
| "pytest", | ||
| "pytest-cov", | ||
| "watchdog", | ||
| "ruff==0.8.3", | ||
| "coverage", | ||
| ] | ||
| docs = [ | ||
| "sphinx", | ||
| "autodocsumm>=0.2.14", | ||
| "pydata-sphinx-theme", | ||
| "sphinx_mdinclude", | ||
| "sphinx-design", | ||
| "sphinx-favicon", | ||
| "sphinx-reredirects", | ||
| ] | ||
| dev = ["{{ project_slug }}[deploy,tests,docs]"] | ||
|
|
||
| [project.urls] | ||
| Tracker = "https://github.com/{{ git_username }}/{{ project_slug }}/issues" | ||
| Documentation = "https://{{ project_slug }}.readthedocs.io/" | ||
| Download = "https://pypi.org/project/{{ project_slug }}/" | ||
| Homepage = "https://pyfar.org/" | ||
| Source = "https://github.com/{{ git_username }}/{{ project_slug }}" | ||
| Changelog = "https://github.com/{{ git_username }}/{{ project_slug }}/blob/main/HISTORY.rst" | ||
|
|
||
| [build-system] | ||
| requires = ["setuptools>=61.0", "wheel"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [tool.setuptools.packages] | ||
| find = {} # Scan the project directory with the default parameters | ||
|
|
||
|
|
||
| [tool.ruff] | ||
| exclude = [ | ||
| ".git", | ||
| "docs", | ||
| ] | ||
| line-length = 79 | ||
| lint.ignore = [ | ||
| "D200", # One-line docstring should fit on one line with quotes | ||
| "D202", # No blank lines allowed after function docstring | ||
| "D205", # 1 blank line required between summary line and description | ||
| "D401", # First line should be in imperative mood | ||
| "D404", # First word of the docstring should not be "This" | ||
| "B006", # Do not use mutable data structures for argument defaults | ||
| "B008", # Do not perform calls in argument defaults | ||
| "PT018", # Assertion should be broken down into multiple parts | ||
| "PT019", # Fixture `_` without value is injected as parameter | ||
| ] | ||
| lint.select = [ | ||
| "B", # bugbear extension | ||
| "ARG", # Remove unused function/method arguments | ||
| "C4", # Check for common security issues | ||
| "E", # PEP8 errors | ||
| "F", # Pyflakes | ||
| "W", # PEP8 warnings | ||
| "D", # Docstring guidelines | ||
| "NPY", # Check all numpy related deprecations | ||
| "D417", # Missing argument descriptions in the docstring | ||
| "PT", # Pytest style | ||
| "A", # Avoid builtin function and type shadowing | ||
| "ERA", # No commented out code | ||
| "NPY", # Check all numpy related deprecations | ||
| "COM", # trailing comma rules | ||
| "I002", # missing required import | ||
| "TID252", # Use absolute over relative imports | ||
| "FIX", # Code should not contain FIXME, TODO, etc | ||
| ] | ||
|
|
||
| # Ignore missing docstrings in tests | ||
| [tool.ruff.lint.per-file-ignores] | ||
| "tests/*" = [ | ||
| "D100", | ||
| "D101", | ||
| "D103", | ||
| "D104", | ||
| ] | ||
|
|
||
| [tool.ruff.lint.pydocstyle] | ||
| convention = "numpy" | ||
|
|
||
|
|
||
| [tool.bumpversion] | ||
| current_version = "{{ version }}" | ||
| parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)" | ||
| serialize = ["{major}.{minor}.{patch}"] | ||
| search = "{current_version}" | ||
| replace = "{new_version}" | ||
| regex = true | ||
| ignore_missing_version = false | ||
| ignore_missing_files = false | ||
| tag = true | ||
| sign_tags = false | ||
| tag_name = "v{new_version}" | ||
| tag_message = "Bump version: {current_version} → {new_version}" | ||
| allow_dirty = false | ||
| commit = true | ||
| message = "Bump version: {current_version} → {new_version}" | ||
| commit_args = "" | ||
| setup_hooks = [] | ||
| pre_commit_hooks = [] | ||
| post_commit_hooks = [] | ||
|
|
||
| [[tool.bumpversion.files]] | ||
| filename = "pyproject.toml" | ||
| search = '\nversion = "{current_version}"' | ||
| replace = '\nversion = "{new_version}"' | ||
|
|
||
| [[tool.bumpversion.files]] | ||
| filename = "{{ project_slug }}/__init__.py" | ||
| search = "__version__ = '{current_version}'" | ||
| replace = "__version__ = '{new_version}'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.