Skip to content

Commit

Permalink
Modernize packaging (#65)
Browse files Browse the repository at this point in the history
* Update packaging
* Add *.lock to gitignore
  • Loading branch information
IAlibay authored Dec 23, 2023
1 parent a0f8ece commit 13b7ec5
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 2,404 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build information
run: |
uname -a
Expand All @@ -57,11 +60,9 @@ jobs:
environment-file: devtools/environment.yml
add-pip-as-python-dependency: true
architecture: x64

miniforge-variant: Mambaforge
use-mamba: true
channels: conda-forge, defaults

activate-environment: propkatraj-test
auto-update-conda: true
auto-activate-base: false
Expand All @@ -85,8 +86,12 @@ jobs:
which python
which pip
pip list
conda info
conda list
mamba info
mamba list
- name: Test imports
run: |
python -Ic "import propkatraj; print(propkatraj.__version__)"
- name: Run tests
run: |
Expand Down Expand Up @@ -132,7 +137,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ needs.environment-config.outputs.stable-python-version }}
uses: actions/setup-python@v4
Expand All @@ -141,10 +146,12 @@ jobs:

- name: Install dependencies
run: |
pip install setuptools cython numpy twine
pip install pipx twine
- name: Build package
run: |
python setup.py sdist
python -m pipx run build --sdist
- name: Check package build
run: |
DISTRIBUTION=$(ls -t1 dist/propkatraj-*.tar.gz | head -n 1)
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,6 @@ ENV/
# propka junk
current.pka
current.propka_input

# lock files
*.lock
5 changes: 2 additions & 3 deletions propkatraj/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .propkatraj import PropkaTraj

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from importlib.metadata import version
__version__ = version('propkatraj')
Loading

0 comments on commit 13b7ec5

Please sign in to comment.