-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update repo from copier template and tweak README
- Loading branch information
Showing
8 changed files
with
150 additions
and
57 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY | ||
_commit: 7a70b18 | ||
_commit: d0e6447 | ||
_src_path: [email protected]:Matgenix/Matgenix-copier-template | ||
author_email: [email protected] | ||
author_fullname: David Waroquiers | ||
|
@@ -15,3 +15,4 @@ repository_namespace: matgenix | |
repository_provider: https://github.com | ||
short_description: QToolKit is a python wrapper interfacing with job queues (e.g. | ||
PBS, SLURM, ...). | ||
|
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,89 @@ | ||
name: Publish and Deploy | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
PUBLISH_UPDATE_BRANCH: main | ||
GIT_USER_NAME: Matgenix | ||
GIT_USER_EMAIL: "[email protected]" | ||
|
||
jobs: | ||
|
||
publish: | ||
name: Publish package | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'matgenix/qtoolkit' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install -U pip | ||
pip install -U setuptools wheel | ||
pip install -e .[all] | ||
- name: Update changelog | ||
uses: CharMixer/auto-changelog-action@v1 | ||
with: | ||
token: ${{ secrets.RELEASE_PAT_BOT }} | ||
release_branch: ${{ env.PUBLISH_UPDATE_BRANCH }} | ||
exclude_labels: "duplicate,question,invalid,wontfix,dependency_updates,skip_changelog" | ||
|
||
- name: Update '${{ env.PUBLISH_UPDATE_BRANCH }}' | ||
uses: CasperWA/push-protected@v2 | ||
with: | ||
token: ${{ secrets.RELEASE_PAT_BOT }} | ||
branch: ${{ env.PUBLISH_UPDATE_BRANCH }} | ||
unprotect_reviews: true | ||
sleep: 15 | ||
force: true | ||
tags: true | ||
|
||
- name: Get tagged versions | ||
run: echo "PREVIOUS_VERSION=$(git tag -l --sort -version:refname | sed -n 2p)" >> $GITHUB_ENV | ||
|
||
- name: Create release-specific changelog | ||
uses: CharMixer/auto-changelog-action@v1 | ||
with: | ||
token: ${{ secrets.RELEASE_PAT_BOT }} | ||
release_branch: ${{ env.PUBLISH_UPDATE_BRANCH }} | ||
since_tag: "${{ env.PREVIOUS_VERSION }}" | ||
output: "release_changelog.md" | ||
exclude_labels: "duplicate,question,invalid,wontfix,dependency_updates,skip_changelog" | ||
|
||
- name: Append changelog to release body | ||
run: | | ||
gh api /repos/${{ github.repository }}/releases/${{ github.event.release.id }} --jq '.body' > release_body.md | ||
cat release_changelog.md >> release_body.md | ||
gh api /repos/${{ github.repository }}/releases/${{ github.event.release.id }} -X PATCH -F body='@release_body.md' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT_BOT }} | ||
|
||
- name: Build source distribution | ||
run: python -m build | ||
|
||
- name: Publish package to Test PyPI first | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} |
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
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,20 @@ | ||
# Installation | ||
|
||
Clone this repository and then install with `pip` in the virtual environment of your choice. | ||
|
||
``` | ||
git clone git@https://github.com:matgenix/qtoolkit | ||
cd qtoolkit | ||
pip install . | ||
``` | ||
|
||
## Development installation | ||
|
||
You can use | ||
|
||
``` | ||
pip install -e .[dev,tests] | ||
``` | ||
|
||
to perform an editable installation with additional development and test dependencies. | ||
You can then activate `pre-commit` in your local repository with `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 |
---|---|---|
|
@@ -12,7 +12,6 @@ authors = [{ name = "David Waroquiers", email = "[email protected]" | |
dynamic = ["version"] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
|
@@ -24,8 +23,8 @@ classifiers = [ | |
"Topic :: Other/Nonlisted Topic", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [] | ||
requires-python = ">=3.9" | ||
dependencies =[] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
|
@@ -73,7 +72,7 @@ max-line-length = 88 | |
max-doc-length = 88 | ||
select = "C, E, F, W, B" | ||
extend-ignore = "E203, W503, E501, F401, RST21" | ||
min-python-version = "3.8.0" | ||
min-python-version = "3.9.0" | ||
docstring-convention = "numpy" | ||
rst-roles = "class, func, ref, obj" | ||
|
||
|