Skip to content

Commit

Permalink
Merge branch 'master' into auto_mod_mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
pckroon authored Sep 9, 2024
2 parents 05fd326 + 5fb0154 commit 44d9235
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 54 deletions.
70 changes: 33 additions & 37 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,25 @@ env:

jobs:
build:

runs-on: ubuntu-20.04

strategy:
matrix:
py_version: ["3.8", "3.9", "3.10", "3.11"]
py_version: ["3.9", "3.10", "3.11", "3.12"]
include:
- py_version: "3.8"
WITH_CODECOV: true
- py_version: "3.9"
WITH_CODECOV: true
- py_version: "3.10"
WITH_CODECOV: true
- py_version: "3.11"
WITH_CODECOV: true
- py_version: "3.12"
WITH_CODECOV: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py_version }}
cache: pip
Expand All @@ -54,6 +53,7 @@ jobs:
run: |
coverage run $(which pytest) -vv --hypothesis-show-statistics
coverage report --omit='*/bin/pytest'
coverage xml
- if: ${{ matrix.WITH_CODECOV }}
name: Upload coverage codecov
Expand All @@ -68,11 +68,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.x'
cache: pip
cache-dependency-path: |
**/setup.cfg
Expand All @@ -93,11 +93,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.x'
cache: pip
cache-dependency-path: |
**/setup.cfg
Expand All @@ -118,37 +118,33 @@ jobs:
deploy:
needs: [build, lint, docs]
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/vermouth
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: |
**/setup.cfg
**/requirements-*.txt
**/pyproject.toml
- name: Install dependencies
run: |
pip install --upgrade setuptools pip
pip install --upgrade .
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
pip install pbr
run: |
python3 -m pip install build pbr --user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish package to PyPI
run: python3 -m build --sdist --wheel --outdir dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
63 changes: 49 additions & 14 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,25 @@ env:

jobs:
build:

runs-on: ubuntu-20.04

strategy:
matrix:
py_version: ["3.8", "3.9", "3.10", "3.11"]
py_version: ["3.9", "3.10", "3.11", "3.12"]
include:
- py_version: "3.8"
WITH_CODECOV: true
- py_version: "3.9"
WITH_CODECOV: true
- py_version: "3.10"
WITH_CODECOV: true
- py_version: "3.11"
WITH_CODECOV: true
- py_version: "3.12"
WITH_CODECOV: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py_version }}
cache: pip
Expand Down Expand Up @@ -71,11 +70,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.x'
cache: pip
cache-dependency-path: |
**/setup.cfg
Expand All @@ -96,11 +95,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.x'
cache: pip
cache-dependency-path: |
**/setup.cfg
Expand All @@ -116,3 +115,39 @@ jobs:
run: |
mkdir -p doc/source/_static
sphinx-build -EnW -b html doc/source/ doc/build/html
deploy:
needs: [build, lint, docs]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/vermouth
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: |
**/setup.cfg
**/requirements-*.txt
**/pyproject.toml
- name: Install dependencies
run: |
pip install --upgrade setuptools pip
pip install --upgrade .
- name: Install pypa/build
run: |
python3 -m pip install build pbr --user
- name: Build a binary wheel and a source tarball
run: python3 -m build --sdist --wheel --outdir dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ requires = [
"setuptools >= 30.3.0",
"pbr",
]
build-backend = "pbr.build"

[tool.pytest.ini_options]
addopts = "--import-mode=importlib"
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Scientific/Engineering :: Bio-Informatics
Topic :: Scientific/Engineering :: Chemistry
keywords = martini MD martinize
Expand Down
30 changes: 30 additions & 0 deletions vermouth/data/mappings/his.charmm.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[ block ]
[ from ]
charmm
[ to ]
martini22

[ from blocks ]
HIS

[ to blocks ]
HSE

[ mapping ]
N BB
HN BB
CA BB
HA BB
CB SC1
HB1 SC1
HB2 SC1
CD2 SC2
HD2 SC2
CG SC1
NE2 SC2
HE2 SC2
ND1 SC3
CE1 SC3
HE1 SC3
C BB
O BB
27 changes: 27 additions & 0 deletions vermouth/data/mappings/his.gromos.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[ block ]
[ from ]
gromos
[ to ]
martini22

[ from blocks ]
HIS

[ to blocks ]
HSE

[ mapping ]
N BB
H BB
CA BB
CB SC1
CG SC1
ND1 SC3
HD1 SC3
CD2 SC2
HD2 SC2
CE1 SC3
HE1 SC3
NE2 SC2
C BB
O BB

0 comments on commit 44d9235

Please sign in to comment.