Skip to content

Commit 1009b2b

Browse files
update metadata (#129)
- use setup.cfg for metadata - use setuptools extras for docs/tests/... - add pyproject.toml - use setuptools-scm for version tracking
1 parent 74c83fe commit 1009b2b

File tree

11 files changed

+112
-2442
lines changed

11 files changed

+112
-2442
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
uses: conda-incubator/setup-miniconda@v2
6969
with:
7070
activate-environment: test
71-
environment-file: requirements.yml
7271
miniforge-variant: Mambaforge
7372
python-version: ${{ matrix.python-version }}
7473
use-mamba: true
@@ -78,6 +77,19 @@ jobs:
7877
- name: Conda info
7978
run: conda info --all
8079

80+
- name: Install dependencies
81+
run: |
82+
# parse requirements to install as much as possible with conda
83+
mamba install --name base pip2conda
84+
${CONDA_PYTHON_EXE} -m pip2conda \
85+
--all \
86+
--output environment.txt \
87+
--python-version ${{ matrix.python-version }}
88+
echo "-----------------"
89+
cat environment.txt
90+
echo "-----------------"
91+
mamba install --quiet --yes --name test --file environment.txt
92+
8193
- name: Install PyOmicron
8294
run: python -m pip install --editable . --no-build-isolation -vv
8395

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@
1717

1818
# testing stuff
1919
/.pytest_cache/
20+
21+
# setuptools-scm
22+
omicron/_version.py

docs/requirements.txt

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

omicron/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
"""Utilities for controlling and processing Omicron in python
2020
"""
2121

22-
from ._version import get_versions
22+
try:
23+
from ._version import version as __version__
24+
except ModuleNotFoundError: # pragma: no cover
25+
# development mode
26+
__version__ = 'dev'
2327

24-
__version__ = get_versions()['version']
2528
__author__ = 'Duncan Macleod <[email protected]>'
26-
27-
del get_versions

0 commit comments

Comments
 (0)