Skip to content

Commit 0c9d6cf

Browse files
author
github-actions
committed
Updated examples from cookiecutter-mdakit at b5616cd
0 parents  commit 0c9d6cf

Some content is hidden

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

42 files changed

+2542
-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: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
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 == 'MDAnalysis/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+
channels: defaults
62+
63+
activate-environment: mdakit-Cookie-test
64+
auto-update-conda: true
65+
auto-activate-base: false
66+
show-channel-urls: true
67+
68+
69+
- name: Install MDAnalysis version
70+
uses: MDAnalysis/install-mdanalysis@main
71+
with:
72+
version: ${{ matrix.mdanalysis-version }}
73+
install-tests: false
74+
installer: pip
75+
shell: bash -l {0}
76+
77+
- name: Install package
78+
run: |
79+
python --version
80+
python -m pip install . --no-deps
81+
82+
- name: Python information
83+
run: |
84+
which python
85+
which pip
86+
pip list
87+
88+
conda info
89+
conda list
90+
91+
92+
- name: Run tests
93+
run: |
94+
pytest -n 2 -v --cov=cookieKit --cov-report=xml --color=yes cookieKit/tests/
95+
96+
- name: codecov
97+
if: github.repository == 'MDAnalysis/mdakit-Cookie' && github.event_name != 'schedule'
98+
uses: codecov/codecov-action@v4
99+
with:
100+
file: coverage.xml
101+
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
102+
verbose: True
103+
# to upload coverage reports, set a secret called CODECOV_TOKEN
104+
# in the repository settings
105+
# (Obtain this from the Codecov website after setting up the repository there)
106+
token: ${{ secrets.CODECOV_TOKEN }}
107+
# To fail the CI if there's an error, keep this set to true
108+
# If repository forks need to run CI, you may need to set this to false
109+
# Forks can't access the CODECOV_TOKEN secret,
110+
# and a failed upload registers as an error
111+
fail_ci_if_error: true
112+
113+
114+
pylint_check:
115+
if: "github.repository == 'MDAnalysis/mdakit-Cookie'"
116+
runs-on: ubuntu-latest
117+
118+
steps:
119+
- uses: actions/checkout@v4
120+
121+
- name: Set up Python
122+
uses: actions/setup-python@v5
123+
with:
124+
python-version: "3.11"
125+
126+
- name: Install Pylint
127+
run: |
128+
which pip
129+
which python
130+
pip install pylint mdanalysis
131+
132+
- name: Run Pylint
133+
env:
134+
PYLINTRC: .pylintrc
135+
run: |
136+
pylint mdakit-Cookie
137+
138+
139+
pypi_check:
140+
if: "github.repository == 'MDAnalysis/mdakit-Cookie'"
141+
runs-on: ubuntu-latest
142+
143+
steps:
144+
- uses: actions/checkout@v4
145+
146+
- name: Set up Python
147+
uses: actions/setup-python@v5
148+
with:
149+
python-version: "3.11"
150+
151+
- name: Install dependencies
152+
run: |
153+
pip install pipx twine
154+
155+
- name: Build package
156+
run: |
157+
python -m pipx run build --sdist
158+
159+
- name: Check package build
160+
run: |
161+
DISTRIBUTION=$(ls -t1 dist/mdakit_cookie-*.tar.gz | head -n 1)
162+
test -n "${DISTRIBUTION}" || { echo "no distribution dist/mdakit-Cookie-*.tar.gz found"; exit 1; }
163+
echo "twine check $DISTRIBUTION"
164+
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)