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

Upgrade Python 3.11 #396

Merged
merged 19 commits into from
Oct 5, 2023
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/main-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/main-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# PyPi publish for tibanna

name: publish

# Controls when the action will run.
on:

# Publish on all tags
push:
tags:
- '*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Publish
env:
PYPI_USER: ${{ secrets.PYPI_USER }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
make configure
make publish-for-ga
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
python_version: ['3.9']
python_version: ['3.11']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
Change Log
==========


5.0.0
=====

* Update to Python 3.11.
* Note 3: As of Tibanna version 5.0.0, Python 3.7 (and lower) is no longer supported.
Please switch to Python 3.11!


4.0.0
=====

Expand Down
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ clean:
rm -rf *.egg-info
rm -rf .eggs

configure:
pip install poetry==1.4.2

lint:
flake8 tibanna

build:
make configure
poetry install
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add make configure here. You'll need to make a target.

And install looks redundant with build. Rather than eliminate it, to stay compatible, I suggest it should identify itself a synonym and then be implemented by make build.


install:
poetry install

Expand All @@ -17,6 +24,17 @@ retest: # runs only failed tests from the last test run.
update: # updates dependencies
poetry update

publish:
# New Python based publish script (2023-09-20).
poetry run publish-to-pypi

publish-for-ga:
# Need this poetry install first for some reason in GitHub Actions, otherwise getting this:
# Warning: 'publish-to-pypi' is an entry point defined in pyproject.toml, but it's not installed as a script. You may get improper `sys.argv[0]`.
# Only a warning, but then it does not find dcicutils for some reason.
poetry install
poetry run publish-to-pypi --noconfirm

publish-pypi:
scripts/publish-pypi

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ API().run_workflow(input_json='myrun.json')
---
Note: Starting `0.8.2`, Tibanna supports local CWL/WDL files as well as shell commands and Snakemake workflows.

Note 2: As of Tibanna version `2.0.0`, Python 3.6 is no longer supported. Please switch to Python 3.8! Python 3.7 is also supported as a fallback, but please prefer 3.8 if you can.
Note 2: As of Tibanna version `2.0.0`, Python 3.7 (and lower) is no longer supported. Please switch to Python 3.11! Python 3.8 is also supported as a fallback, but please prefer 3.11 if you can.
Copy link
Member

Choose a reason for hiding this comment

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

Tibanna 3 supports Python 3.7. Better include a new block:

Note 3: As of Tibanna version 5.0.0, Python 3.7 (and lower) is no longer supported. Please switch to Python 3.11!


Note 3: Starting `0.8.0`, one no longer needs to `git clone` the Tibanna repo.
* Please switch from `invoke <command>` to `tibanna <command>`!
Expand Down
1 change: 1 addition & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Version updates
**Sep 15, 2023** The latest version is now 4.0.0_.
- Support for Python 3.7 has been dropped
- Added support for Python 3.9 and 3.10
- Added support for Python 3.11
Copy link
Member

Choose a reason for hiding this comment

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

Sep 21, 2023 The latest version is now 5.0.0_.
- Added support for Python 3.11


**Nov 18, 2022** The latest version is now 3.0.0_.
- Tibanna now supports AWS Graviton-based instances.
Expand Down
847 changes: 670 additions & 177 deletions poetry.lock

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tibanna"
version = "4.0.0"
version = "5.0.0"
description = "Tibanna runs portable pipelines (in CWL/WDL) on the AWS Cloud."
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand All @@ -25,25 +25,30 @@ classifiers = [
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
]

[tool.poetry.dependencies]
python = ">=3.8,<3.11"
python = ">=3.8,<3.12"
python-lambda-4dn = "0.12.3"
boto3 = "^1.9.0"
botocore = "^1.12.1"
boto3 = "^1.28.56"
botocore = "^1.31.56"
Benchmark-4dn = "^0.5.23"
tomlkit = "^0.11.0"

[tool.poetry.dev-dependencies]
invoke = "0.18.1"
boto3-stubs = "^1.28.56"
botocore-stubs = "^1.31.56"
invoke = "^2.2.0"
flake8 = "^3.9.0"

# PyTest and its auxiliary support files
pytest = "^6.0"
pytest-cov = "^3.0.0"
# Need pytest-redis 3.0.2 or higher for pytest 7.4.2 (or higher).
pytest = "^7.4.2"
pytest-redis = "^3.0.2"
pytest-cov = "^4.1.0"
pytest-parallel = "^0.1.1"
pytest-mock = "3.7"
pytest-mock = "^3.11.1"

coverage = {extras = ["toml"], version = "^6.3.2"}

Expand All @@ -55,6 +60,7 @@ sphinx-rtd-theme = "0.5.0" # Do we have a good reason to pin this? -kmp 9-Nov-2
[tool.poetry.scripts]
tibanna = "tibanna.__main__:main"
awsf3 = "awsf3.__main__:main"
publish-to-pypi = "dcicutils.scripts.publish_to_pypi:main"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion tibanna/lambdas/check_task_awsem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'function_handler': 'handler',
'handler': 'service.handler',
'region': AWS_REGION,
'runtime': 'python3.9',
'runtime': 'python3.11',
'role': 'tibanna_lambda_init_role',
'description': 'check status of AWSEM run by interegating appropriate files on S3 ',
'timeout': 300,
Expand Down
2 changes: 1 addition & 1 deletion tibanna/lambdas/run_task_awsem.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'function_handler': 'handler',
'handler': 'service.handler',
'region': AWS_REGION,
'runtime': 'python3.9',
'runtime': 'python3.11',
'role': 'tibanna_lambda_init_role',
'description': 'launch an ec2 instance',
'timeout': 300,
Expand Down
2 changes: 1 addition & 1 deletion tibanna/lambdas/update_cost_awsem.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'function_handler': 'handler',
'handler': 'service.handler',
'region': AWS_REGION,
'runtime': 'python3.9',
'runtime': 'python3.11',
'role': 'tibanna_lambda_init_role',
'description': 'update costs of a workflow run',
'timeout': 300,
Expand Down
Loading