Skip to content

Commit

Permalink
feat(update): Python
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikstranneheim committed Oct 4, 2024
1 parent 6fbaf04 commit 64d370d
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 139 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Set up Black
uses: psf/black@stable
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_dockerfile_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ jobs:
name: Create staging docker image
steps:
- name: Check out git repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"

- name: Login to Docker Hub
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3.1.0
uses: docker/setup-buildx-action@v3

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_dockerfile_on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ jobs:
name: Push production docker image to dockerhub
steps:
- name: Check out git repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"

- name: Login to Docker Hub
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3.1.0
uses: docker/setup-buildx-action@v3

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2.2.3
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/python:3.11-slim-bullseye as base
FROM docker.io/library/python:3.12-slim-bullseye as base

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Create staging docker image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

LABEL about.home="https://github.com/Clinical-Genomics/genotype-api"
LABEL about.tags="Genotype API"
Expand Down
96 changes: 3 additions & 93 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 30 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,41 @@ authors = ["Christian Oertlin <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
aiofiles = "^23.2.1"
bcrypt = "^4.1.2"
bump2version = "^1.0.1"
click = "^8.1.7"
coloredlogs = "^15.0.1"
cryptography = "^42.0.8"
email-validator = "^2.1.1"
fastapi = ">=0.109.1"
google-auth = "^2.29.0"
aiofiles = "*"
bcrypt = "*"
bump2version = "*"
click = "*"
coloredlogs = "*"
cryptography = "*"
email-validator = "*"
fastapi = "*"
google-auth = "*"
gunicorn = "*"
httptools = "^0.6.1"
numpy = "^1.26.4"
openpyxl = "^3.1.2"
passlib = "^1.7.4"
pydantic = "^2.6.4"
pydantic-settings = "^2.2.1"
pymysql = "^1.1.0"
python = "^3.11"
python-dotenv = "^1.0.1"
python-jose = {extras = ["cryptography"], version = "^3.3.0"}
python-multipart = "^0.0.9"
pyyaml = "^6.0.1"
httptools = "*"
numpy = "*"
openpyxl = "*"
passlib = "*"
pydantic = "*"
pydantic-settings = "*"
pymysql = "*"
python = "^3.12"
python-dotenv = "*"
python-jose = "*"
python-multipart = "*"
pyyaml = "*"
requests = "*"
sqlalchemy = "^2.0.29"
sqlalchemy-utils = "^0.41.2"
starlette = "^0.37.2"
uvicorn = "^0.29.0"
uvloop = "^0.19.0"
sqlalchemy = "*"
sqlalchemy-utils = "*"
starlette = "*"
uvicorn = "*"
uvloop = "*"


[tool.poetry.group.dev.dependencies]
bump2version = "^1.0.1"
coveralls = "^3.3.1"
pre-commit = "^3.7.0"
pylint = "^3.1.0"
pytest-cov = "^5.0.0"
pytest = ">=5.2"
coveralls = "*"
pre-commit = "*"
pytest-cov = "*"
pytest = "*"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 64d370d

Please sign in to comment.