diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a3e0ee0..14898c4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,4 +6,4 @@ - [ ] This PR is meant for the `lincc-frameworks/python-project-template` repo and not a downstream one instead. - [ ] This change is linked to an open issue -- [ ] This change includes integration testing, or is small enough to be covered by existing tests \ No newline at end of file +- [ ] This change includes integration testing, or is small enough to be covered by existing tests diff --git a/.github/workflows/pre-commit-ci.yml b/.github/workflows/pre-commit-ci.yml index cbffeda..db2ed2b 100644 --- a/.github/workflows/pre-commit-ci.yml +++ b/.github/workflows/pre-commit-ci.yml @@ -39,4 +39,4 @@ jobs: env: SKIP: "check-lincc-frameworks-template-version,no-commit-to-branch,check-added-large-files,validate-pyproject,sphinx-build,pytest-check" - uses: pre-commit-ci/lite-action@062bca0919bc9d6e66755cc05074b70c77e111fc # v1.2.0 - if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false \ No newline at end of file + if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 9eaf488..946b205 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -82,4 +82,4 @@ jobs: } } ] - } \ No newline at end of file + } diff --git a/.github/workflows/testing-and-coverage.yml b/.github/workflows/testing-and-coverage.yml index fb10015..ace6183 100644 --- a/.github/workflows/testing-and-coverage.yml +++ b/.github/workflows/testing-and-coverage.yml @@ -40,4 +40,4 @@ jobs: - name: Run unit tests with pytest / pytest-copie run: | git config --global init.defaultBranch main - python -m pytest tests -o log_cli=true -vv --python_version ${{ matrix.python-version }} \ No newline at end of file + python -m pytest tests -o log_cli=true -vv --python_version ${{ matrix.python-version }} diff --git a/.setup_dev.sh b/.setup_dev.sh index 5286e41..c09be48 100755 --- a/.setup_dev.sh +++ b/.setup_dev.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Bash Unofficial strict mode (http://redsymbol.net/articles/unofficial-bash-strict-mode/) +# Bash Unofficial strict mode (http://redsymbol.net/articles/unofficial-bash-strict-mode/) # and (https://disconnected.systems/blog/another-bash-strict-mode/) set -o nounset # Any uninitialized variable is an error set -o errexit # Exit the script on the failure of any command to execute without error diff --git a/CITATION.bib b/CITATION.bib index af209d7..387d475 100644 --- a/CITATION.bib +++ b/CITATION.bib @@ -13,4 +13,3 @@ @ARTICLE{2024RNAAS...8..141O adsurl = {https://ui.adsabs.harvard.edu/abs/2024RNAAS...8..141O}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } - diff --git a/copier.yml b/copier.yml index f5215be..4b054df 100644 --- a/copier.yml +++ b/copier.yml @@ -49,7 +49,7 @@ package_name: project_organization: type: str - help: What github organization will your project live under? + help: What github organization will your project live under? default: my-organization validator: >- {% if not (project_organization | regex_search('^[a-zA-Z0-9][a-zA-Z0-9-]*$')) %} diff --git a/docs/Makefile b/docs/Makefile index aa8ae08..20fa136 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -8,7 +8,7 @@ SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = ../_readthedocs/ -.PHONY: help clean Makefile +.PHONY: help clean Makefile # Put it first so that "make" without argument is like "make help". help: @@ -23,4 +23,3 @@ clean: # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - diff --git a/docs/index.rst b/docs/index.rst index 233c867..6cc8acd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -54,4 +54,3 @@ please :doc:`/source/contact` practices/publishing_package practices/customizing_project practices/development_guide - diff --git a/docs/practices/ci_testing.rst b/docs/practices/ci_testing.rst index 37b0a97..4cd1922 100644 --- a/docs/practices/ci_testing.rst +++ b/docs/practices/ci_testing.rst @@ -144,4 +144,4 @@ In your project repo create a new repo secret: There is a stage in the end of the ``smoke_test.yml`` file that will send failure alerts to the slack channel. -An example can be found in the `rail project `_ \ No newline at end of file +An example can be found in the `rail project `_ diff --git a/docs/practices/conda.rst b/docs/practices/conda.rst index 3cfed8e..e9176ce 100644 --- a/docs/practices/conda.rst +++ b/docs/practices/conda.rst @@ -40,4 +40,4 @@ from your repository as normal. conda-forge periodically looks at your source repo for any new releases/tags, tries to build a new release, and pre-generates the PR (against your "feedstock" -repo created above) to publish the new version of the package. \ No newline at end of file +repo created above) to publish the new version of the package. diff --git a/docs/practices/overview.rst b/docs/practices/overview.rst index 8d15ada..6741577 100644 --- a/docs/practices/overview.rst +++ b/docs/practices/overview.rst @@ -24,4 +24,4 @@ Practices Still have questions? -------------------------------- -:doc:`/source/contact` \ No newline at end of file +:doc:`/source/contact` diff --git a/docs/practices/pipx.rst b/docs/practices/pipx.rst index 2627b7a..8f506ff 100644 --- a/docs/practices/pipx.rst +++ b/docs/practices/pipx.rst @@ -47,4 +47,4 @@ An example installation of ``pipx`` might look like this. >> pipx ensurepath .. important:: - Don't forget to run ``pipx ensurepath`` to finalize the installation. \ No newline at end of file + Don't forget to run ``pipx ensurepath`` to finalize the installation. diff --git a/docs/practices/pypi.rst b/docs/practices/pypi.rst index 5c2dced..a1484fe 100644 --- a/docs/practices/pypi.rst +++ b/docs/practices/pypi.rst @@ -38,4 +38,4 @@ Releasing new versions Now, when you `create a new release `_ -from your repository, a workflow will run that will package and deploy the code to PyPI. \ No newline at end of file +from your repository, a workflow will run that will package and deploy the code to PyPI. diff --git a/docs/practices/pytest_timing.rst b/docs/practices/pytest_timing.rst index 981b556..38bf9fc 100644 --- a/docs/practices/pytest_timing.rst +++ b/docs/practices/pytest_timing.rst @@ -131,4 +131,4 @@ Profiling the same target as above, using ``py-spy`` might look like: You will get a profiling flame chart saved to ``profile.svg``. These are not as easy to read as some other flame charts, but they're better than sifting through the -raw results! \ No newline at end of file +raw results! diff --git a/docs/practices/unit_testing.rst b/docs/practices/unit_testing.rst index be13496..d0e5cdc 100644 --- a/docs/practices/unit_testing.rst +++ b/docs/practices/unit_testing.rst @@ -43,4 +43,4 @@ supports tests embedded in documentation using pytest's `doctest `_ component. Documentation comments in all source files, as well as ``.rst`` files in the ``./docs`` directory can contain doctests in the format outlined -`here `_. \ No newline at end of file +`here `_. diff --git a/docs/requirements.txt b/docs/requirements.txt index 4ac568c..bea0e1e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,4 +2,4 @@ sphinx sphinx-autoapi sphinx-copybutton -sphinx-rtd-theme>=3.1.0 \ No newline at end of file +sphinx-rtd-theme>=3.1.0 diff --git a/docs/source/citation.rst b/docs/source/citation.rst index 1ee3f86..0b1a040 100644 --- a/docs/source/citation.rst +++ b/docs/source/citation.rst @@ -19,4 +19,4 @@ If you use Python Project Template in your work, we ask the you cite the `"A Pyt doi = {10.3847/2515-5172/ad4da1}, adsurl = {https://ui.adsabs.harvard.edu/abs/2024RNAAS...8..141O}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} - } \ No newline at end of file + } diff --git a/docs/source/configuration_checklist.rst b/docs/source/configuration_checklist.rst index 6e0845c..ba89ab2 100644 --- a/docs/source/configuration_checklist.rst +++ b/docs/source/configuration_checklist.rst @@ -64,4 +64,4 @@ Get the most out of this template Still have questions? ------------------------------------------------------------------------------- -:doc:`/source/contact` \ No newline at end of file +:doc:`/source/contact` diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index f6e616f..13e71ac 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -59,4 +59,4 @@ for doing so are here. Use your best judgement when incrementing the version. i.e. is this a major, minor, or patch fix. -Do you want to help out, but you're not sure how? :doc:`/source/contact` \ No newline at end of file +Do you want to help out, but you're not sure how? :doc:`/source/contact` diff --git a/docs/source/existing_project.rst b/docs/source/existing_project.rst index b7c8cf3..7799c8a 100644 --- a/docs/source/existing_project.rst +++ b/docs/source/existing_project.rst @@ -237,4 +237,4 @@ to conclude the setup. Still have questions? ---------------------------------------- -:doc:`/source/contact` \ No newline at end of file +:doc:`/source/contact` diff --git a/docs/source/overview.rst b/docs/source/overview.rst index bafa1a7..c9b0709 100644 --- a/docs/source/overview.rst +++ b/docs/source/overview.rst @@ -74,4 +74,4 @@ Now choose your next adventure... ------------------------------------- * :doc:`Start a new project` * :doc:`Configure a new project` -* :doc:`Upgrade an existing project` \ No newline at end of file +* :doc:`Upgrade an existing project` diff --git a/pyproject.toml b/pyproject.toml index cdca29a..e6a6169 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,4 +69,4 @@ profile = "black" line_length = 110 [tool.pytest.ini_options] -log_cli_level = "INFO" \ No newline at end of file +log_cli_level = "INFO" diff --git a/python-project-template/.github/ISSUE_TEMPLATE/README.md b/python-project-template/.github/ISSUE_TEMPLATE/README.md index 46dc08e..af7f0c8 100644 --- a/python-project-template/.github/ISSUE_TEMPLATE/README.md +++ b/python-project-template/.github/ISSUE_TEMPLATE/README.md @@ -6,4 +6,4 @@ removing, and modifying these templates to suit the needs of your project is enc For more information about these templates, look here: https://lincc-ppt.readthedocs.io/en/latest/practices/issue_pr_templating.html -Or if you still have questions contact us: https://lincc-ppt.readthedocs.io/en/latest/source/contact.html \ No newline at end of file +Or if you still have questions contact us: https://lincc-ppt.readthedocs.io/en/latest/source/contact.html diff --git a/python-project-template/.github/pull_request_template.md b/python-project-template/.github/pull_request_template.md index 5f341fd..a8b83bd 100644 --- a/python-project-template/.github/pull_request_template.md +++ b/python-project-template/.github/pull_request_template.md @@ -1,5 +1,5 @@ ## Change Description - diff --git a/python-project-template/.github/workflows/{% if contains_code %}smoke-test.yml{% endif %}.jinja b/python-project-template/.github/workflows/{% if contains_code %}smoke-test.yml{% endif %}.jinja index 5784d9a..cc82270 100644 --- a/python-project-template/.github/workflows/{% if contains_code %}smoke-test.yml{% endif %}.jinja +++ b/python-project-template/.github/workflows/{% if contains_code %}smoke-test.yml{% endif %}.jinja @@ -46,9 +46,9 @@ jobs: pip list - name: Run unit tests with pytest run: | - python -m pytest -o log_cli=true -vv + python -m pytest -o log_cli=true -vv {%- if 'email' in failure_notification %} - - name: Send status to author's email + - name: Send status to author's email if: {% raw %}${{ failure() }} && github.event_name != 'workflow_dispatch' }}{% endraw %} # Only email if the workflow failed and was not manually started. Customize this as necessary. uses: dawidd6/action-send-mail@67ce3558d613188179559c61d3565140cf389968 # v22 with: diff --git a/python-project-template/.initialize_new_project.sh b/python-project-template/.initialize_new_project.sh index 2693260..9f55632 100644 --- a/python-project-template/.initialize_new_project.sh +++ b/python-project-template/.initialize_new_project.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Bash Unofficial strict mode (http://redsymbol.net/articles/unofficial-bash-strict-mode/) +# Bash Unofficial strict mode (http://redsymbol.net/articles/unofficial-bash-strict-mode/) # and (https://disconnected.systems/blog/another-bash-strict-mode/) set -o nounset # Any uninitialized variable is an error set -o errexit # Exit the script on the failure of any command to execute without error diff --git a/python-project-template/.pre-commit-config.yaml.jinja b/python-project-template/.pre-commit-config.yaml.jinja index 86041e3..c0401e0 100644 --- a/python-project-template/.pre-commit-config.yaml.jinja +++ b/python-project-template/.pre-commit-config.yaml.jinja @@ -109,7 +109,7 @@ repos: rev: 44b5042edab9382aba712eed4f9c7bab7a3d6a3e # v0.17.0 hooks: - id: ruff - name: Lint code using ruff; sort and organize imports + name: Lint code using ruff; sort and organize imports types_or: [ python, pyi ] args: ["--fix"] {%- endif %} diff --git a/python-project-template/{% if include_benchmarks %}benchmarks{% endif %}/README.md b/python-project-template/{% if include_benchmarks %}benchmarks{% endif %}/README.md index 5259778..cc65fa7 100644 --- a/python-project-template/{% if include_benchmarks %}benchmarks{% endif %}/README.md +++ b/python-project-template/{% if include_benchmarks %}benchmarks{% endif %}/README.md @@ -9,4 +9,4 @@ tracked and reported to give you a sense of the overall performance of your code You are encouraged to add, update, or remove benchmark functions to suit the needs of your project. -For more information, see the documentation here: https://lincc-ppt.readthedocs.io/en/latest/practices/ci_benchmarking.html \ No newline at end of file +For more information, see the documentation here: https://lincc-ppt.readthedocs.io/en/latest/practices/ci_benchmarking.html diff --git a/python-project-template/{% if include_benchmarks %}benchmarks{% endif %}/asv.conf.json.jinja b/python-project-template/{% if include_benchmarks %}benchmarks{% endif %}/asv.conf.json.jinja index 590c076..2830236 100644 --- a/python-project-template/{% if include_benchmarks %}benchmarks{% endif %}/asv.conf.json.jinja +++ b/python-project-template/{% if include_benchmarks %}benchmarks{% endif %}/asv.conf.json.jinja @@ -78,4 +78,4 @@ // "some_benchmark": "352cdf", // Consider regressions only after this commit // "another_benchmark": null, // Skip regression detection altogether // } -} \ No newline at end of file +} diff --git a/python-project-template/{% if include_docs %}docs{% endif %}/Makefile.jinja b/python-project-template/{% if include_docs %}docs{% endif %}/Makefile.jinja index e32f1af..075e18c 100644 --- a/python-project-template/{% if include_docs %}docs{% endif %}/Makefile.jinja +++ b/python-project-template/{% if include_docs %}docs{% endif %}/Makefile.jinja @@ -33,4 +33,3 @@ clean: # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - diff --git a/python-project-template/{% if include_docs %}docs{% endif %}/notebooks/README.md b/python-project-template/{% if include_docs %}docs{% endif %}/notebooks/README.md index 2b4fb45..3049d4a 100644 --- a/python-project-template/{% if include_docs %}docs{% endif %}/notebooks/README.md +++ b/python-project-template/{% if include_docs %}docs{% endif %}/notebooks/README.md @@ -22,4 +22,4 @@ For notebooks that require large datasets, access to third party APIs, large CPU For more information look here: https://lincc-ppt.readthedocs.io/en/latest/practices/sphinx.html#python-notebooks -Or if you still have questions contact us: https://lincc-ppt.readthedocs.io/en/latest/source/contact.html \ No newline at end of file +Or if you still have questions contact us: https://lincc-ppt.readthedocs.io/en/latest/source/contact.html diff --git a/python-project-template/{% if include_docs %}docs{% endif %}/requirements.txt.jinja b/python-project-template/{% if include_docs %}docs{% endif %}/requirements.txt.jinja index e96005e..2d23c8c 100644 --- a/python-project-template/{% if include_docs %}docs{% endif %}/requirements.txt.jinja +++ b/python-project-template/{% if include_docs %}docs{% endif %}/requirements.txt.jinja @@ -8,4 +8,4 @@ nbsphinx sphinx sphinx-autoapi sphinx-copybutton -sphinx-rtd-theme>=3.0 \ No newline at end of file +sphinx-rtd-theme>=3.0 diff --git a/python-versions.jinja b/python-versions.jinja index 0845287..28d7745 100644 --- a/python-versions.jinja +++ b/python-versions.jinja @@ -1,22 +1,22 @@ {# You use this file by including it via jinja like: - {%- import 'python-versions.jinja' as py -%} + {%- import 'python-versions.jinja' as py -%} -Then pass the python_versions list into the various macros like so: +Then pass the python_versions list into the various macros like so: - {{ py.min(python_versions) }} + {{ py.min(python_versions) }} -This template creates no output, but does allow you to transform python_versions answer into a -number of helpful values for when you need a single python version. +This template creates no output, but does allow you to transform python_versions answer into a +number of helpful values for when you need a single python version. Note that the import syntax and access MUST BE in the form above. Copier has problems processing import lines that are any more complex when they occur in files who's paths are also jinja templated. #} -{# This gives a middle python version from a potentially long list of versions -For even-length lists we prefer the older of the two middle values. - ["3.9","3.10","3.11","3.12"] -> "3.10" -For odd-length lists we prefer the middle value +{# This gives a middle python version from a potentially long list of versions +For even-length lists we prefer the older of the two middle values. + ["3.9","3.10","3.11","3.12"] -> "3.10" +For odd-length lists we prefer the middle value ["3.9","3.10","3.11"] -> "3.10" #} {% macro pref(python_versions) -%} {%- set n = python_versions | length -%} @@ -32,4 +32,4 @@ For odd-length lists we prefer the middle value {% macro max(python_versions) -%} {%- set n = python_versions | length -%} {{ python_versions[n-1] }} -{%- endmacro -%} \ No newline at end of file +{%- endmacro -%} diff --git a/tox.ini b/tox.ini index 3db556f..31a7f70 100644 --- a/tox.ini +++ b/tox.ini @@ -9,4 +9,3 @@ deps = pylint commands = pytest tests -