Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .git_archival.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# png image files
# *.png filter=lfs diff=lfs merge=lfs -text

.git_archival.txt export-subst
.git_archival.txt export-subst
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
# Runs this workflow automatically
schedule:
- cron: 45 6 * * *

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down
27 changes: 23 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

repos:
# Compare the local template version to the latest remote template version
# This hook should always pass. It will print a message if the local version
# This hook should always pass. It will print a message if the local version
# is out of date.
- repo: https://github.com/lincc-frameworks/pre-commit-hooks
rev: 439dda8bd784f4aa721851ecec03877df286f6b5
Expand All @@ -21,9 +21,14 @@ repos:
stages: [pre-commit]
language: system
entry: jupyter nbconvert --clear-output
# Prevents committing directly branches named 'main' and 'master'.
# Run a series of standard precommit checks, including:
# - no commits to branches named 'main' and 'master'.
# - No large files (>= 500kb)
# - All YAML and TOML files are valid.
# - No whitespace at the end of lines and a single newline at end of file.
# - No outstanding merge conflict markers in the codebase.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
hooks:
- id: no-commit-to-branch
name: Prevent main branch commits
Expand All @@ -32,6 +37,18 @@ repos:
name: Check for large files
description: Prevent the user from committing very large files.
args: ['--maxkb=500']
- id: trailing-whitespace
exclude: \.(rst|md|txt|html)$ # Skip rst, md, txt, and html files
name: Fix trailing whitespace
- id: end-of-file-fixer
name: Files end with a newline
- id: check-toml
name: Validate TOML files
- id: check-yaml
args: [--allow-multiple-documents] # Allow multiple document format
name: Validate YAML files
- id: check-merge-conflict
name: Check for merge conflicts
# Verify that pyproject.toml is well formed
- repo: https://github.com/abravalheri/validate-pyproject
rev: 17e12779811926f000bdfa1795f9e3735dd71ac3
Expand Down Expand Up @@ -79,7 +96,9 @@ repos:
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
# This currently uses the default language version. Uncomment
# the following line to use the max version.
# language_version: python{{ py.max(python_versions) }}
# Run unit tests, verify that they pass. Note that coverage is run against
# the ./src directory here because that is what will be committed. In the
# github workflow script, the coverage is run against the installed package
Expand Down
2 changes: 1 addition & 1 deletion docs/practices/issue_pr_templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ provides generic fields for:

As well as a set of additional project and issue-specific fields. This template
only serves as an initial framework, and you should feel free to modify this as
you see fit by directly modifying the template file.
you see fit by directly modifying the template file.
2 changes: 1 addition & 1 deletion docs/source/update_project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ For all the details about updating with Copier checkout the
Still have questions?
-------------------------------------

:doc:`/source/contact`
:doc:`/source/contact`
2 changes: 1 addition & 1 deletion python-project-template/.git_archival.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion python-project-template/.gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# png image files
# *.png filter=lfs diff=lfs merge=lfs -text

.git_archival.txt export-subst
.git_archival.txt export-subst
2 changes: 1 addition & 1 deletion python-project-template/.github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ or when you create a new PR.

For more information about CI and workflows, look here: https://lincc-ppt.readthedocs.io/en/latest/practices/ci.html

Or if you still have questions contact us: https://lincc-ppt.readthedocs.io/en/latest/source/contact.html
Or if you still have questions contact us: https://lincc-ppt.readthedocs.io/en/latest/source/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ jobs:
]
}
{%- endraw %}
{%- endif %}
{%- endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ jobs:
run: |
source venv/bin/activate
python -m pytest
{%- endif %}
{%- endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ jobs:
with:
branch: gh-pages
folder: ${{env.WORKING_DIR}}/_html
{%- endraw -%}

{%- endraw -%}
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ jobs:
with:
path: ${{env.WORKING_DIR}}
key: nightly-results-${{steps.nightly-dates.outputs.today}}
{%- endraw -%}

{%- endraw -%}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ jobs:
with:
name: benchmark-artifacts
path: ${{env.ARTIFACTS_DIR}}
{%- endraw -%}

{%- endraw -%}
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ jobs:
issue-number: ${{ steps.pr-info.outputs.pr }}
body-path: output
edit-mode: replace

{%- endraw -%}
19 changes: 18 additions & 1 deletion python-project-template/.pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ repos:
stages: [pre-commit]
language: system
entry: jupyter nbconvert --clear-output
# Prevents committing directly branches named 'main' and 'master'.
# Run a series of standard precommit checks, including:
# - no commits to branches named 'main' and 'master'.
# - No large files (>= 500kb)
# - All YAML and TOML files are valid.
# - No whitespace at the end of lines and a single newline at end of file.
# - No outstanding merge conflict markers in the codebase.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
hooks:
Expand All @@ -32,6 +37,18 @@ repos:
name: Check for large files
description: Prevent the user from committing very large files.
args: ['--maxkb=500']
- id: trailing-whitespace
exclude: \.(rst|md|txt|html)$ # Skip rst, md, txt, and html files
name: Fix trailing whitespace
- id: end-of-file-fixer
name: Files end with a newline
- id: check-toml
name: Validate TOML files
- id: check-yaml
args: [--allow-multiple-documents] # Allow multiple document format
name: Validate YAML files
- id: check-merge-conflict
name: Check for merge conflicts
# Verify that pyproject.toml is well formed
- repo: https://github.com/abravalheri/validate-pyproject
rev: 17e12779811926f000bdfa1795f9e3735dd71ac3 # v0.26
Expand Down
6 changes: 3 additions & 3 deletions python-project-template/README.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
[![Benchmarks](https://img.shields.io/github/actions/workflow/status/{{project_organization}}/{{project_name}}/asv-main.yml?label=benchmarks)](https://{{project_organization}}.github.io/{{project_name}}/)
{%- endif %}

This project was automatically generated using the LINCC-Frameworks
This project was automatically generated using the LINCC-Frameworks
[python-project-template](https://github.com/lincc-frameworks/python-project-template).

A repository badge was added to show that this project uses the python-project-template, however it's up to
you whether or not you'd like to display it!

For more information about the project template see the
For more information about the project template see the
[documentation](https://lincc-ppt.readthedocs.io/en/latest/).

## Dev Guide - Getting Started
Expand All @@ -47,7 +47,7 @@ development using the following commands:
Notes:
1. `./.setup_dev.sh` will initialize pre-commit for this local repository, so
that a set of tests will be run prior to completing a local commit. For more
information, see the Python Project Template documentation on
information, see the Python Project Template documentation on
[pre-commit](https://lincc-ppt.readthedocs.io/en/latest/practices/precommit.html)
{%- if include_notebooks %}
2. Install `pandoc` allows you to verify that automatic rendering of Jupyter notebooks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ benchmarks/ ASV performance benchmarks
- **File naming:** `tests/{{package_name}}/<SUBDIR>/test_<name>.py`, mirroring the `src/{{package_name}}/` layout.
- **Fixtures:** defined in `tests/conftest.py`. Use existing fixtures, do not duplicate test data.
- Default test run: `python -m pytest`

Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
Loading