generated from 12rambau/pypackage
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: wire the repository to the copier pypackage (#20)
- Loading branch information
Showing
39 changed files
with
474 additions
and
341 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,12 @@ | ||
# Changes here will be overwritten by Copier | ||
_commit: 0.1.5 | ||
_src_path: gh:12rambau/pypackage | ||
author_email: alice.barthe@cern.ch | ||
author_first_name: Alice | ||
author_last_name: Barthe | ||
author_orcid: 0000-0002-1766-188X | ||
github_repo_name: qutree | ||
github_user: alice4space | ||
project_name: qutree | ||
project_slug: qutree | ||
short_description: plot Bloch Sphere Binary Tree |
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,9 @@ | ||
{ | ||
"name": "Python 3", | ||
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", | ||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/nox:2": {}, | ||
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {} | ||
}, | ||
"postCreateCommand": "pre-commit install" | ||
} |
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
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 |
---|---|---|
@@ -1,38 +1,24 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file was deleted.
Oops, something went wrong.
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
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,52 @@ | ||
name: template update check | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 1 * *" # Run at 00:00 on the first day of each month | ||
|
||
jobs: | ||
check_version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: install dependencies | ||
run: pip install requests | ||
- name: get latest pypackage release | ||
id: get_latest_release | ||
run: | | ||
RELEASE=$(curl -s https://api.github.com/repos/12rambau/pypackage/releases | jq -r '.[0].tag_name') | ||
echo "latest=$RELEASE" >> $GITHUB_OUTPUT | ||
echo "latest release: $RELEASE" | ||
- name: get current pypackage version | ||
id: get_current_version | ||
run: | | ||
RELEASE=$(yq -r "._commit" .copier-answers.yml) | ||
echo "current=$RELEASE" >> $GITHUB_OUTPUT | ||
echo "current release: $RELEASE" | ||
- name: open issue | ||
if: steps.get_current_version.outputs.current != steps.get_latest_release.outputs.latest | ||
uses: rishabhgupta/git-action-issue@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: "Update template to ${{ steps.get_latest_release.outputs.latest }}" | ||
body: | | ||
The package is based on the ${{ steps.get_current_version.outputs.current }} version of [@12rambau/pypackage](https://github.com/12rambau/pypackage). | ||
The latest version of the template is ${{ steps.get_latest_release.outputs.latest }}. | ||
Please consider updating the template to the latest version to include all the latest developments. | ||
Run the following code in your project directory to update the template: | ||
``` | ||
copier update --trust --defaults --vcs-ref ${{ steps.get_latest_release.outputs.latest }} | ||
``` | ||
> **Note** | ||
> You may need to reinstall ``copier`` and ``jinja2-time`` if they are not available in your environment. | ||
After solving the merging issues you can push back the changes to your main branch. |
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
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,86 @@ | ||
name: Unit tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: pre-commit/action@v3.0.0 | ||
|
||
mypy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install nox | ||
run: pip install nox | ||
- name: run mypy checks | ||
run: nox -s mypy | ||
|
||
docs: | ||
needs: [lint, mypy] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install nox | ||
run: pip install nox | ||
- name: build static docs | ||
run: nox -s docs | ||
|
||
build: | ||
needs: [lint, mypy] | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
include: | ||
- os: macos-latest # macos test | ||
python-version: "3.11" | ||
- os: windows-latest # windows test | ||
python-version: "3.11" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install nox | ||
run: pip install nox | ||
- name: test with pytest | ||
run: nox -s test | ||
|
||
coverage: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install deps | ||
run: pip install nox | ||
- name: test with pytest | ||
run: nox -s test | ||
- name: assess dead fixtures | ||
run: nox -s dead-fixtures | ||
- name: codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.