-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from alliance-genome/KANBAN-508_API
API setup and implementation - KANBAN-508
- Loading branch information
Showing
26 changed files
with
719 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[run] | ||
source = src | ||
omit = | ||
*__init__* | ||
|
||
[report] | ||
exclude_lines = | ||
# Exclude defensive assertion code | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Exclude main method calling (not testable through unit testing) | ||
if __name__ == .__main__.: | ||
|
||
# Exclude all functions labeled with "pragma: no cover" | ||
pragma: no cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[flake8] | ||
ignore = E266, E501, W503 | ||
max-complexity = 18 | ||
select = B,C,E,F,W,T4 | ||
exclude = venv,node_modules | ||
per-file-ignores = __init__.py:F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Local dev env executables and symlinks | ||
nextflow.sh | ||
nextflow.config | ||
*.nf | ||
# Nextflow output files | ||
seq_regions*.json | ||
.nextflow* | ||
pipeline-results*/ | ||
work/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Note: Building this container requires the repository root directory as build context directory (../) | ||
# as files from other components (workflow) must be included in the API container image | ||
FROM python:3.12-slim-bullseye | ||
|
||
WORKDIR /usr/src/app | ||
|
||
RUN apt update && apt upgrade -y | ||
RUN apt install -y make curl | ||
|
||
COPY api/requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY api/src/ ./ | ||
|
||
# Nextflow requirements, executable and configs | ||
RUN apt install -y default-jre | ||
COPY pipeline/workflow/Makefile workflow_makefile | ||
RUN make -f workflow_makefile nextflow.sh | ||
COPY pipeline/workflow/nextflow.config nextflow.config | ||
COPY pipeline/workflow/protein-msa.nf protein-msa.nf | ||
|
||
# Expose necessary ports | ||
EXPOSE 8080 | ||
|
||
# Default environment variables | ||
ENV API_RESULTS_PATH_PREFIX="s3://agr-pavi-pipeline-nextflow/main/results/" | ||
ENV API_EXECUTION_ENV="aws" | ||
ENV API_PIPELINE_IMAGE_TAG="main" | ||
|
||
# Start the API server application | ||
CMD [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Local dev env symlinks | ||
api/src/nextflow.sh | ||
api/src/nextflow.config | ||
api/src/*.nf | ||
# Nextflow output files | ||
api/src/seq_regions*.json | ||
api/src/.nextflow* | ||
api/src/pipeline-results*/ | ||
api/src/work/ |
Oops, something went wrong.