Skip to content

Commit 53cb6a7

Browse files
authored
Merge pull request #163 from A-Baji/py-ver-matrix
add py 3.9 to release matrix
2 parents 632084b + 6de660f commit 53cb6a7

File tree

7 files changed

+62
-22
lines changed

7 files changed

+62
-22
lines changed

.github/workflows/development.yaml

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
env:
3232
DOCKER_CLIENT_TIMEOUT: "120"
3333
COMPOSE_HTTP_TIMEOUT: "120"
34-
PY_VER: "3.8"
34+
PY_VER: "3.9"
3535
IMAGE: "djtest"
3636
DISTRO: "alpine"
3737
steps:
@@ -57,6 +57,9 @@ jobs:
5757
- py_ver: 3.8
5858
distro: alpine
5959
image: djbase
60+
- py_ver: 3.9
61+
distro: alpine
62+
image: djbase
6063
env:
6164
PY_VER: ${{matrix.py_ver}}
6265
DISTRO: ${{matrix.distro}}
@@ -83,11 +86,10 @@ jobs:
8386
path: "image-pharus-${{env.PHARUS_VERSION}}-py${{matrix.py_ver}}-\
8487
${{matrix.distro}}.tar.gz"
8588
retention-days: 1
86-
- if: matrix.py_ver == '3.8' && matrix.distro == 'alpine'
87-
name: Add pip artifacts
89+
- name: Add pip artifacts
8890
uses: actions/upload-artifact@v2
8991
with:
90-
name: pip-pharus-${{env.PHARUS_VERSION}}
92+
name: pip-pharus-${{env.PHARUS_VERSION}}-py${{matrix.py_ver}}
9193
path: dist
9294
retention-days: 1
9395
test:
@@ -99,6 +101,9 @@ jobs:
99101
- py_ver: 3.8
100102
distro: alpine
101103
image: djbase
104+
- py_ver: 3.9
105+
distro: alpine
106+
image: djbase
102107
env:
103108
PY_VER: ${{matrix.py_ver}}
104109
DISTRO: ${{matrix.distro}}
@@ -164,10 +169,15 @@ jobs:
164169
uses: actions/download-artifact@v2
165170
with:
166171
name: image-pharus-${{env.PHARUS_VERSION}}-py3.8-alpine
167-
- name: Fetch pip artifacts
172+
- name: Fetch 3.8 pip artifacts
173+
uses: actions/download-artifact@v2
174+
with:
175+
name: pip-pharus-${{env.PHARUS_VERSION}}-py3.8
176+
path: dist
177+
- name: Fetch 3.9 pip artifacts
168178
uses: actions/download-artifact@v2
169179
with:
170-
name: pip-pharus-${{env.PHARUS_VERSION}}
180+
name: pip-pharus-${{env.PHARUS_VERSION}}-py3.8
171181
path: dist
172182
- name: Publish pip release
173183
run: |
@@ -180,23 +190,41 @@ jobs:
180190
run: |
181191
echo "PHARUS_WHEEL_PATH=$(ls dist/pharus-*.whl)" >> $GITHUB_ENV
182192
echo "PHARUS_SDIST_PATH=$(ls dist/pharus-*.tar.gz)" >> $GITHUB_ENV
183-
- name: Upload pip wheel asset to release
193+
- name: Upload 3.8 pip wheel asset to release
184194
uses: actions/upload-release-asset@v1
185195
env:
186196
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
187197
with:
188198
upload_url: ${{steps.create_gh_release.outputs.upload_url}}
189199
asset_path: ${{env.PHARUS_WHEEL_PATH}}
190-
asset_name: pip-pharus-${{env.PHARUS_VERSION}}.whl
200+
asset_name: pip-pharus-${{env.PHARUS_VERSION}}-py3.8.whl
191201
asset_content_type: application/zip
192-
- name: Upload pip sdist asset to release
202+
- name: Upload 3.9 pip wheel asset to release
203+
uses: actions/upload-release-asset@v1
204+
env:
205+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
206+
with:
207+
upload_url: ${{steps.create_gh_release.outputs.upload_url}}
208+
asset_path: ${{env.PHARUS_WHEEL_PATH}}
209+
asset_name: pip-pharus-${{env.PHARUS_VERSION}}-py3.9.whl
210+
asset_content_type: application/zip
211+
- name: Upload 3.8 pip sdist asset to release
193212
uses: actions/upload-release-asset@v1
194213
env:
195214
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
196215
with:
197216
upload_url: ${{steps.create_gh_release.outputs.upload_url}}
198217
asset_path: ${{env.PHARUS_SDIST_PATH}}
199-
asset_name: pip-pharus-${{env.PHARUS_VERSION}}.tar.gz
218+
asset_name: pip-pharus-${{env.PHARUS_VERSION}}-py3.8.tar.gz
219+
asset_content_type: application/gzip
220+
- name: Upload 3.9 pip sdist asset to release
221+
uses: actions/upload-release-asset@v1
222+
env:
223+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
224+
with:
225+
upload_url: ${{steps.create_gh_release.outputs.upload_url}}
226+
asset_path: ${{env.PHARUS_SDIST_PATH}}
227+
asset_name: pip-pharus-${{env.PHARUS_VERSION}}-py3.9.tar.gz
200228
asset_content_type: application/gzip
201229
- name: Upload deploy docker environment
202230
uses: actions/upload-release-asset@v1
@@ -224,6 +252,9 @@ jobs:
224252
- py_ver: 3.8
225253
distro: alpine
226254
image: djbase
255+
- py_ver: 3.9
256+
distro: alpine
257+
image: djbase
227258
env:
228259
PY_VER: ${{matrix.py_ver}}
229260
DISTRO: ${{matrix.distro}}
@@ -248,10 +279,12 @@ jobs:
248279
docker load < "image-pharus-${PHARUS_VERSION}-py${PY_VER}-${DISTRO}.tar.gz"
249280
IMAGE=$(docker images --filter "reference=datajoint/*" --format "{{.Repository}}")
250281
TAG=$(docker images --filter "reference=datajoint/*" --format "{{.Tag}}")
251-
docker push "${IMAGE}:${TAG}"
252-
docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
253-
docker push "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
254-
[ "$PY_VER" == "3.8" ] && [ "$DISTRO" == "alpine" ] \
282+
docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-py${PY_VER}"
283+
docker push "${IMAGE}:${TAG}-py${PY_VER}"
284+
docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-py${PY_VER}-${GITHUB_SHA:0:7}"
285+
docker push "${IMAGE}:${TAG}-py${PY_VER}-${GITHUB_SHA:0:7}"
286+
[ "$PY_VER" == "3.9" ] && [ "$DISTRO" == "alpine" ] \
287+
&& docker push "${IMAGE}:${TAG}" \
255288
&& docker tag "${IMAGE}:${TAG}" "${IMAGE}:latest" \
256289
&& docker push "${IMAGE}:latest" \
257290
|| echo "skipping 'latest' tag..."

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
44

5+
## [0.8.6] - 2023-05-2
6+
7+
### Added
8+
9+
- Added python 3.9 to release matrix [#163](https://github.com/datajoint/pharus/pull/163)
10+
511
## [0.8.5] - 2023-04-26
612

713
### Added
@@ -302,6 +308,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
302308
- Support for DataJoint attribute types: `varchar`, `int`, `float`, `datetime`, `date`, `time`, `decimal`, `uuid`.
303309
- Check dependency utility to determine child table references.
304310

311+
[0.8.6]: https://github.com/datajoint/pharus/compare/0.8.5...0.8.6
305312
[0.8.5]: https://github.com/datajoint/pharus/compare/0.8.4...0.8.5
306313
[0.8.4]: https://github.com/datajoint/pharus/compare/0.8.3...0.8.4
307314
[0.8.3]: https://github.com/datajoint/pharus/compare/0.8.2...0.8.3

docker-compose-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PY_VER=3.8 IMAGE=djbase DISTRO=alpine PHARUS_VERSION=$(cat pharus/version.py | grep -oP '\d+\.\d+\.\d+') HOST_UID=$(id -u) docker compose -f docker-compose-build.yaml up --exit-code-from pharus --build
1+
# PY_VER=3.9 IMAGE=djbase DISTRO=alpine PHARUS_VERSION=$(cat pharus/version.py | grep -oP '\d+\.\d+\.\d+') HOST_UID=$(id -u) docker compose -f docker-compose-build.yaml up --exit-code-from pharus --build
22
#
33
# Intended for updating dependencies and docker image.
44
# Used to build release artifacts.

docker-compose-dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PY_VER=3.8 IMAGE=djbase DISTRO=alpine PHARUS_VERSION=$(cat pharus/version.py | grep -oP '\d+\.\d+\.\d+') HOST_UID=$(id -u) docker compose -f docker-compose-dev.yaml up
1+
# PY_VER=3.9 IMAGE=djbase DISTRO=alpine PHARUS_VERSION=$(cat pharus/version.py | grep -oP '\d+\.\d+\.\d+') HOST_UID=$(id -u) docker compose -f docker-compose-dev.yaml up
22
#
33
# Intended for normal development. Supports hot/live reloading.
44
# Note: If requirements or Dockerfile change, will need to add --build flag to docker-compose.
@@ -36,7 +36,7 @@ services:
3636
- PHARUS_OIDC_PUBLIC_KEY
3737
- PHARUS_OIDC_SUBJECT_KEY=preferred_username
3838
volumes:
39-
- ./pharus:/opt/conda/lib/python3.8/site-packages/pharus
39+
- ./pharus:/opt/conda/lib/python${PY_VER}/site-packages/pharus
4040
command: pharus
4141
fakeservices.datajoint.io:
4242
<<: *net

docker-compose-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PY_VER=3.8 IMAGE=djtest DISTRO=alpine HOST_UID=$(id -u) docker-compose -f docker-compose-docs.yaml up --exit-code-from pharus-docs --build
1+
# PY_VER=3.9 IMAGE=djtest DISTRO=alpine HOST_UID=$(id -u) docker-compose -f docker-compose-docs.yaml up --exit-code-from pharus-docs --build
22
#
33
# Used to build documentation artifacts.
44
version: "2.4"

docker-compose-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PY_VER=3.8 IMAGE=djtest DISTRO=alpine AS_SCRIPT=FALSE PHARUS_VERSION=$(cat pharus/version.py | grep -oP '\d+\.\d+\.\d+') HOST_UID=$(id -u) docker compose -f docker-compose-test.yaml up --exit-code-from pharus
1+
# PY_VER=3.9 IMAGE=djtest DISTRO=alpine AS_SCRIPT=FALSE PHARUS_VERSION=$(cat pharus/version.py | grep -oP '\d+\.\d+\.\d+') HOST_UID=$(id -u) docker compose -f docker-compose-test.yaml up --exit-code-from pharus
22
#
33
# Intended for running test suite locally.
44
# Note: If requirements or Dockerfile change, will need to add --build flag.
@@ -27,15 +27,15 @@ services:
2727
- PHARUS_SPEC_PATH=tests/init/test_dynamic_api_spec.yaml
2828
volumes:
2929
- ./requirements_test.txt:/tmp/pip_requirements.txt
30-
- ./pharus:/opt/conda/lib/python3.8/site-packages/pharus
30+
- ./pharus:/opt/conda/lib/python${PY_VER}/site-packages/pharus
3131
command:
3232
- sh
3333
- -c
3434
- |
3535
set -e
3636
if echo "${AS_SCRIPT}" | grep -i true &>/dev/null; then
3737
echo "------ SYNTAX TESTS ------"
38-
PKG_DIR=/opt/conda/lib/python3.8/site-packages/pharus
38+
PKG_DIR=/opt/conda/lib/python${PY_VER}/site-packages/pharus
3939
flake8 $${PKG_DIR} --count --select=E9,F63,F7,F82 --show-source --statistics
4040
flake8 /main/tests --count --select=E9,F63,F7,F82 --show-source --statistics
4141
echo "------ UNIT TESTS ------"

pharus/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Package metadata."""
2-
__version__ = "0.8.5"
2+
__version__ = "0.8.6"

0 commit comments

Comments
 (0)