Skip to content
Open
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/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
name: Python Unit Test with Postgres
uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@master
with:
python-version: '3.9'
python-version: '3.13'
test-script: 'tests/ci_commands_script.sh'
run-coveralls: true
28 changes: 23 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG AZLINUX_BASE_VERSION=master
ARG AZLINUX_BASE_VERSION=3.13-pythonnginx

# Base stage with python-build-base
FROM quay.io/cdis/python-nginx-al:${AZLINUX_BASE_VERSION} AS base
FROM quay.io/cdis/amazonlinux-base:${AZLINUX_BASE_VERSION} AS base

ENV appname=indexd

Expand All @@ -14,27 +14,45 @@ FROM base AS builder

USER gen3

# copy ONLY poetry artifact, install the dependencies but not the app;
# this will make sure that the dependencies are cached
# Copy poetry manifests for dependency caching
COPY poetry.lock pyproject.toml /${appname}/

# Remove the old poetry pipx package from base image, currently set to <2.0
RUN pipx uninstall poetry
# Install poetry version >=2.0 for export compatibility
RUN pip install --upgrade "poetry>=2.0.0,<3.0.0"

# Install the plugin for requirements export
RUN poetry self add poetry-plugin-export

# Install dependencies, not app files
RUN poetry install -vv --no-root --only main --no-interaction

COPY --chown=gen3:gen3 . /${appname}
COPY --chown=gen3:gen3 ./deployment/wsgi/wsgi.py /${appname}/wsgi.py

# install the app
# Install app
RUN poetry install --without dev --no-interaction

# Export requirements for pip in final image
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes

RUN git config --global --add safe.directory ${appname} && COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" > ${appname}/version_data.py \
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >> ${appname}/version_data.py

# Final stage
FROM base

USER root

COPY --from=builder /${appname} /${appname}
COPY --chown=gen3:gen3 ./dockerrun.bash /${appname}/dockerrun.bash

RUN dnf -y install vim

# Install dependencies
RUN pip install --no-cache-dir -r /${appname}/requirements.txt

# Switch to non-root user 'gen3' for the serving process
USER gen3

Expand Down
2 changes: 1 addition & 1 deletion bin/indexd_settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from os import environ
import json
import config_helper
import indexd.config_helper as config_helper
from indexd.index.drivers.alchemy import SQLAlchemyIndexDriver
from indexd.alias.drivers.alchemy import SQLAlchemyAliasDriver
from indexd.auth.drivers.alchemy import SQLAlchemyAuthDriver
Expand Down
2 changes: 1 addition & 1 deletion bin/migrate_to_single_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import argparse
import backoff
import json
import bin.config_helper as config_helper
import indexd.config_helper as config_helper
from cdislogging import get_logger
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
Expand Down
File renamed without changes.
1,367 changes: 756 additions & 611 deletions poetry.lock

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "indexd"
version = "5.1.2"
version = "6.0.0"
description = "Gen3 Indexing Service"
authors = ["CTDS UChicago <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -10,23 +10,25 @@ include = [
]

[tool.poetry.dependencies]
python = ">=3.9.2,<4.0"
python = ">=3.13,<4.0"
alembic = "^1.9.4"
authutils = ">=6,<8"
cdislogging = "^1.0.0"
cdiserrors = "^1.0.0"
doiclient = {git = "https://github.com/uc-cdis/doiclient", rev = "1.0.0"}
dosclient = {git = "https://github.com/uc-cdis/dosclient", rev = "1.1.0"}
gen3authz = "^1.0.4"
gen3authz = "^3.0.0"
hsclient = {git = "https://github.com/uc-cdis/hsclient", rev = "1.0.0"}
indexclient = "^2.1.0"
jsonschema = "^3.2"
psycopg2-binary = ">=2.7"
gunicorn = ">=22.0.0"
flask = "^2.3.3"
sqlalchemy = "^1.4.0"
sqlalchemy-utils = "^0.37.3"
PyYAML = ">=5.3,<7"
gitpython = "^3.1.45"
requests = "^2.32.5"
setuptools = "^80.9.0"
psycopg2-binary = "^2.9.11"

[tool.poetry.group.dev.dependencies]
coveralls = "^3.0.1"
Expand All @@ -36,8 +38,9 @@ pytest-cov = "^2.12.0"
pytest-flask = "^1.2.0"
responses = "^0.13.0"
swagger_spec_validator = "^2.6.0"
deptry = "^0.23.1"


[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core>=2.0.0"]
build-backend = "poetry.core.masonry.api"
Loading