Skip to content

Commit 212a4a8

Browse files
author
github-actions
committed
Updated examples from cookiecutter-mdakit at 7e19e71
0 parents  commit 212a4a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2670
-0
lines changed

.codecov.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Codecov configuration to make it a bit less noisy
2+
coverage:
3+
status:
4+
patch: false
5+
project:
6+
default:
7+
threshold: 50%
8+
comment:
9+
layout: "header"
10+
require_changes: false
11+
branches: null
12+
behavior: default
13+
flags: null
14+
paths: null
15+
ignore:
16+
- "mdakit-Cookie/_version.py"

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mdakit-Cookie/_version.py export-subst

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
## Expected behavior ##
8+
9+
<!-- 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). -->
10+
11+
12+
## Actual behavior ##
13+
14+
<!-- What happened instead. Add as much detail as you can. Include (copy and paste) stack traces and any output. -->
15+
16+
17+
## Code to reproduce the behavior ##
18+
19+
<!-- 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. -->
20+
21+
``` python
22+
import mdakit-Cookie
23+
24+
...
25+
26+
```
27+
28+
## Current environment ##
29+
30+
- Which version are you using? (run `python -c "import mdakit-Cookie; print(mdakit-Cookie.__version__)"`)
31+
- Which version of Python (`python -V`)?
32+
- Which operating system?
33+
- What is the output of `pip list`?
34+
- If you use conda, what is the output of `conda list`?
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
## Is your feature request related to a problem? ##
8+
<!-- A clear and concise description of what the problem is. For example, I'm always frustrated when [...] -->
9+
10+
11+
## Describe the solution you'd like ##
12+
<!-- A description of what you want to happen. For example, I'd like to be able to do [...] -->
13+
14+
15+
## Describe alternatives you've considered ##
16+
<!-- A description of any alternative solutions or features you've considered or possible solutions that you've seen elsewhere. -->
17+
18+
19+
## Additional context ##
20+
<!-- Add any other context or screenshots about the feature request here. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
<!-- Does this PR fix an issue or relate to an existing discussion? Please link it below after "Fixes #" -->
3+
4+
Fixes #
5+
6+
Changes made in this Pull Request:
7+
<!-- Summarise changes made with dot points below -->
8+
-
9+
-
10+
11+
12+
PR Checklist
13+
------------
14+
- [ ] Tests?
15+
- [ ] Docs?
16+
- [ ] CHANGELOG updated?
17+
- [ ] Issue raised/referenced?

.github/workflows/gh-ci.yaml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
name: GH Actions CI
2+
on:
3+
push:
4+
branches:
5+
- "**" # main -- replaced main to allow CI to run in example cookie repo
6+
pull_request:
7+
branches:
8+
- "**" # main -- replaced main to allow CI to run in example cookie repo
9+
schedule:
10+
# Weekly tests at midnight on Sundays run on main by default:
11+
# Scheduled workflows run on the latest commit on the default or base branch.
12+
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
13+
- cron: "0 0 * * 0"
14+
15+
concurrency:
16+
# Specific group naming so CI is only cancelled
17+
# within same PR or on merge to main
18+
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
19+
cancel-in-progress: true
20+
21+
defaults:
22+
run:
23+
shell: bash -l {0}
24+
25+
jobs:
26+
main-tests:
27+
if: "github.repository == 'other/mdakit-Cookie'"
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
os: [ubuntu-latest, macOS-latest, windows-latest]
33+
mdanalysis-version: ["latest", "develop"]
34+
python-version: ["3.10", "3.11", "3.12"]
35+
exclude:
36+
# Entries here exclude particular combinations of the matrix
37+
# Edit or remove as particular combinations come into or out of date
38+
# Below we exclude runs with the latest release and Python 3.12
39+
- mdanalysis-version: "latest"
40+
python-version: "3.12"
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Build information
46+
run: |
47+
uname -a
48+
df -h
49+
ulimit -a
50+
51+
52+
# More info on options: https://github.com/conda-incubator/setup-miniconda
53+
- name: Install conda dependencies
54+
uses: conda-incubator/setup-miniconda@v3
55+
with:
56+
python-version: ${{ matrix.python-version }}
57+
environment-file: devtools/conda-envs/test_env.yaml
58+
add-pip-as-python-dependency: true
59+
architecture: x64
60+
61+
miniforge-variant: Mambaforge
62+
use-mamba: true
63+
channels: conda-forge, defaults
64+
65+
activate-environment: mdakit-Cookie-test
66+
auto-update-conda: true
67+
auto-activate-base: false
68+
show-channel-urls: true
69+
70+
71+
- name: Install MDAnalysis version
72+
uses: MDAnalysis/install-mdanalysis@main
73+
with:
74+
version: ${{ matrix.mdanalysis-version }}
75+
install-tests: false
76+
installer: mamba
77+
shell: bash -l {0}
78+
79+
- name: Install package
80+
run: |
81+
python --version
82+
python -m pip install . --no-deps
83+
84+
- name: Python information
85+
run: |
86+
which python
87+
which pip
88+
pip list
89+
90+
conda info
91+
conda list
92+
93+
94+
- name: Run tests
95+
run: |
96+
pytest -n 2 -v --cov=cookieKit --cov-report=xml --color=yes cookieKit/tests/
97+
98+
- name: codecov
99+
if: github.repository == 'other/mdakit-Cookie' && github.event_name != 'schedule'
100+
uses: codecov/codecov-action@v4
101+
with:
102+
file: coverage.xml
103+
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
104+
verbose: True
105+
# to upload coverage reports, set a secret called CODECOV_TOKEN
106+
# in the repository settings
107+
# (Obtain this from the Codecov website after setting up the repository there)
108+
token: ${{ secrets.CODECOV_TOKEN }}
109+
# To fail the CI if there's an error, keep this set to true
110+
# If repository forks need to run CI, you may need to set this to false
111+
# Forks can't access the CODECOV_TOKEN secret,
112+
# and a failed upload registers as an error
113+
fail_ci_if_error: true
114+
115+
116+
pylint_check:
117+
if: "github.repository == 'other/mdakit-Cookie'"
118+
runs-on: ubuntu-latest
119+
120+
steps:
121+
- uses: actions/checkout@v4
122+
123+
- name: Set up Python
124+
uses: actions/setup-python@v5
125+
with:
126+
python-version: "3.11"
127+
128+
- name: Install Pylint
129+
run: |
130+
which pip
131+
which python
132+
pip install pylint mdanalysis
133+
134+
- name: Run Pylint
135+
env:
136+
PYLINTRC: .pylintrc
137+
run: |
138+
pylint mdakit-Cookie
139+
140+
141+
pypi_check:
142+
if: "github.repository == 'other/mdakit-Cookie'"
143+
runs-on: ubuntu-latest
144+
145+
steps:
146+
- uses: actions/checkout@v4
147+
148+
- name: Set up Python
149+
uses: actions/setup-python@v5
150+
with:
151+
python-version: "3.11"
152+
153+
- name: Install dependencies
154+
run: |
155+
pip install pipx twine
156+
157+
- name: Build package
158+
run: |
159+
python -m pipx run build --sdist
160+
161+
- name: Check package build
162+
run: |
163+
DISTRIBUTION=$(ls -t1 dist/mdakit_cookie-*.tar.gz | head -n 1)
164+
test -n "${DISTRIBUTION}" || { echo "no distribution dist/mdakit-Cookie-*.tar.gz found"; exit 1; }
165+
echo "twine check $DISTRIBUTION"
166+
twine check $DISTRIBUTION

.gitignore

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
.pytest_cache
45+
nosetests.xml
46+
coverage.xml
47+
*.cover
48+
.hypothesis/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
58+
# Flask stuff:
59+
instance/
60+
.webassets-cache
61+
62+
# Scrapy stuff:
63+
.scrapy
64+
65+
# Sphinx documentation
66+
docs/_build/
67+
68+
# PyBuilder
69+
target/
70+
71+
# Jupyter Notebook
72+
.ipynb_checkpoints
73+
74+
# pyenv
75+
.python-version
76+
77+
# celery beat schedule file
78+
celerybeat-schedule
79+
80+
# SageMath parsed files
81+
*.sage.py
82+
83+
# dotenv
84+
.env
85+
86+
# virtualenv
87+
.venv
88+
venv/
89+
ENV/
90+
91+
# Spyder project settings
92+
.spyderproject
93+
.spyproject
94+
95+
# VS Code
96+
.vscode/
97+
98+
# Rope project settings
99+
.ropeproject
100+
101+
# mkdocs documentation
102+
/site
103+
104+
# mypy
105+
.mypy_cache/
106+
.DS_Store
107+
108+
# poetry
109+
poetry.lock

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# To install the git pre-commit hook run:
3+
# pre-commit install
4+
# To update the pre-commit hooks run:
5+
# pre-commit install-hooks
6+
exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
7+
repos:
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: master
10+
hooks:
11+
- id: trailing-whitespace
12+
- id: end-of-file-fixer
13+
- id: debug-statements
14+
- repo: https://github.com/timothycrosley/isort
15+
rev: master
16+
hooks:
17+
- id: isort
18+
- repo: https://gitlab.com/pycqa/flake8
19+
rev: master
20+
hooks:
21+
- id: flake8

0 commit comments

Comments
 (0)