-
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 #2 from alliance-genome/KANBAN-504_seq-retrieval
KANBAN-504 seq retrieval core functionality
- Loading branch information
Showing
12 changed files
with
727 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: PR validation | ||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened, edited] | ||
branches: | ||
- main | ||
jobs: | ||
pipeline-seq-retrieval-container-image-build: | ||
name: pipeline/seq_retrieval container-image build | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./pipeline/seq_retrieval/ | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
sparse-checkout: | | ||
pipeline/seq_retrieval/ | ||
- name: Build container image | ||
run: | | ||
make container-image | ||
pipeline-seq-retrieval-python-typing-check: | ||
name: pipeline/seq_retrieval python typing check | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./pipeline/seq_retrieval/ | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
sparse-checkout: | | ||
pipeline/seq_retrieval/ | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- name: Check python typing | ||
run: | | ||
make check-python-typing | ||
pipeline-seq-retrieval-python-style-check: | ||
name: pipeline/seq_retrieval python style check | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./pipeline/seq_retrieval/ | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
sparse-checkout: | | ||
pipeline/seq_retrieval/ | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- name: Check python style | ||
run: | | ||
make check-python-style | ||
#TODO: add unit testing | ||
#TODO: add integration testing |
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,6 @@ | ||
[flake8] | ||
ignore = E203, E266, E501, F401, W503, E501 | ||
max-complexity = 18 | ||
select = B,C,E,F,W,T4 | ||
exclude = venv | ||
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,13 @@ | ||
FROM python:3.12-alpine | ||
|
||
WORKDIR /usr/src/app | ||
|
||
RUN apk add --no-cache build-base zlib-dev bzip2-dev xz-dev | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY src/ ./ | ||
|
||
ENTRYPOINT [ "python", "main.py"] | ||
CMD [ "--help" ] |
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,34 @@ | ||
.PHONY: check-venv-active check-python-typing | ||
|
||
container-image: | ||
docker build -t agr_pavi/seq_retrieval . | ||
python-dependencies: | ||
pip install -r requirements.txt | ||
|
||
python-dependencies-update: | ||
pip install -U -r requirements.txt | ||
|
||
python-test-dependencies: | ||
pip install -r tests/requirements.txt | ||
|
||
check-python-typing: python-dependencies python-test-dependencies | ||
mypy --install-types --non-interactive src/main.py | ||
|
||
check-python-style: python-dependencies python-test-dependencies | ||
flake8 ./ | ||
|
||
check-venv-active: | ||
ifeq ($(VIRTUAL_ENV),) | ||
@echo 'No active python virtual environment found.'\ | ||
'Please active the virtual environment first by running `source venv/bin/activate`,'\ | ||
'or read README.md for instructions on how to set up a new one.' | ||
@exit 1 | ||
else | ||
@: | ||
endif | ||
|
||
python-dependencies-dev: check-venv-active python-dependencies | ||
|
||
python-dependencies-dev-update: check-venv-active python-dependencies-update | ||
|
||
check-python-typing-dev: check-venv-active check-python-typing |
Oops, something went wrong.