Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python versions #587

Merged
merged 8 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point, we should use the GitHub actions matrix to parameterise this and test more than a single Python version.


- uses: actions/cache@v3
id: wheels_cache
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
path: |
tests/env

key: ${{ runner.os }}-test-env-py38-${{ hashFiles('tests/test-env-py38.yml') }}
key: ${{ runner.os }}-test-env-py39-${{ hashFiles('tests/test-env-py39.yml') }}

- uses: conda-incubator/setup-miniconda@v2
if: steps.conda_cache.outputs.cache-hit != 'true'
Expand All @@ -103,7 +103,7 @@ jobs:
shell: bash -l {0}
if: steps.conda_cache.outputs.cache-hit != 'true'
run: |
mamba env create -f tests/test-env-py38.yml -p tests/env
mamba env create -f tests/test-env-py39.yml -p tests/env

- name: Check Python Env
shell: bash -l {0}
Expand All @@ -128,7 +128,7 @@ jobs:
path: |
tests/env

key: ${{ runner.os }}-test-env-py38-${{ hashFiles('tests/test-env-py38.yml') }}
key: ${{ runner.os }}-test-env-py39-${{ hashFiles('tests/test-env-py39.yml') }}

- name: Update PATH
shell: bash
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
path: |
tests/env

key: ${{ runner.os }}-test-env-py38-${{ hashFiles('tests/test-env-py38.yml') }}
key: ${{ runner.os }}-test-env-py39-${{ hashFiles('tests/test-env-py39.yml') }}

- name: Update PATH
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ The following steps are used in the GitHub Actions workflow `main.yml`
```bash

# build environment from file
mamba env create -f tests/test-env-py38.yml
mamba env create -f tests/test-env-py39.yml

# this environment name is defined in tests/test-env-py38.yml file
conda activate odc-tests-py38
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ url = https://github.com/opendatacube/odc-tools/
include_package_data = true
zip_safe = false
packages = find_namespace:
python_requires = >=3.6
python_requires = >=3.9
tests_require = pytest
install_requires =
odc-cloud[ASYNC]
Expand Down
2 changes: 1 addition & 1 deletion apps/dc_tools/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ url = https://github.com/opendatacube/odc-tools/
include_package_data = true
zip_safe = false
packages = find_namespace:
python_requires = >=3.7
python_requires = >= 3.9,<=3.10
SpacemanPaul marked this conversation as resolved.
Show resolved Hide resolved
tests_require =
pytest
deepdiff
Expand Down
2 changes: 1 addition & 1 deletion libs/algo/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ url = https://github.com/opendatacube/odc-tools/
include_package_data = true
zip_safe = false
packages = find_namespace:
python_requires = >=3.6
python_requires = >=3.9
tests_require = pytest
install_requires =
affine
Expand Down
2 changes: 1 addition & 1 deletion libs/cloud/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ url = https://github.com/opendatacube/odc-tools/
include_package_data = true
zip_safe = false
packages = find_namespace:
python_requires = >=3.7
python_requires = >=3.9
tests_require = pytest
install_requires =
botocore
Expand Down
2 changes: 1 addition & 1 deletion libs/io/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ url = https://github.com/opendatacube/odc-tools/
include_package_data = true
zip_safe = false
packages = find_namespace:
python_requires = >=3.6
python_requires = >=3.9
tests_require = pytest
install_requires =

Expand Down
2 changes: 1 addition & 1 deletion libs/ui/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ url = https://github.com/opendatacube/odc-tools/
include_package_data = true
zip_safe = false
packages = find_namespace:
python_requires = >=3.6
python_requires = >=3.9
tests_require = pytest
install_requires =
datacube
Expand Down
10 changes: 5 additions & 5 deletions tests/test-env-py38.yml → tests/test-env-py39.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Conda environment for running tests in odc-tools
# conda env create -f test-env-py38.yml
# conda activate odc-tests-py38
# conda env create -f test-env-py39.yml
# conda activate odc-tests-py39

name: odc-tests-py38
name: odc-tests-py39
channels:
- conda-forge

dependencies:
- python=3.8
- python=3.9

# Datacube
- datacube>=1.8.15
Expand Down Expand Up @@ -46,7 +46,7 @@ dependencies:
- pytest-httpserver
- pytest-cov
- pytest-timeout
- moto
- moto[server]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not valid conda syntax, this only works with pip, unless something changed recently in conda

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had a feeling that was the case. I've installed conda and I'll deal with it tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the moto version that's the issue - conda is pulling in an ancient version for some reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol. I just removed the ancient pin on aiobotocore and it built in 1/5 the time and works fine.

- deepdiff


Expand Down
Loading