Skip to content

Commit aef58db

Browse files
author
github-actions
committed
Updated examples from cookiecutter-mdakit at 99b1fb9
0 parents  commit aef58db

Some content is hidden

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

41 files changed

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