-
Notifications
You must be signed in to change notification settings - Fork 0
Update copier template. #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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # Changes here will be overwritten by Copier | ||
| _commit: v2.0.1 | ||
| _commit: v2.1.2 | ||
| _src_path: gh://lincc-frameworks/python-project-template | ||
| author_email: [email protected] | ||
| author_name: LINCC Frameworks | ||
|
|
@@ -18,6 +18,9 @@ project_license: BSD | |
| project_name: template-version-check | ||
| project_organization: lincc-frameworks | ||
| python_versions: | ||
| - '3.9' | ||
| - '3.10' | ||
| - '3.11' | ||
| - '3.12' | ||
| - '3.13' | ||
| - '3.14' | ||
| test_lowest_version: none | ||
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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
|
|
||
| # This workflow runs pre-commit hooks on pushes and pull requests to main | ||
| # to enforce coding style. To ensure correct configuration, please refer to: | ||
| # https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html | ||
|
|
@@ -19,13 +20,14 @@ jobs: | |
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.10' | ||
| python-version: '3.12' | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| python -m pip install --upgrade pip | ||
| pip install .[dev] | ||
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
| uv pip install --system .[dev] | ||
| if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi | ||
| - uses: pre-commit/[email protected] | ||
| with: | ||
| extra_args: --all-files --verbose | ||
|
|
||
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
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
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 |
|---|---|---|
| @@ -1,20 +1,21 @@ | ||
|
|
||
| [project] | ||
| name = "template-version-check" | ||
| license = {file = "LICENSE"} | ||
| license = "BSD-3-Clause" | ||
| license-files = ["LICENSE"] | ||
| readme = "README.md" | ||
| authors = [ | ||
| { name = "LINCC Frameworks", email = "[email protected]" } | ||
| ] | ||
| classifiers = [ | ||
| "Development Status :: 4 - Beta", | ||
| "License :: OSI Approved :: BSD License", | ||
| "Intended Audience :: Developers", | ||
| "Intended Audience :: Science/Research", | ||
| "Operating System :: OS Independent", | ||
| "Programming Language :: Python", | ||
| ] | ||
| dynamic = ["version"] | ||
| requires-python = ">=3.9" | ||
| requires-python = ">=3.10" | ||
| dependencies = [ | ||
| "pyyaml", | ||
| "GitPython", | ||
|
|
@@ -50,60 +51,18 @@ write_to = "src/pre_commit_hooks/_version.py" | |
| [tool.pytest.ini_options] | ||
| testpaths = [ | ||
| "tests", | ||
| "src", | ||
| "docs", | ||
| ] | ||
| addopts = "--doctest-modules --doctest-glob=*.rst" | ||
|
|
||
| [tool.black] | ||
| line-length = 110 | ||
| target-version = ["py39"] | ||
|
|
||
| target-version = ["py310"] | ||
| [tool.isort] | ||
| profile = "black" | ||
| line_length = 110 | ||
|
|
||
| [tool.ruff] | ||
| line-length = 110 | ||
| target-version = "py39" | ||
|
|
||
| [tool.ruff.lint] | ||
| select = [ | ||
| # pycodestyle | ||
| "E", | ||
| "W", | ||
| # Pyflakes | ||
| "F", | ||
| # pep8-naming | ||
| "N", | ||
| # pyupgrade | ||
| "UP", | ||
| # flake8-bugbear | ||
| "B", | ||
| # flake8-simplify | ||
| "SIM", | ||
| # isort | ||
| "I", | ||
| # docstrings | ||
| "D101", | ||
| "D102", | ||
| "D103", | ||
| "D106", | ||
| "D206", | ||
| "D207", | ||
| "D208", | ||
| "D300", | ||
| "D417", | ||
| "D419", | ||
|
|
||
| ] | ||
|
|
||
| ignore = [ | ||
| "UP006", # Allow non standard library generics in type hints | ||
| "UP007", # Allow Union in type hints | ||
| "SIM114", # Allow if with same arms | ||
| "B028", # Allow default warning level | ||
| "SIM117", # Allow nested with | ||
| "UP015", # Allow redundant open parameters | ||
| "UP028", # Allow yield in for loop | ||
| ] | ||
|
|
||
| [tool.coverage.run] | ||
| omit=["src/pre_commit_hooks/_version.py"] | ||
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 |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| from ._version import __version__ | ||
| from .check_template_version import * | ||
|
|
||
| __all__ = ["__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
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,6 @@ | ||
| import pre_commit_hooks | ||
|
|
||
|
|
||
| def test_version(): | ||
| """Check to see that we can get the package version""" | ||
| assert pre_commit_hooks.__version__ is not None |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time to update the lincense in PPT