Skip to content

Commit dfb6a31

Browse files
authored
Merge pull request #22 from hechth/dependency_updates
update to peotry as a buildsystem and update dependencies
2 parents d00f892 + 8198a0a commit dfb6a31

File tree

8 files changed

+2214
-144
lines changed

8 files changed

+2214
-144
lines changed

.github/workflows/CI_build.yml

Lines changed: 30 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -14,72 +14,75 @@ on:
1414
jobs:
1515

1616
first_check:
17-
name: first code check / python-3.8 / ubuntu-latest
17+
name: first code check / python-3.10 / ubuntu-latest
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
21-
- name: Set up Python 3.9
21+
- name: Set up Python 3.10
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: 3.9
24+
python-version: '3.10'
2525
- name: Python info
2626
run: |
2727
which python
2828
python --version
2929
- name: Build package and create dev environment
3030
run: |
31-
python -m pip install --upgrade pip
32-
pip install -e .[dev]
31+
python -m pip install --upgrade pip poetry
32+
poetry lock
33+
poetry install --with dev
3334
- name: Show pip list
3435
run: |
3536
pip list
3637
- name: Test with coverage
3738
run: |
38-
pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
39+
poetry run pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
3940
- name: Correct coverage paths
4041
run: sed -i "s+$PWD/++g" coverage.xml
4142
- name: Check style against standards using prospector
4243
shell: bash -l {0}
43-
run: prospector -o grouped -o pylint:pylint-report.txt
44+
run: poetry run prospector -o grouped -o pylint:pylint-report.txt
4445
- name: Check whether import statements are used consistently
45-
run: isort . --check-only --diff
46+
run: poetry run isort . --check-only --diff
4647

4748
build_pypi:
4849
name: Test pypi build
4950
runs-on: ubuntu-latest
5051
needs: first_check
5152
steps:
5253
- uses: actions/checkout@v4
53-
- name: Set up Python 3.9
54+
- name: Set up Python 3.10
5455
uses: actions/setup-python@v5
5556
with:
56-
python-version: 3.9
57+
python-version: '3.10'
5758
- name: Python info
5859
run: |
5960
which python
6061
python --version
6162
- name: Install dependencies
6263
run: |
63-
python -m pip install --upgrade pip
64+
python -m pip install --upgrade pip poetry twine
6465
- name: Build package
6566
run: |
66-
pip install wheel twine
67-
python setup.py sdist bdist_wheel
67+
poetry build
6868
- name: Test package
6969
run: |
70+
poetry lock
71+
poetry install --only dev
7072
python -m twine check dist/*
7173
- name: Show pip list
7274
run: |
7375
pip list
7476
- name: Install development dependencies
7577
run: |
76-
pip install -e .[dev]
78+
poetry lock
79+
poetry install
7780
- name: Show pip list again
7881
run: |
7982
pip list
8083
- name: Run tests
8184
run: |
82-
pytest
85+
poetry run pytest
8386
- name: Show environment variables
8487
shell: bash -l {0}
8588
run: |
@@ -93,48 +96,25 @@ jobs:
9396
fail-fast: false
9497
matrix:
9598
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
96-
python-version: ['3.8', '3.9', '3.10', '3.11']
97-
exclude:
98-
- os: ubuntu-latest
99-
python-version: 3.9
99+
python-version: ['3.10', '3.11', '3.12']
100100
steps:
101-
- uses: actions/checkout@v2
102-
with:
103-
fetch-depth: "0"
104-
- name: Create conda environment
105-
uses: conda-incubator/setup-miniconda@v3
101+
- uses: actions/checkout@v4
102+
- name: Set up Python
103+
uses: actions/setup-python@v5
106104
with:
107-
auto-update-conda: true
108105
python-version: ${{ matrix.python-version }}
109-
- name: Show conda config
110-
shell: bash -l {0}
111-
run: |
112-
conda info
113-
conda list
114-
conda config --show-sources
115-
conda config --show
116-
conda env list
117106
- name: Python info
118-
shell: bash -l {0}
119107
run: |
120108
which python
121109
python --version
122-
- name: Show environment variables
123-
shell: bash -l {0}
124-
run: |
125-
env | sort
126-
- name: Install conda dependencies
127-
shell: bash -l {0}
110+
- name: Install dependencies (includinv dev + chemistry)
128111
run: |
129-
conda install -c conda-forge rdkit
130-
- name: Install dev dependencies
131-
shell: bash -l {0}
132-
run: |
133-
python -m pip install --upgrade pip
134-
pip install -e .[dev]
112+
python -m pip install --upgrade pip poetry
113+
poetry lock
114+
poetry install
135115
- name: Show pip list
136-
shell: bash -l {0}
137-
run: pip list
116+
run: |
117+
pip list
138118
- name: Run tests
139-
shell: bash -l {0}
140-
run: pytest
119+
run: |
120+
poetry run pytest

0 commit comments

Comments
 (0)