-
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.
Updated examples from cookiecutter-mdakit at 99b1fb9
- Loading branch information
github-actions
committed
Aug 18, 2024
0 parents
commit c61fe90
Showing
44 changed files
with
2,642 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,16 @@ | ||
# Codecov configuration to make it a bit less noisy | ||
coverage: | ||
status: | ||
patch: false | ||
project: | ||
default: | ||
threshold: 50% | ||
comment: | ||
layout: "header" | ||
require_changes: false | ||
branches: null | ||
behavior: default | ||
flags: null | ||
paths: null | ||
ignore: | ||
- "mdakit-Cookie/_version.py" |
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 @@ | ||
mdakit-Cookie/_version.py 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,34 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
## Expected behavior ## | ||
|
||
<!-- A clear and concise description of what you want to do and what you think should happen. (Code to reproduce the behavior can be added below). --> | ||
|
||
|
||
## Actual behavior ## | ||
|
||
<!-- What happened instead. Add as much detail as you can. Include (copy and paste) stack traces and any output. --> | ||
|
||
|
||
## Code to reproduce the behavior ## | ||
|
||
<!-- Show us how to reproduce the failure. If you can, use trajectory files from the test data. Use the code snipped below as a starting point. --> | ||
|
||
``` python | ||
import mdakit-Cookie | ||
|
||
... | ||
|
||
``` | ||
|
||
## Current environment ## | ||
|
||
- Which version are you using? (run `python -c "import mdakit-Cookie; print(mdakit-Cookie.__version__)"`) | ||
- Which version of Python (`python -V`)? | ||
- Which operating system? | ||
- What is the output of `pip list`? | ||
- If you use conda, what is the output of `conda 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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
## Is your feature request related to a problem? ## | ||
<!-- A clear and concise description of what the problem is. For example, I'm always frustrated when [...] --> | ||
|
||
|
||
## Describe the solution you'd like ## | ||
<!-- A description of what you want to happen. For example, I'd like to be able to do [...] --> | ||
|
||
|
||
## Describe alternatives you've considered ## | ||
<!-- A description of any alternative solutions or features you've considered or possible solutions that you've seen elsewhere. --> | ||
|
||
|
||
## Additional context ## | ||
<!-- Add any other context or screenshots about the feature request here. --> |
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 @@ | ||
|
||
<!-- Does this PR fix an issue or relate to an existing discussion? Please link it below after "Fixes #" --> | ||
|
||
Fixes # | ||
|
||
Changes made in this Pull Request: | ||
<!-- Summarise changes made with dot points below --> | ||
- | ||
- | ||
|
||
|
||
PR Checklist | ||
------------ | ||
- [ ] Tests? | ||
- [ ] Docs? | ||
- [ ] CHANGELOG updated? | ||
- [ ] Issue raised/referenced? |
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,163 @@ | ||
name: GH Actions CI | ||
on: | ||
push: | ||
branches: | ||
- "**" # main -- replaced main to allow CI to run in example cookie repo | ||
pull_request: | ||
branches: | ||
- "**" # main -- replaced main to allow CI to run in example cookie repo | ||
schedule: | ||
# Weekly tests at midnight on Sundays run on main by default: | ||
# Scheduled workflows run on the latest commit on the default or base branch. | ||
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule) | ||
- cron: "0 0 * * 0" | ||
|
||
concurrency: | ||
# Specific group naming so CI is only cancelled | ||
# within same PR or on merge to main | ||
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
main-tests: | ||
if: "github.repository == 'other/mdakit-Cookie'" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
mdanalysis-version: ["latest", "develop"] | ||
python-version: ["3.10", "3.11", "3.12"] | ||
exclude: | ||
# Entries here exclude particular combinations of the matrix | ||
# Edit or remove as particular combinations come into or out of date | ||
# Below we exclude runs with the latest release and Python 3.12 | ||
- mdanalysis-version: "latest" | ||
python-version: "3.12" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build information | ||
run: | | ||
uname -a | ||
df -h | ||
ulimit -a | ||
# More info on options: https://github.com/conda-incubator/setup-miniconda | ||
- name: Install conda dependencies | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: devtools/conda-envs/test_env.yaml | ||
add-pip-as-python-dependency: true | ||
|
||
channels: defaults | ||
|
||
activate-environment: mdakit-Cookie-test | ||
auto-update-conda: true | ||
auto-activate-base: false | ||
show-channel-urls: true | ||
|
||
|
||
- name: Install MDAnalysis version | ||
uses: MDAnalysis/install-mdanalysis@main | ||
with: | ||
version: ${{ matrix.mdanalysis-version }} | ||
install-tests: false | ||
installer: pip | ||
shell: bash -l {0} | ||
|
||
- name: Install package | ||
run: | | ||
python --version | ||
python -m pip install . --no-deps | ||
- name: Python information | ||
run: | | ||
which python | ||
which pip | ||
pip list | ||
conda info | ||
conda list | ||
- name: Run tests | ||
run: | | ||
pytest -n 2 -v --cov=cookieKit --cov-report=xml --color=yes cookieKit/tests/ | ||
- name: codecov | ||
if: github.repository == 'other/mdakit-Cookie' && github.event_name != 'schedule' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
file: coverage.xml | ||
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} | ||
verbose: True | ||
# to upload coverage reports, set a secret called CODECOV_TOKEN | ||
# in the repository settings | ||
# (Obtain this from the Codecov website after setting up the repository there) | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
# To fail the CI if there's an error, keep this set to true | ||
# If repository forks need to run CI, you may need to set this to false | ||
# Forks can't access the CODECOV_TOKEN secret, | ||
# and a failed upload registers as an error | ||
fail_ci_if_error: true | ||
|
||
|
||
pylint_check: | ||
if: "github.repository == 'other/mdakit-Cookie'" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install Pylint | ||
run: | | ||
which pip | ||
which python | ||
pip install pylint mdanalysis | ||
- name: Run Pylint | ||
env: | ||
PYLINTRC: .pylintrc | ||
run: | | ||
pylint mdakit-Cookie | ||
pypi_check: | ||
if: "github.repository == 'other/mdakit-Cookie'" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install pipx twine | ||
- name: Build package | ||
run: | | ||
python -m pipx run build --sdist | ||
- name: Check package build | ||
run: | | ||
DISTRIBUTION=$(ls -t1 dist/mdakit_cookie-*.tar.gz | head -n 1) | ||
test -n "${DISTRIBUTION}" || { echo "no distribution dist/mdakit-Cookie-*.tar.gz found"; exit 1; } | ||
echo "twine check $DISTRIBUTION" | ||
twine check $DISTRIBUTION |
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,109 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
.pytest_cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
.venv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# VS Code | ||
.vscode/ | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.DS_Store | ||
|
||
# poetry | ||
poetry.lock |
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,21 @@ | ||
|
||
# To install the git pre-commit hook run: | ||
# pre-commit install | ||
# To update the pre-commit hooks run: | ||
# pre-commit install-hooks | ||
exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)' | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: master | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: master | ||
hooks: | ||
- id: isort | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: master | ||
hooks: | ||
- id: flake8 |
Oops, something went wrong.