-
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.
feat: update gh actions workflows and add docs #11
- Loading branch information
Showing
67 changed files
with
14,159 additions
and
135 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,40 @@ | ||
name: docs | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ main ] | ||
types: [labeled] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
if: github.event.label.name == 'docthis' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- uses: quarto-dev/quarto-actions/setup@v2 | ||
with: | ||
version: "1.5.53" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install .[dev] | ||
- name: Build docs | ||
run: | | ||
make docs | ||
- name: Commit rendered docs | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "chore(docs): render docs" | ||
commit_user_name: "github-actions[bot]" | ||
commit_user_email: "github-actions[bot]@users.noreply.github.com" | ||
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" | ||
file_pattern: "docs/ _inv/ _reference/ _freeze/" | ||
push_options: "--force" | ||
|
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,16 @@ | ||
# Marks all newly opened pull requests as drafts | ||
name: Draft on Open | ||
on: | ||
pull_request: | ||
types: [ opened ] | ||
|
||
jobs: | ||
mark-as-draft: | ||
name: Mark as draft | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Mark as draft | ||
uses: voiceflow/draft-pr@latest | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: publish | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
- name: Install pypa/build | ||
run: >- | ||
python3 -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: python3 -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to PyPI | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/kimmdy-reactions | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
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
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 was deleted.
Oops, something went wrong.
15 changes: 8 additions & 7 deletions
15
.github/workflows/test-pr.yml → .github/workflows/tests.yml
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,26 +1,27 @@ | ||
name: test PR | ||
name: tests | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ main ] | ||
types: [labeled] | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
test: | ||
if: github.event.label.name == 'testthis' && !startsWith(github.head_ref, 'release-please-') | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
container: riedmiki/gromacs-plumed-python:2021 | ||
container: riedmiki/gromacs-plumed-python:2023.5-plumed | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: psf/black@stable | ||
- name: run tox | ||
run: tox | ||
- name: zip coverage report | ||
if: ${{ !cancelled() }} | ||
run: zip -r htmlcov.zip htmlcov || true | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: coverage artifact | ||
path: htmlcov.zip | ||
|
||
|
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,29 @@ | ||
.PHONY: Makefile setup-docs preview docs clear-docs watch | ||
|
||
preview: | ||
quarto preview | ||
|
||
watch: | ||
python -m quartodoc build --watch | ||
|
||
docs: | ||
python -m quartodoc build | ||
python -m quartodoc interlinks | ||
quarto render | ||
|
||
setup-docs: clear-docs | ||
quarto add --no-prompt machow/quartodoc | ||
python -m quartodoc build --verbose | ||
python -m quartodoc interlinks | ||
quarto render | ||
|
||
clear-docs: | ||
rm -rf docs | ||
rm -rf .quarto | ||
rm -rf _inv | ||
rm -rf _reference | ||
rm -f ./objects.json | ||
rm -f _sidebar.yml | ||
|
||
format: | ||
black src tests |
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,15 +1,29 @@ | ||
# Reaction template for KIMMDY | ||
# A collection of simple reactions for KIMMDY | ||
|
||
[![test latest release](https://github.com/graeter-group/kimmdy-reactions/actions/workflows/tests.yml/badge.svg?branch=release-please--branches--main)](https://github.com/graeter-group/kimmdy-reactions/actions/workflows/tests.yml/?branch=release-please--branches--main) | ||
|
||
## Documentation | ||
|
||
See [KIMMDY documentation](https://graeter-group.github.io/kimmdy/) | ||
and [documentation for these reactions](https://graeter-group.github.io/kimmdy-reactions/). | ||
|
||
## Installation | ||
Should get installed together with kimmdy. If you want to install it separatly: | ||
|
||
* Download | ||
* `pip install -e ./` or for development: `pip install -r requirements.txt` | ||
Together with KIMMDY | ||
|
||
```bash | ||
pip installl kimmdy[reactions] | ||
``` | ||
|
||
To install it separatly: | ||
|
||
```bash | ||
pip install kimmdy-reactions | ||
``` | ||
|
||
## Making your own | ||
|
||
* Implement your reaction as a subclass of `kimmdy.reaction.Reaction` | ||
* Register your Reaction class in the **[options.entry_points]** section in the setup.cfg. The name you give here must match the entry in the config.yml for Kimmdy! | ||
|
||
|
||
|
||
|
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,3 @@ | ||
*.html | ||
*_files/ |
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,7 @@ | ||
title: Interlinks | ||
author: Michael Chow | ||
version: 1.1.0 | ||
quarto-required: ">=1.2.0" | ||
contributes: | ||
filters: | ||
- interlinks.lua |
Oops, something went wrong.