Skip to content

Commit

Permalink
Minimal required python 3.7 (#53)
Browse files Browse the repository at this point in the history
* require python 3.7

* refactor CI and run tests for python from 3.7

* update CHANGELOG
  • Loading branch information
atimin authored Nov 22, 2022
1 parent 09bc84d commit 0b7a449
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 26 deletions.
35 changes: 10 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,22 @@ jobs:
name: package
path: ./dist

test-wo-auth:
test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
token: ["", "ACCESS_TOKEN"]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@master
with:
name: package
path: ./dist

- name: Install package
run: python3 -m pip install dist/*

- name: Install dependencies
run: pip3 install .[test]

- name: Run Reduct Storage
run: docker run -p 8383:8383 -v ${PWD}/data:/data -d ghcr.io/reduct-storage/reduct-storage:latest

- name: Run Tests
run: PYTHONPATH=. pytest tests

test-with-auth:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@master
- uses: actions/setup-python@v4
with:
name: package
path: ./dist
python-version: ${{matrix.python}}

- name: Install package
run: python3 -m pip install dist/*
Expand All @@ -79,10 +64,10 @@ jobs:
run: pip3 install .[test]

- name: Run Reduct Storage
run: docker run -p 8383:8383 -v ${PWD}/data:/data --env RS_API_TOKEN=XXX -d ghcr.io/reduct-storage/reduct-storage:latest
run: docker run -p 8383:8383 -v ${PWD}/data:/data --env RS_API_TOKEN=${{matrix.token}} -d ghcr.io/reduct-storage/reduct-storage:latest

- name: Run Tests
run: PYTHONPATH=. RS_API_TOKEN=XXX pytest tests
run: PYTHONPATH=. RS_API_TOKEN=${{matrix.token}} pytest tests

pylint:
needs: build
Expand All @@ -109,7 +94,7 @@ jobs:

py-pip-upload:
name: Upload if release
needs: [ pylint, test-with-auth, test-wo-auth ]
needs: [ pylint, test]
runs-on: ubuntu-latest
defaults:
run:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added:

- Support Python 3.7. [PR-53](https://github.com/reduct-storage/reduct-py/pull/53)

### Changed:

- `Client.get_bucket` now uses `GET` instead of `HEAD` in order to be able to return a meaningful error to the user, [PR-51](https://github.com/reduct-storage/reduct-py/pull/51)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_long_description(base_path: Path):
package_dir={"": "pkg"},
package_data={"": ["VERSION"]},
packages=find_packages(where="pkg"),
python_requires=">=3.8",
python_requires=">=3.7",
install_requires=["aiohttp~=3.8", "pydantic~=1.9", "deprecation~=2.1"],
extras_require={
"test": ["pytest~=7.1", "pytest-asyncio~=0.18"],
Expand Down

0 comments on commit 0b7a449

Please sign in to comment.