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

feat(update): Python #154

Merged
merged 3 commits into from
Oct 24, 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/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 All @@ -24,7 +24,7 @@
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi

CMD gunicorn \

Check warning on line 27 in Dockerfile

View workflow job for this annotation

GitHub Actions / Create staging docker image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
--workers=$GUNICORN_WORKERS \
--bind=$GUNICORN_BIND \
--threads=$GUNICORN_THREADS \
Expand Down
93 changes: 2 additions & 91 deletions poetry.lock

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

66 changes: 32 additions & 34 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,42 @@ 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"
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 = "*"
python = "^3.12"
python-dotenv = "*"
python-jose = {extras = ["cryptography"], version = "*"}
python-multipart = "*"
pyyaml = "*"
requests = "*"
sqlalchemy = {extras = ["asyncio"], version = "^2.0.35"}
sqlalchemy-utils = "^0.41.2"
starlette = "^0.37.2"
uvicorn = "^0.29.0"
uvloop = "^0.19.0"
aiomysql = "^0.2.0"
pytest-asyncio = "^0.24.0"
tenacity = "^9.0.0"
sqlalchemy = {extras = ["asyncio"], version = "*"}
sqlalchemy-utils = "*"
starlette = "*"
uvicorn = "*"
uvloop = "*"
aiomysql = "*"
pytest-asyncio = "*"
tenacity = "*"

[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
Loading