Skip to content

Commit e37accf

Browse files
authored
Merge pull request #9 from Becksteinlab/update-build-deploy
update build process
2 parents 324f140 + 3dddc57 commit e37accf

File tree

7 files changed

+83
-20
lines changed

7 files changed

+83
-20
lines changed

.codecov.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ comment:
1212
behavior: default
1313
flags: null
1414
paths: null
15-
ignore:
16-
- "mdpow-molconfgen/_version.py"

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/deploy.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and upload to PyPi
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
release:
8+
types:
9+
- published
10+
11+
jobs:
12+
test_pypi_push:
13+
environment:
14+
name: deploy
15+
url: https://test.pypi.org/p/mdpow-molconfgen
16+
permissions:
17+
id-token: write
18+
if: |
19+
github.repository == 'Becksteinlab/mdpow-molconfgen' &&
20+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
21+
name: Build, upload and test pure Python wheels to TestPypi
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: testpypi_deploy
28+
uses: MDAnalysis/pypi-deployment@main
29+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
30+
with:
31+
test_submission: true
32+
package_name: 'molconfgen'
33+
34+
pypi_push:
35+
environment:
36+
name: deploy
37+
url: https://pypi.org/p/mdpow-molconfgen
38+
permissions:
39+
id-token: write
40+
if: |
41+
github.repository == 'Becksteinlab/mdpow-molconfgen' &&
42+
(github.event_name == 'release' && github.event.action == 'published')
43+
name: Build, upload and test pure Python wheels to PyPi
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: pypi_deploy
50+
uses: MDAnalysis/pypi-deployment@main
51+
if: github.event_name == 'release' && github.event.action == 'published'
52+
with:
53+
package_name: 'molconfgen'

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,16 @@ ENV/
103103

104104
# mypy
105105
.mypy_cache/
106+
107+
# macOS finder
106108
.DS_Store
107109

108110
# poetry
109111
poetry.lock
110112

111113
# generated data files when running notebooks
112114
*.trr
115+
\#*
113116

114117
# emacs backup files
115118
*~
@@ -119,5 +122,6 @@ poetry.lock
119122
SANDBOX/
120123
tmp/
121124

122-
# versioningit generated files
123-
molconfgen/_version.py
125+
126+
# cursor config
127+
settings.json

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ include MANIFEST.in
33
include AUTHORS.md CHANGELOG.md CODE_OF_CONDUCT.md README.md
44

55
graft molconfgen
6-
recursive-include molconfgen/data *
7-
global-exclude *.py[cod] __pycache__ *.so *~
6+
recursive-include molconfgen/data/*
7+
global-exclude *.py[cod] __pycache__ *.so *~ .DS_Store .ipynb_checkpoints/*

molconfgen/__init__.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@
22
mdpow-molconfgen
33
================
44
5-
Generation of conformers of small molecules.
5+
Generation of conformers of small molecules via dihedral scanning.
6+
Evaluate the potential energy of each conformer in vacuo.
7+
8+
The package is meant to work with the input that is used for the
9+
MDPOW_ package.
10+
11+
.. _MDPOW:: https://mdpow.readthedocs.io
612
"""
713

814
# Version is handled by versioningit
9-
try:
10-
from ._version import __version__
11-
except ImportError:
12-
__version__ = "unknown"
15+
from importlib.metadata import version
16+
17+
__version__ = version("mdpow-molconfgen")
1318

1419
# Add imports here
1520
from . import chem
1621
from . import sampler
22+
from . import output
23+
from . import analyze
24+
from . import workflows

pyproject.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,20 @@ doc = [
4949
# documentation = "https://mdpow-molconfgen.readthedocs.io"
5050

5151
[tool.setuptools]
52-
packages = ["molconfgen", "molconfgen.tests"]
52+
packages = ["molconfgen", "molconfgen.tests", "molconfgen.data"]
5353
include-package-data = true
5454

5555
[tool.versioningit]
56-
vcs = "git"
57-
default-version = "0.0.0"
56+
default-version = "1+unknown"
5857

59-
[tool.versioningit.tag2version]
60-
regex = "^(?P<version>[0-9]+\\.[0-9]+\\.[0-9]+)$"
58+
[tool.versioningit.vcs]
59+
method = "git"
60+
match = ["*"]
6161

62-
[tool.versioningit.write]
63-
file = "molconfgen/_version.py"
62+
[tool.versioningit.format]
63+
distance = "{base_version}+{distance}.{vcs}{rev}"
64+
dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
65+
distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
6466

6567
[tool.pytest.ini_options]
6668
minversion = "6.0"

0 commit comments

Comments
 (0)