Skip to content

Commit 91382f5

Browse files
github-actions[bot]yekhanfir
authored andcommitted
release: create release-0.0.1a0 branch
1 parent 5a1390e commit 91382f5

File tree

193 files changed

+19908
-2
lines changed

Some content is hidden

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

193 files changed

+19908
-2
lines changed

.github/workflows/deploy_docs.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
docs:
12+
runs-on: ubuntu-latest
13+
container:
14+
image: python:3.10.12-slim-bullseye
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install dependencies
18+
run: |
19+
apt-get update && apt-get install -y coreutils
20+
POETRY_VERSION=1.8.4
21+
pip install -U pip setuptools
22+
pip install poetry==${POETRY_VERSION}
23+
poetry install
24+
25+
- name: Sphinx build
26+
run: |
27+
poetry run sphinx-build -b html docs/source _build
28+
29+
- name: Deploy to GitHub Pages
30+
uses: peaceiris/actions-gh-pages@v3
31+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
32+
with:
33+
publish_branch: gh-pages
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: _build/
36+
force_orphan: true

.github/workflows/publish.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Package publishing
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
publish-new-mlip-release:
9+
runs-on: ubuntu-latest
10+
11+
container:
12+
image: python:3.10.12-slim-bullseye
13+
14+
steps:
15+
- name: checkout
16+
uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: install poetry
21+
run: |
22+
POETRY_VERSION=1.8.4
23+
pip install -U pip setuptools
24+
pip install poetry==${POETRY_VERSION}
25+
26+
# - name: build and publish
27+
# run: |
28+
# export POETRY_PYPI_TOKEN_PYPI=${{secrets.POETRY_PYPI_TOKEN}}
29+
# poetry build
30+
# poetry publish
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Open-source Tests and Linters 🧪
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'new-release*'
8+
9+
jobs:
10+
linters:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: python:3.10.12-slim-bullseye
14+
steps:
15+
- name: checkout code 📦
16+
uses: actions/checkout@v4
17+
18+
# Workaround for https://github.com/actions/checkout/issues/1169
19+
- name: setup
20+
run: |
21+
apt-get update && apt-get install -y \
22+
coreutils \
23+
git
24+
git config --system --add safe.directory $GITHUB_WORKSPACE
25+
26+
- name: install poetry
27+
run: |
28+
POETRY_VERSION=1.8.4
29+
pip install -U pip setuptools
30+
pip install poetry==${POETRY_VERSION}
31+
poetry install
32+
33+
- name: run linters 🖌️
34+
run: |
35+
git init
36+
poetry run pre-commit run --all-files --verbose
37+
38+
tests:
39+
runs-on: ubuntu-latest
40+
container:
41+
image: python:3.10.12-slim-bullseye
42+
steps:
43+
- name: checkout code 📂
44+
uses: actions/checkout@v4
45+
46+
- name: setup
47+
run: |
48+
apt-get update && apt-get install -y \
49+
coreutils \
50+
git
51+
52+
- name: install poetry
53+
run: |
54+
POETRY_VERSION=1.8.4
55+
pip install -U pip setuptools
56+
pip install poetry==${POETRY_VERSION}
57+
poetry install
58+
poetry add git+https://github.com/jax-md/jax-md.git
59+
60+
- name: run tests 🧪
61+
run: |
62+
poetry run pytest --ignore tests/experiments --verbose \
63+
--cov-report xml:coverage.xml \
64+
--cov-report term-missing \
65+
--junitxml=pytest.xml \
66+
--cov=mlip tests/
67+
68+
- name: pytest coverage comment
69+
id: coverageComment
70+
uses: MishaKav/pytest-coverage-comment@main
71+
with:
72+
pytest-xml-coverage-path: ./coverage.xml
73+
junitxml-path: ./pytest.xml
74+
75+
- name: Create the Badge
76+
uses: schneegans/[email protected]
77+
with:
78+
auth: ${{ secrets.BOT_ACCESS_TOKEN }}
79+
gistID: b6e4bf384215e60775699a83c3c00aef
80+
filename: pytest-coverage-comment.json
81+
label: Test Coverage
82+
message: ${{ steps.coverageComment.outputs.coverage }}
83+
color: ${{ steps.coverageComment.outputs.color }}
84+
namedLogo: python

.pre-commit-config.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
default_stages: [ "pre-commit", "commit-msg", "pre-push" ]
2+
default_language_version:
3+
python: python3.10
4+
5+
repos:
6+
- repo: https://github.com/timothycrosley/isort
7+
rev: 5.12.0
8+
hooks:
9+
- id: isort
10+
11+
- repo: https://github.com/psf/black
12+
rev: 24.2.0
13+
hooks:
14+
- id: black
15+
name: "Code formatter"
16+
exclude: notebooks/
17+
18+
- repo: https://github.com/pre-commit/pre-commit-hooks
19+
rev: v4.1.0
20+
hooks:
21+
- id: end-of-file-fixer
22+
name: "End of file fixer"
23+
exclude: docker/template.env *.fasta
24+
- id: debug-statements
25+
name: "Debug imports and breakpoints checker"
26+
- id: requirements-txt-fixer
27+
name: "Requirements txt fixer"
28+
- id: mixed-line-ending
29+
name: "Mixed line ending fixer"
30+
- id: check-yaml
31+
name: "Yaml checker"
32+
args: [ '--unsafe' ]
33+
- id: trailing-whitespace
34+
name: "Trailing whitespace fixer"
35+
36+
- repo: https://github.com/PyCQA/flake8
37+
rev: 4.0.1
38+
hooks:
39+
- id: flake8
40+
# E203 - ":" with whitespace before it
41+
# W503 - line break before binary operator (conflicts with other pre-commit hooks).
42+
# CCR001 - Cognitive complexity (it's too annoying - write the functions you want ;)).
43+
# C408 - allow to write dict() instead of rewriting as literal
44+
name: "Linter"
45+
args:
46+
- --config=setup.cfg
47+
- --ignore=E203,W503,CCR001,C408
48+
- --max-line-length=88
49+
additional_dependencies:
50+
- pep8-naming
51+
- flake8-builtins
52+
- flake8-comprehensions
53+
- flake8-bugbear
54+
- flake8-pytest-style
55+
- flake8-cognitive-complexity
56+
57+
- repo: https://github.com/compilerla/conventional-pre-commit
58+
rev: v2.3.0
59+
hooks:
60+
- id: conventional-pre-commit
61+
name: "Commit linter"
62+
stages: [ commit-msg ]
63+
args: [ ci, build, docs, feat, fix, perf, refactor, style, test, EXP, revert, chore, config, release]

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## Release 1.0.0
4+
5+
To be added upon release...

Dockerfile.release

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM python:3.10-slim
2+
3+
RUN apt-get update && apt-get install -y \
4+
coreutils \
5+
git \
6+
curl \
7+
build-essential \
8+
gh \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
WORKDIR /app
12+
13+
COPY . /app/
14+
15+
ENTRYPOINT ["/bin/bash"]

0 commit comments

Comments
 (0)