3
3
version : 2.1
4
4
orbs :
5
5
slack : circleci/slack@4.4.2
6
- python : circleci/python@2.0.3
6
+ python : circleci/python@2.1.0
7
7
8
8
jobs :
9
9
build_test :
@@ -23,18 +23,17 @@ jobs:
23
23
apt-get -y install curl libgeos-dev
24
24
pip install --upgrade pip
25
25
pip install poetry
26
- - run :
27
- name : Install Python Dependencies
28
- command : |
29
- poetry install
26
+ - python/install-packages :
27
+ pkg-manager : poetry
28
+ include-python-in-cache-key : false
30
29
- run :
31
30
name : Test Imports (extras need to be guarded!)
32
31
command : | # Make sure that importing works without extras installed
33
32
poetry run python -c 'import nucleus'
34
- - run :
35
- name : Install Extra Python Dependencies
36
- command : | # install dependencies
37
- poetry install -E metrics -E launch
33
+ - python/install-packages :
34
+ pkg-manager : poetry
35
+ args : -E metrics -E launch
36
+ include-python-in-cache-key : false
38
37
- run :
39
38
name : Black Formatting Check # Only validation, without re-formatting
40
39
command : |
@@ -110,24 +109,6 @@ jobs:
110
109
exit 1
111
110
fi
112
111
poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD
113
- test_poetry_installation :
114
- parameters :
115
- python_version :
116
- type : string
117
- docker :
118
- - image : cimg/python:<<parameters.python_version>>
119
- steps :
120
- - checkout
121
- - run :
122
- command : |
123
- pip install --upgrade pip
124
- name : Upgrade pip
125
- - python/install-packages :
126
- pkg-manager : poetry
127
- - run :
128
- command : |
129
- poetry run python -c 'import nucleus'
130
- name : Test import nucleus
131
112
test_client_installation :
132
113
parameters :
133
114
python_version :
@@ -145,10 +126,29 @@ jobs:
145
126
poetry build
146
127
name : Build the package
147
128
- run :
129
+ name : Install - no extras
148
130
command : |
149
131
export FOUND_PKG=$(find ./dist -name "*.tar.gz")
150
132
pip install $FOUND_PKG
151
- name : Install with Python Version
133
+ python -c 'import nucleus'
134
+ - run :
135
+ name : Install with extra metrics
136
+ command : |
137
+ export FOUND_PKG=$(find ./dist -name "*.tar.gz")
138
+ pip install "$FOUND_PKG[metrics]"
139
+ python -c 'import nucleus'
140
+ - run :
141
+ name : Install with extra launch
142
+ command : |
143
+ export FOUND_PKG=$(find ./dist -name "*.tar.gz")
144
+ pip install "$FOUND_PKG[launch]"
145
+ python -c 'import nucleus'
146
+ - run :
147
+ name : Install with extra launch and metrics
148
+ command : |
149
+ export FOUND_PKG=$(find ./dist -name "*.tar.gz")
150
+ pip install "$FOUND_PKG[metrics, launch]"
151
+ python -c 'import nucleus'
152
152
workflows :
153
153
nightly_build_test :
154
154
triggers :
@@ -163,11 +163,6 @@ workflows:
163
163
context : Nucleus
164
164
installation_matrix :
165
165
jobs :
166
- - test_poetry_installation :
167
- matrix :
168
- parameters :
169
- python_version : ['3.6', '3.7', '3.8', '3.9'] # , '3.10'] Need to work out a solution to support dev on 3.10
170
- context : Nucleus
171
166
- test_client_installation :
172
167
matrix :
173
168
parameters :
@@ -188,3 +183,4 @@ workflows:
188
183
ignore : /.*/ # Runs for none of the branches
189
184
tags :
190
185
only : /^v\d+\.\d+\.\d+$/ # Runs only for tags with the format [v1.2.3]
186
+
0 commit comments