Skip to content

Commit 18ff3ee

Browse files
authored
Strict python minimum version for install (Issue #112) and auto-deployment via actions (#113)
* Strict python minimum version for install * Add action for pypi deployment
1 parent a15397d commit 18ff3ee

5 files changed

Lines changed: 80 additions & 5 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build and upload to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
release:
11+
types:
12+
- published
13+
14+
15+
concurrency:
16+
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}"
17+
cancel-in-progress: true
18+
19+
20+
defaults:
21+
run:
22+
shell: bash -l {0}
23+
24+
25+
jobs:
26+
build_wheels:
27+
environment: deploy
28+
if: "github.repository == 'MDAnalysis/GridDataFormats'"
29+
name: Build pure Python wheel
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- uses: actions/checkout@v3
34+
35+
- name: setup_miniconda
36+
uses: conda-incubator/setup-miniconda@v2
37+
with:
38+
python-version: 3.8
39+
auto-update-conda: true
40+
add-pip-as-python-dependency: true
41+
architecture: x64
42+
43+
- name: install_deps
44+
run: |
45+
python -m pip install build
46+
47+
- name: build
48+
run: |
49+
python -m build --sdist --wheel --outdir dist/
50+
51+
- name: publish_testpypi
52+
# Upload to testpypi on every tag
53+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
54+
uses: pypa/gh-action-pypi-publish@master
55+
with:
56+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
57+
repository_url: https://test.pypi.org/legacy/
58+
59+
- name: publish_pypi
60+
if: github.event_name == 'release' && github.event.action == 'published'
61+
uses: pypa/gh-action-pypi-publish@master
62+
with:
63+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/gh-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- master
99

1010
concurrency:
11-
group: "${{ github.ref }}-${{ github.head_ref }}"
11+
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}"
1212
cancel-in-progress: true
1313

1414
defaults:

CHANGELOG

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@ The rules for this file:
1313
* accompany each entry with github issue/PR number (Issue #xyz)
1414

1515
------------------------------------------------------------------------------
16+
05/24/2022 IAlibay
17+
18+
* 1.0.1
19+
20+
Changes
21+
22+
* Deployment is now automatically done using github actions.
23+
24+
Fixes
25+
26+
* Version 1.0.0 would allow for installations to be made with python versions
27+
< 3.8, resulting in incorrect builds. The setup configuration has now been
28+
altered to avoid this (Issue #112)
29+
30+
1631
05/21/2022 orbeckst, IAlibay
1732

1833
* 1.0.0

setup.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[bdist_wheel]
2-
universal = 1
3-
4-
51
# See the docstring in versioneer.py for instructions. Note that you must
62
# re-run 'versioneer.py setup' after changing this section, and commit the
73
# resulting files.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
package_data={'gridData': ['tests/datafiles/*.dx', 'tests/datafiles/*.dx.gz',
4141
'tests/datafiles/*.ccp4', 'tests/datafiles/*.plt',
4242
'tests/datafiles/*.bz2']},
43+
python_requires='>=3.8',
4344
install_requires=['numpy>=1.19', 'scipy', 'mrcfile'],
4445
tests_require=['pytest', 'numpy'],
4546
zip_safe=True,

0 commit comments

Comments
 (0)