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

Support for Python 3.12 #770

Merged
merged 20 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- name: Python Package Setup
run: |
make configure
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ cgap-portal
Change Log
----------

15.4.0
======

* Dropped support for Python 3.8.
* Updates related to Python 3.12.


15.3.1
======
`PR 769: Use snovault command to update inserts <https://github.com/dbmi-bgm/cgap-portal/pull/769>`_
Expand Down
42 changes: 4 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,59 +43,29 @@ moto-setup: # optional moto setup that must be done separately
@# pip install "moto[server]==1.3.7"
@echo "'moto[server]' not being installed here. Regular 'moto' will be installed by pyproject.toml."

macpoetry-install: # Same as 'poetry install' except that on OSX Catalina, an environment variable wrapper is needed
bin/macpoetry-install

configure: # does any pre-requisite installs
configure:
pip install --upgrade pip
pip install poetry==1.4.2
pip install poetry
pip install setuptools
pip install wheel
ifeq ($(shell uname -s), Darwin)
ifeq ($(shell uname -m), arm64)
pip install pysam=="0.21.0"
pip install matplotlib=="3.3.4"
endif
endif
poetry config virtualenvs.create false --local # do not create a virtualenv - the user should have already done this -wrr 20-Sept-2021

build-poetry:
make configure
poetry install

macbuild-poetry:
make configure
make macpoetry-install

build: # builds
ifeq ($(shell uname -s), Darwin)
@echo "Looks like this is Mac so executing: make macbuild"
make macbuild
else
make build-poetry
make build-after-poetry
endif

macbuild: # Builds for MacOS (see: bin/macpoetry-install)
make macbuild-poetry
make build-after-poetry

rebuild:
make clean # Among other things, this assures 'make npm-setup' will run, but it also does other cleanup.
make build

macrebuild:
make clean # Among other things, this assures 'make npm-setup' will run, but it also does other cleanup.
make macbuild

build-full: # rebuilds for Catalina, addressing zlib possibly being in an alternate location.
make clean-node-modules # This effectively assures that 'make npm-setup' will need to run.
make build

macbuild-full: # rebuilds for Catalina, addressing zlib possibly being in an alternate location.
make clean-node-modules # This effectively assures that 'make npm-setup' will need to run.
make macbuild

build-after-poetry: # continuation of build after poetry install
make moto-setup
make npm-setup-if-needed
Expand All @@ -110,10 +80,6 @@ build-dev: # same as build, but sets up locust as well
make build
make build-locust

macbuild-dev: # same as macbuild, but sets up locust as well
make macbuild
make build-locust

build-locust: # just pip installs locust - may cause instability
pip install locust

Expand Down Expand Up @@ -345,8 +311,8 @@ help:
info:
@: $(info Here are some 'make' options:)
$(info - Use 'make aws-ip-ranges' to download latest ip range information. Invoked automatically when needed.)
$(info - Use 'make build' (or 'make macbuild' on OSX Catalina) to build only application dependencies.)
$(info - Use 'make build-dev' (or 'make macbuild-dev' on OSX Catalina) to build all dependencies, even locust.)
$(info - Use 'make build' to build only application dependencies.)
$(info - Use 'make build-dev' to build all dependencies, even locust.)
$(info - Use 'make build-locust' to install locust. Do not do this unless you know what you are doing.)
$(info - Use 'make clean' to clear out (non-python) dependencies.)
$(info - Use 'make clean-python' to clear python virtualenv for fresh poetry install.)
Expand Down
File renamed without changes.
1,165 changes: 719 additions & 446 deletions poetry.lock

Large diffs are not rendered by default.

35 changes: 21 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
# Note: Various modules refer to this system as "encoded", not "cgap-portal".
name = "encoded"
version = "15.3.1"
version = "15.4.0"
description = "Computational Genome Analysis Platform"
authors = ["4DN-DCIC Team <support@4dnucleome.org>"]
license = "MIT"
Expand Down Expand Up @@ -35,13 +35,14 @@ classifiers = [
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12'
]

[tool.poetry.dependencies]
python = ">=3.8.1,<3.12"
awscli = ">=1.29.62"
boto3 = "^1.28.62"
botocore = "^1.31.62"
python = ">=3.9,<3.13"
awscli = ">=1.33.17"
boto3 = "^1.34.136"
botocore = "^1.34.136"
certifi = ">=2021.5.30"
chardet = "^5.2.0"
codeguru-profiler-agent = "^1.2.4"
Expand All @@ -50,22 +51,28 @@ codeguru-profiler-agent = "^1.2.4"
# of cryptography.hazmat.bindings._rust in cryptography package. 2023-04-21.
cryptography = "39.0.2"
colorama = "0.3.3"
dcicpyvcf = "^3.0.0"
dcicsnovault = "^11.14.2"
dcicutils = "^8.8.5"
dcicpyvcf = "^3.1.0"
dcicsnovault = "^11.18.0"
dcicutils = "^8.13.0"
elasticsearch = "7.13.4"
execnet = "1.4.1"
future = ">=0.18.2,<1"
granite-suite = "0.1.11b0" # Needs this exact vesion until Python 3.6 support is dropped. -kmp 10-Feb-2022
#granite-suite = "0.1.11b0" # Needs this exact vesion until Python 3.6 support is dropped. -kmp 10-Feb-2022
granite-suite = "0.2.0.1b4"
h5py = "^3.8.0"
humanfriendly = "^1.44.9"
hupper = "1.5"
idna = ">=2.10,<3"
isodate = ">=0.6.1,<1"
jmespath = ">=0.10.0,<1"
# Added because something (maybe granite-suite) is trying to install matplotlib 3.3.4 which does not install/build with Python 3.12.
# Shoot granite-suite 0.2.0 is the latest and it wants matplotlib 3.3.4 which is problematic.
matplotlib = "^3.9.0"
netaddr = ">=0.8.0,<1"
negspy = "0.2.24"
numpy = "^1.24.2" # negspy needs it
# numpy = "^1.24.2" # negspy needs it
# numpy = "^2.0.0"
numpy = "^1.26.4"
openpyxl = "^3.0.7,!=3.0.8" # a version 3.0.8 appeared but then got withdrawn, for now just pin 3.0.7. try again later.
passlib = "^1.7.4"
PasteDeploy = "1.5.2"
Expand All @@ -81,7 +88,7 @@ PyBrowserID = "^0.14.0"
pycparser = "2.14"
PyJWT = "^2.6.0"
pyparsing = "^3.0.7"
pyramid = "1.10.4"
pyramid = "1.10.8"
pyramid-multiauth = ">=0.9.0,<1"
pyramid-retry = "^1.0"
pyramid-tm = "^2.4"
Expand Down Expand Up @@ -116,7 +123,7 @@ transaction = "^3.0.0"
translationstring = "1.3"
uptime = ">=3.0.1,<4"
urllib3 = "^1.26.4"
venusian = "^1.2.0"
venusian = "^3.1.0"
waitress = "^2.1.1"
WebOb = "^1.8.7"
WebTest = "^2.0.35"
Expand All @@ -127,8 +134,8 @@ WSGIProxy2 = "0.4.2"

[tool.poetry.dev-dependencies]
# PyCharm says boto3-stubs contains useful type hints
boto3-stubs = "^1.28.62"
botocore-stubs = "^1.31.62"
boto3-stubs = "^1.34.136"
botocore-stubs = "^1.34.136"
coverage = ">=6.2"
codacy-coverage = ">=1.3.11"
coveralls = ">=3.3.1"
Expand Down
Loading