-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d902107
Showing
31 changed files
with
1,159 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,24 @@ | ||
# Changes here will be overwritten by Copier | ||
_commit: v2.0.1 | ||
_src_path: gh:lincc-frameworks/python-project-template | ||
author_email: [email protected] | ||
author_name: Drew Oldag | ||
create_example_module: true | ||
custom_install: true | ||
enforce_style: | ||
- black | ||
failure_notification: | ||
- slack | ||
include_benchmarks: false | ||
include_docs: true | ||
include_notebooks: true | ||
mypy_type_checking: none | ||
package_name: kbmod_wf | ||
project_license: MIT | ||
project_name: kbmod-wf | ||
project_organization: dirac-institute | ||
python_versions: | ||
- '3.9' | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' |
This file contains 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,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ | ||
ref-names: $Format:%D$ |
This file contains 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,24 @@ | ||
# For explanation of this file and uses see | ||
# https://git-scm.com/docs/gitattributes | ||
# https://developer.lsst.io/git/git-lfs.html#using-git-lfs-enabled-repositories | ||
# https://lincc-ppt.readthedocs.io/en/latest/practices/git-lfs.html | ||
# | ||
# Used by https://github.com/lsst/afwdata.git | ||
# *.boost filter=lfs diff=lfs merge=lfs -text | ||
# *.dat filter=lfs diff=lfs merge=lfs -text | ||
# *.fits filter=lfs diff=lfs merge=lfs -text | ||
# *.gz filter=lfs diff=lfs merge=lfs -text | ||
# | ||
# apache parquet files | ||
# *.parq filter=lfs diff=lfs merge=lfs -text | ||
# | ||
# sqlite files | ||
# *.sqlite3 filter=lfs diff=lfs merge=lfs -text | ||
# | ||
# gzip files | ||
# *.gz filter=lfs diff=lfs merge=lfs -text | ||
# | ||
# png image files | ||
# *.png filter=lfs diff=lfs merge=lfs -text | ||
|
||
.git_archival.txt export-subst |
This file contains 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,8 @@ | ||
--- | ||
name: General issue | ||
about: Quickly create a general issue | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- |
This file contains 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,17 @@ | ||
--- | ||
name: Bug report | ||
about: Tell us about a problem to fix | ||
title: 'Short description' | ||
labels: 'bug' | ||
assignees: '' | ||
|
||
--- | ||
**Bug report** | ||
|
||
|
||
**Before submitting** | ||
Please check the following: | ||
|
||
- [ ] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem. | ||
- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead. | ||
- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list. |
This file contains 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,18 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: 'Short description' | ||
labels: 'enhancement' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Feature request** | ||
|
||
|
||
**Before submitting** | ||
Please check the following: | ||
|
||
- [ ] I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves. | ||
- [ ] I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality. | ||
- [ ] If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps. |
This file contains 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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains 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,63 @@ | ||
<!-- | ||
Thank you for your contribution to the repo :) | ||
Pull Request (PR) Instructions: | ||
Provide a general summary of your changes in the Title above. Fill out each section of the template, and replace the space with an `x` in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help! Once you are satisfied with the pull request, click the "Create pull request" button to submit it for review. | ||
Before submitting this PR, please ensure that your input and responses are entered in the designated space provided below each section to keep all project-related information organized and easily accessible. | ||
How to link to a PR: | ||
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue | ||
--> | ||
|
||
## Change Description | ||
<!--- | ||
Describe your changes in detail. In your description, you should answer questions like "Why is this change required? What problem does it solve?". | ||
If it fixes an open issue, please link to the issue here. If this PR closes an issue, put the word 'closes' before the issue link to auto-close the issue when the PR is merged. | ||
--> | ||
- [ ] My PR includes a link to the issue that I am addressing | ||
|
||
|
||
|
||
## Solution Description | ||
<!-- Please explain the technical solution that I have provided and how it addresses the issue or feature being implemented --> | ||
|
||
|
||
|
||
## Code Quality | ||
- [ ] I have read the Contribution Guide | ||
- [ ] My code follows the code style of this project | ||
- [ ] My code builds (or compiles) cleanly without any errors or warnings | ||
- [ ] My code contains relevant comments and necessary documentation | ||
|
||
## Project-Specific Pull Request Checklists | ||
<!--- Please only use the checklist that apply to your change type(s) --> | ||
|
||
### Bug Fix Checklist | ||
- [ ] My fix includes a new test that breaks as a result of the bug (if possible) | ||
- [ ] My change includes a breaking change | ||
- [ ] My change includes backwards compatibility and deprecation warnings (if possible) | ||
|
||
### New Feature Checklist | ||
- [ ] I have added or updated the docstrings associated with my feature using the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html) | ||
- [ ] I have updated the tutorial to highlight my new feature (if appropriate) | ||
- [ ] I have added unit/End-to-End (E2E) test cases to cover my new feature | ||
- [ ] My change includes a breaking change | ||
- [ ] My change includes backwards compatibility and deprecation warnings (if possible) | ||
|
||
### Documentation Change Checklist | ||
- [ ] Any updated docstrings use the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html) | ||
|
||
### Build/CI Change Checklist | ||
- [ ] If required or optional dependencies have changed (including version numbers), I have updated the README to reflect this | ||
- [ ] If this is a new CI setup, I have added the associated badge to the README | ||
|
||
<!-- ### Version Change Checklist [For Future Use] --> | ||
|
||
### Other Change Checklist | ||
- [ ] Any new or updated docstrings use the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html). | ||
- [ ] I have updated the tutorial to highlight my new feature (if appropriate) | ||
- [ ] I have added unit/End-to-End (E2E) test cases to cover any changes | ||
- [ ] My change includes a breaking change | ||
- [ ] My change includes backwards compatibility and deprecation warnings (if possible) |
This file contains 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,38 @@ | ||
# This workflow will install Python dependencies, build the package and then build the documentation. | ||
|
||
name: Build documentation | ||
|
||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
python -m pip install --upgrade pip | ||
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi | ||
pip install . | ||
- name: Install notebook requirements | ||
run: | | ||
sudo apt-get install pandoc | ||
- name: Build docs | ||
run: | | ||
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html |
This file contains 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,35 @@ | ||
# 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 | ||
name: Run pre-commit hooks | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pre-commit-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- 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 | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --verbose | ||
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/[email protected] | ||
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false |
This file contains 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,37 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://github.com/pypa/gh-action-pypi-publish#trusted-publishing | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains 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,80 @@ | ||
# This workflow will run daily at 06:45. | ||
# It will install Python dependencies and run tests with a variety of Python versions. | ||
# See documentation for help debugging smoke test issues: | ||
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_testing.html#version-culprit | ||
|
||
name: Unit test smoke test | ||
|
||
on: | ||
|
||
# Runs this workflow automatically | ||
schedule: | ||
- cron: 45 6 * * * | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
python -m pip install --upgrade pip | ||
pip install -e .[dev] | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: List dependencies | ||
run: | | ||
pip list | ||
- name: Run unit tests with pytest | ||
run: | | ||
python -m pytest | ||
- name: Send status to Slack app | ||
if: ${{ failure() && github.event_name != 'workflow_dispatch' }} | ||
id: slack | ||
uses: slackapi/slack-github-action@v1 | ||
with: | ||
# For posting a rich message using Block Kit | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "${{ github.repository }}" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "GitHub Action build result: *${{ job.status }}* :${{ job.status }}:" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
Oops, something went wrong.