Skip to content

Commit ae5d1e1

Browse files
authored
Add test matrix for Poetry and Client installation in various environments (#315)
1 parent e73c74f commit ae5d1e1

File tree

3 files changed

+89
-4
lines changed

3 files changed

+89
-4
lines changed

.circleci/config.yml

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
version: 2.1
44
orbs:
55
slack: circleci/slack@4.4.2
6+
python: circleci/python@2.0.3
67

78
jobs:
89
build_test:
@@ -21,7 +22,8 @@ jobs:
2122
apt-get -y install curl libgeos-dev
2223
pip install --upgrade pip
2324
pip install poetry
24-
poetry install
25+
- python/install-packages:
26+
pkg-manager: poetry
2527
- run:
2628
name: Test Imports (extras need to be guarded!)
2729
command: | # Make sure that importing works without extras installed
@@ -105,6 +107,47 @@ jobs:
105107
exit 1
106108
fi
107109
poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD
110+
test_poetry_installation:
111+
parameters:
112+
python_version:
113+
type: string
114+
docker:
115+
- image: cimg/python:<<parameters.python_version>>
116+
steps:
117+
- checkout
118+
- run:
119+
command: |
120+
pip install --upgrade pip
121+
name: Upgrade pip
122+
- python/install-packages:
123+
pkg-manager: poetry
124+
- run:
125+
command: |
126+
poetry run python -c 'import nucleus'
127+
name: Test import nucleus
128+
test_client_installation:
129+
parameters:
130+
python_version:
131+
type: string
132+
docker:
133+
- image: cimg/python:<<parameters.python_version>>
134+
steps:
135+
- checkout
136+
- run:
137+
command: |
138+
pip install --upgrade pip
139+
name: Upgrade pip
140+
# - python/install-packages:
141+
# pkg-manager: poetry
142+
- run:
143+
command: |
144+
poetry build
145+
name: Test it
146+
- run:
147+
command: |
148+
export FOUND_PKG=$(find ./dist -name "*.tar.gz")
149+
pip install $FOUND_PKG
150+
name: Test it
108151
workflows:
109152
nightly_build_test:
110153
triggers:
@@ -117,6 +160,18 @@ workflows:
117160
jobs:
118161
- build_test:
119162
context: Nucleus
163+
installation_matrix:
164+
jobs:
165+
- test_poetry_installation:
166+
matrix:
167+
parameters:
168+
python_version: ['3.6', '3.7', '3.8', '3.9'] #, '3.10'] Haven't gotten the 3.10 test to work
169+
context: Nucleus
170+
- test_client_installation:
171+
matrix:
172+
parameters:
173+
python_version: ['3.6', '3.7', '3.8', '3.9', '3.10']
174+
context: Nucleus
120175
build_test_publish:
121176
jobs:
122177
- build_test:

poetry.lock

Lines changed: 31 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ dataclasses = { version = "^0.7", python = "^3.6.1, <3.7" }
3939
aiohttp = "^3.7.4"
4040
nest-asyncio = "^1.5.1"
4141
pydantic = "^1.8.2"
42-
numpy = "^1.19.5"
42+
numpy = [{ version = ">=1.19.5", python = ">=3.6,<3.10" }, { version = ">=1.22.0", python = ">=3.10"}]
4343
scipy = ">=1.4.1" # NOTE: COLAB has 1.4.1 and has problems updating
4444
click = ">=7.1.2,<9.0" # NOTE: COLAB has 7.1.2 and has problems updating
4545
rich = ">=10.15.2"
4646
shellingham = "^1.4.0"
4747
scikit-learn = ">=0.24.0"
4848
Shapely = { version = ">=1.8.0", optional = true }
49-
rasterio = { version = "^1.2.10", optional = true }
49+
rasterio = { version = ">=1.2.0", optional = true }
5050
Pillow = ">=7.1.2"
5151
s3fs = {version = ">=2021.9.0", optional = true }
5252
scale-launch = { version = ">=0.1.0", python = ">=3.7,<4.0" , optional = true}

0 commit comments

Comments
 (0)