Skip to content

Commit 5a9e204

Browse files
committed
v0.12.0: newer Python and pips
1 parent fc6c6b6 commit 5a9e204

9 files changed

+88
-79
lines changed

borealis/docker_task.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ def _terminate(self, container, logger, reason, terminated):
282282
and the Docker client.
283283
284284
NOTE: "The KeyboardInterrupt exception will be received by an arbitrary
285-
thread." -- https://docs.python.org/3.8/library/_thread.html
285+
thread. (When the signal module is available, interrupts always go to
286+
the main thread.)" -- https://docs.python.org/3.8/library/_thread.html
286287
"""
287288
name = self['name']
288289
logger.debug('Terminating task {} for {}...'.format(name, reason))

borealis/setup/how-to-install-gce-server.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ echo y | gcloud auth configure-docker
107107
## level Image that's common to the team (containing runtime components like
108108
## Linux apts, Python, and pips), then preinstalling the runtime Image will
109109
## save Docker Image build time as well as task startup time.
110-
### Example: docker pull python:3.8.9
110+
### Example: docker pull python:3.11.3
111111
### Example: docker pull gcr.io/$(gcloud config get-value core/project)/my-app-runtime
112112

113113

@@ -138,10 +138,10 @@ sudo su -l fireworker
138138

139139
mkdir ~/borealis && cd ~/borealis
140140

141-
pyenv install 3.8.9
141+
pyenv install 3.11.3
142142

143-
pyenv global 3.8.9
144-
pyenv local 3.8.9
143+
pyenv global 3.11.3
144+
pyenv local 3.11.3
145145
pip install --upgrade pip setuptools virtualenv virtualenvwrapper virtualenv-clone wheel
146146

147147
pyenv virtualenv fireworker
@@ -262,7 +262,7 @@ sudo systemctl stop borealis-fireworker
262262
sudo journalctl --vacuum-time=2d
263263

264264
## Pull any Docker images that you want to preload for speed.
265-
docker pull python:3.8.9 # or similar image(s) including your project's runtime Image
265+
docker pull python:3.11.3 # or similar image(s) including your project's runtime Image
266266

267267
## Prune Docker images:
268268
docker image prune

borealis/setup/requirements.txt

+52-52
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
# Direct requirements
2-
# dnspython is needed for pymongo to access server clusters.
3-
dnspython==2.1.0
4-
docker==5.0.0
5-
FireWorks==1.9.7
6-
google-cloud-logging==2.3.1
7-
google-cloud-storage==1.37.1
8-
requests==2.25.1
9-
ruamel.yaml==0.17.4
10-
ruamel.yaml.clib==0.2.2
1+
# Direct requirements with frozen versions for reproducible testing.
2+
# FireWorks requires pymongo; dnspython enables pymongo to access server clusters.
3+
dnspython==2.3.0
4+
docker==6.0.1
5+
FireWorks==2.0.3
6+
google-cloud-logging==3.5.0
7+
google-cloud-storage==2.8.0
8+
requests==2.28.2
9+
ruamel.yaml==0.17.21
10+
ruamel.yaml.clib==0.2.7
1111

12-
# Indirect requirements
13-
appdirs==1.4.4
14-
cachetools==4.2.1
15-
certifi==2020.12.5
16-
cffi==1.14.5
17-
chardet==4.0.0
18-
click==7.1.2
19-
distlib==0.3.1
20-
filelock==3.0.12
21-
Flask==1.1.2
22-
flask-paginate==0.8.1
23-
google-api-core==1.26.3
24-
google-auth==1.29.0
25-
google-cloud-core==1.6.0
26-
google-crc32c==1.1.2
27-
google-resumable-media==1.2.0
28-
googleapis-common-protos==1.53.0
29-
grpcio==1.37.0
12+
# Indirect requirements added by pip freeze.
13+
cachetools==5.3.0
14+
certifi==2022.12.7
15+
charset-normalizer==3.1.0
16+
click==8.1.3
17+
distlib==0.3.6
18+
filelock==3.11.0
19+
Flask==2.2.3
20+
flask-paginate==2022.1.8
21+
google-api-core==2.11.0
22+
google-auth==2.17.2
23+
google-cloud-appengine-logging==1.3.0
24+
google-cloud-audit-log==0.2.5
25+
google-cloud-core==2.3.2
26+
google-crc32c==1.5.0
27+
google-resumable-media==2.4.1
28+
googleapis-common-protos==1.59.0
29+
grpc-google-iam-v1==0.12.6
30+
grpcio==1.53.0
31+
grpcio-status==1.53.0
3032
gunicorn==20.1.0
31-
idna==2.10
32-
itsdangerous==1.1.0
33-
Jinja2==2.11.3
34-
MarkupSafe==1.1.1
35-
monty==2021.3.3
36-
packaging==20.9
37-
pbr==5.5.1
38-
proto-plus==1.18.1
39-
protobuf==3.15.8
33+
idna==3.4
34+
itsdangerous==2.1.2
35+
Jinja2==3.1.2
36+
MarkupSafe==2.1.2
37+
monty==2022.9.9
38+
packaging==23.0
39+
pbr==5.11.1
40+
platformdirs==3.2.0
41+
proto-plus==1.22.2
42+
protobuf==4.22.1
4043
pyasn1==0.4.8
4144
pyasn1-modules==0.2.8
42-
pycparser==2.20
43-
pymongo==3.11.3
44-
pyparsing==2.4.7
45-
python-dateutil==2.8.1
46-
pytz==2021.1
47-
rsa==4.7.2
48-
six==1.15.0
49-
stevedore==3.3.0
50-
tabulate==0.8.9
51-
tqdm==4.60.0
52-
urllib3==1.26.5
53-
virtualenv==20.4.3
54-
virtualenv-clone==0.5.4
45+
pymongo==4.3.3
46+
python-dateutil==2.8.2
47+
rsa==4.9
48+
six==1.16.0
49+
stevedore==5.0.0
50+
tabulate==0.9.0
51+
tqdm==4.65.0
52+
urllib3==1.26.15
53+
virtualenv==20.21.0
54+
virtualenv-clone==0.5.7
5555
virtualenvwrapper==4.8.4
56-
websocket-client==0.58.0
57-
Werkzeug==1.0.1
56+
websocket-client==1.5.1
57+
Werkzeug==2.2.3

docs/changes.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## v0.12.0
4+
* Update the installation instructions to use Python 3.11.3 and newer pip libraries.
5+
36
## v0.11.0
47
* In the `gce create` CLI command, implement LaunchPad config `uri_mode` by setting the `host`, `uri_mode`, and `db` metadata fields.
58

docs/developer-setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ statement to your shell `.profile` or `.bash_profile` file:
126126

127127
Then run that `export` command or create a new shell.
128128

129-
1. In a fresh development directory, install Python 3.8, create a Python
129+
1. In a fresh development directory, install Python 3.11, create a Python
130130
virtual environment, and install the borealis-fireworks pip.
131131

132132
1. Create or augment your `my_launchpad.yaml` file:

docs/docker-build.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ First write a `Dockerfile` in your project directory. Example:
1313
# The ARG lets you pick another base Image but DON'T USE AN ALPINE base since
1414
# its floating point library produces different results; also
1515
# see https://pythonspeed.com/articles/alpine-docker-python/
16-
ARG from=python:3.8.6
16+
ARG from=python:3.8.16
1717
FROM ${from}
1818

1919
# Install Linux packages.
@@ -59,7 +59,7 @@ docker build --tag application101 .
5959
You can base it on a different "FROM" Image like this:
6060

6161
```shell script
62-
docker build --build-arg from=python:3.8.1 --tag application101 .
62+
docker build --build-arg from=python:3.11.3 --tag application101 .
6363
```
6464

6565
but **don't use an Alpine base image** because its floating point library produces

docs/install-tools.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Also see [Handy Links](handy-links.md).
77

88
1. Install Python and Fireworks:
99

10-
* Install Python: `pyenv install 3.8.6`
10+
* Install Python: `pyenv install 3.11.3`
1111
* Install a Python virtual environment manager like `virtualenv`,
1212
`pyenv-virtualenv`, and `pyenv-virtualenvwrapper`; or `venv`
1313
* Create a Python virtual environment in your project directory, e.g.:
1414
```shell script
15-
pyenv local 3.8.6
15+
pyenv local 3.11.3
1616
pyenv virtualenv myproject
1717
pyenv local myproject
1818
```
@@ -27,21 +27,21 @@ Also see [Handy Links](handy-links.md).
2727

2828
1. Setup Python for the `gcloud` and `gsutil` tools.
2929

30-
**Note:** `gsutil -m` is broken in Python 3.8 so use Python 3.6 or 3.7.
30+
**Note:** `gsutil -m` is still broken in Python 3.8+ so use Python 3.6 or 3.7.
3131
([gsutil issue #961](https://github.com/GoogleCloudPlatform/gsutil/issues/961).)
3232

3333
Install Python 3.6 or 3.7 if you don't already have one of them, e.g.
3434
using `pyenv`:
3535
3636
```shell script
37-
pyenv install 3.7.9
37+
pyenv install 3.7.16
3838
```
3939
4040
Set `$CLOUDSDK_PYTHON` in your shell profile:
4141
4242
```shell script
4343
# Set the Python version for Cloud SDK.
44-
export CLOUDSDK_PYTHON=$(pyenv shell 3.7.9; pyenv which python)
44+
export CLOUDSDK_PYTHON=$(pyenv shell 3.7.16; pyenv which python)
4545
```
4646
4747
Then open a new shell (or run this `export` command).

requirements.txt

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
## Create the "fireworker" python virtual environment for development, and select it in this directory:
2-
# pyenv install 3.8.9
2+
# pyenv install 3.11.3
33
#
4-
# pyenv virtualenv 3.8.9 fireworker && pyenv local fireworker
4+
# pyenv virtualenv 3.11.3 fireworker && pyenv local fireworker
55
# pip install --upgrade pip setuptools virtualenv virtualenvwrapper virtualenv-clone wheel
66
# pip install -r requirements.txt && pyenv rehash
77

8-
# Direct dependents
9-
# dnspython is needed for pymongo to access server clusters.
10-
dnspython==2.1.0
11-
google-cloud-logging>=2.3.1
12-
google-cloud-storage>=1.37.1
13-
docker>=5.0.0
14-
FireWorks>=1.9.6
15-
requests>=2.25.1
16-
ruamel.yaml>=0.17.4
8+
# Direct requirements.
9+
# FireWorks requires pymongo; dnspython enables pymongo to access server clusters.
10+
# The binary extension ruamel.yaml.clib helps ruamel.yaml run faster, right?
11+
dnspython
12+
google-cloud-logging
13+
google-cloud-storage
14+
docker
15+
FireWorks
16+
requests
17+
ruamel.yaml
18+
ruamel.yaml.clib
1719

1820
# Dev tools
1921
twine

setup.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
setup(
1717
name='borealis-fireworks',
18-
version='0.11.0',
18+
version='0.12.0',
1919
packages=['borealis', 'borealis.util'],
2020
url='https://github.com/CovertLab/borealis',
2121
project_urls={
@@ -34,7 +34,7 @@
3434
'google-cloud-logging>=2.0.0',
3535
'google-cloud-storage>=1.28.0',
3636
'docker>=4.1.0',
37-
'FireWorks>=1.9.5',
37+
'FireWorks>=1.9.7',
3838
'requests>=2.22.0',
3939
'ruamel.yaml>=0.16.9',
4040
],
@@ -58,6 +58,9 @@
5858
'Programming Language :: Python',
5959
'Programming Language :: Python :: 3 :: Only',
6060
'Programming Language :: Python :: 3.8',
61+
'Programming Language :: Python :: 3.9',
62+
'Programming Language :: Python :: 3.10',
63+
'Programming Language :: Python :: 3.11',
6164
],
6265
keywords='fireworks workflow',
6366
)

0 commit comments

Comments
 (0)