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

Docker Changes #574

Open
wants to merge 26 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
66f1dd3
build: reorganize build metadata (#549) (#550)
jsstevenson Mar 22, 2024
bca6920
chore: update license (#547)
jsstevenson Mar 22, 2024
cae7672
cicd: require priority label on PRs (#546)
jsstevenson Mar 22, 2024
4c99169
cicd: test install on 3.12 (#544)
jsstevenson Mar 22, 2024
85fd817
docs: readme glow-up (#548)
jsstevenson Mar 22, 2024
841ad71
cicd: update precommit (#558)
jsstevenson Jul 15, 2024
4e1fd34
cicd: update workflows/templates from template repo (#556)
jsstevenson Jul 15, 2024
a774a11
feat: enable more precise logging configuration (#559)
jsstevenson Jul 15, 2024
f8e2c83
cicd: update precommit dependency in pipfile (#560)
jsstevenson Jul 15, 2024
a659989
style: update ruff (#557)
jsstevenson Jul 15, 2024
4df0acc
build!: update ga4gh.vrs, cool-seq-tool, + gene-normalizer (#561)
korikuzma Jul 15, 2024
9f7e149
build: update requirements and build system (#555)
jsstevenson Jul 15, 2024
c5a0132
docs: update seqrepo version to 2024-02-20 (#562)
korikuzma Jul 15, 2024
951425c
fix(cicd): add reference to stalebot (#563)
korikuzma Jul 15, 2024
7bcaed9
fix: __version__ imports (#565)
korikuzma Jul 16, 2024
69d62e5
chore: remove unused files (#568)
korikuzma Jul 16, 2024
ee9083c
style: ruff format (#567)
korikuzma Jul 16, 2024
aecbd08
fix: TypeError for params that accept union of enums (#566)
korikuzma Jul 16, 2024
9f98df1
chore: update ebextensions for downloading latest seqrepo instance (#…
korikuzma Jul 16, 2024
9055f7e
cicd: allow missing credentials in aws creds detection (#569)
jsstevenson Jul 16, 2024
f4b385f
feat!: add `sequence` to `SequenceLocation` (#570)
korikuzma Jul 18, 2024
96237e3
fix: update ga4gh.vrs + add back response_model configs for FastAPI (…
korikuzma Jul 22, 2024
43f1200
docs: update vrs versioning (#572)
korikuzma Jul 22, 2024
2f0440b
added docker and docker-compose files
rajatkapoordfci Jul 23, 2024
8217d11
docker-compose formatting
rajatkapoordfci Jul 23, 2024
b85c6d4
Readme formatting
rajatkapoordfci Jul 23, 2024
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
7 changes: 0 additions & 7 deletions .coveragerc

This file was deleted.

50 changes: 14 additions & 36 deletions .ebextensions/01_download_data.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,24 @@ commands:
command: "yum install -y python-devel postgresql-devel"
02_install_aws_cli:
command: "yum install -y awscli"
03_install_p7zip:
command: "yum install -y p7zip"
04_eb_packages:
03_eb_packages:
command: "/var/app/venv/staging-LQM1lest/bin/pip install uvloop websockets httptools typing-extensions"
05_export_eb_env_var:
04_export_eb_env_var:
command: "export $(cat /opt/elasticbeanstalk/deployment/env | xargs)"

container_commands:
01_cool_seq_tool_permissions:
test: test -d "/var/app/venv/staging-LQM1lest/lib/python3.11/site-packages/cool_seq_tool"
command: "chmod -R 777 /var/app/venv/staging-LQM1lest/lib/python3.11/site-packages/cool_seq_tool/data"
01_s3_download:
test: test ! -d "/usr/local/share/seqrepo/2024-02-20"
command: "aws s3 cp s3://${AWS_BUCKET_NAME}/${AWS_SEQREPO_OBJECT} /usr/local/share/seqrepo.tar.gz --region us-east-2"

02_s3_download:
test: test ! -d "/usr/local/share/seqrepo"
command: "aws s3 cp s3://${AWS_BUCKET_NAME}/${AWS_SEQREPO_OBJECT} /usr/local/share/seqrepo.zip --region us-east-2"
02_extract_seqrepo:
test: test -f "/usr/local/share/seqrepo.tar.gz"
command: "mkdir -p /usr/local/share/seqrepo/2024-02-20 && tar -xzvf /usr/local/share/seqrepo.tar.gz -C /usr/local/share/seqrepo/2024-02-20"

03_p7zip_seqrepo:
test: test -f "/usr/local/share/seqrepo.zip"
command: "7za x /usr/local/share/seqrepo.zip -o/usr/local/share -y"
03_seqrepo_zip_permission:
test: test -f "/usr/local/share/seqrepo.tar.gz"
command: "chmod +wr /usr/local/share/seqrepo.tar.gz"

04_seqrepo_permission:
test: test -d "/usr/local/share/seqrepo"
command: "chmod -R 777 /usr/local/share/seqrepo"

05_macosx_permission:
test: test -d "/usr/local/share/__MACOSX"
command: "chmod -R +wr /usr/local/share/__MACOSX"

06_seqrepo_zip_permission:
test: test -f "/usr/local/share/seqrepo.zip"
command: "chmod +wr /usr/local/share/seqrepo.zip"

07_remove_macosx:
test: test -d "/usr/local/share/__MACOSX"
command: "rm -R /usr/local/share/__MACOSX"

08_remove_seqrepo_zip:
test: test -f "/usr/local/share/seqrepo.zip"
command: "rm /usr/local/share/seqrepo.zip"

9_data_permission:
test: test -d "/usr/local/share/seqrepo"
command: "chmod -R +wrx /usr/local/share/seqrepo"
04_remove_seqrepo_zip:
test: test -f "/usr/local/share/seqrepo.tar.gz"
command: "rm /usr/local/share/seqrepo.tar.gz"
85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Bug Report
description: Report a bug.
labels: ["bug"]
body:
- type: textarea
attributes:
label: Describe the bug
description: Provide a clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Provide detailed steps to replicate the bug.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: What did you expect to happen?
validations:
required: true
- type: textarea
attributes:
label: Current behavior
description: |
What actually happened?

Include full errors, stack traces, and/or relevant logs.
validations:
required: true
- type: textarea
attributes:
label: Possible reason(s)
description: Provide any insights into what might be causing the issue.
validations:
required: false
- type: textarea
attributes:
label: Suggested fix
description: Provide any suggestions on how to resolve the bug.
validations:
required: false
- type: textarea
attributes:
label: Branch, commit, and/or version
description: Provide the branch, commit, and/or version you're using.
placeholder: |
branch: issue-1
commit: abc123d
validations:
required: true
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots with descriptions to help explain your problem.
validations:
required: false
- type: textarea
attributes:
label: Environment details
description: Provide environment details (OS name and version, etc).
validations:
required: true
- type: textarea
attributes:
label: Additional details
description: Provide any other additional details about the problem.
validations:
required: false
- type: dropdown
attributes:
label: Contribution
description: Can you contribute to the development of this feature?
options:
- "Yes, I can create a PR for this fix."
- "Yes, but I can only provide ideas and feedback."
- "No, I cannot contribute."
validations:
required: false
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Feature Request
description: Suggest an idea for this project.
labels: ["enhancement"]
body:
- type: textarea
attributes:
label: Feature description
description: Provide a clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Use case
description: |
Why do you need this feature? For example: "I'm always frustrated when..."
validations:
required: true
- type: textarea
attributes:
label: Proposed solution
description: Provide proposed solution.
validations:
required: false
- type: textarea
attributes:
label: Alternatives considered
description: Describe any alternative solutions you've considered.
validations:
required: false
- type: textarea
attributes:
label: Implementation details
description: Provide any technical details on how the feature might be implemented.
validations:
required: false
- type: textarea
attributes:
label: Potential Impact
description: |
Discuss any potential impacts of this feature on existing functionality or performance, if known.
Will this feature cause breaking changes?
What challenges might arise?
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Provide any other context or screenshots about the feature.
validations:
required: false
- type: dropdown
attributes:
label: Contribution
description: Can you contribute to the development of this feature?
options:
- "Yes, I can create a PR for this feature."
- "Yes, but I can only provide ideas and feedback."
- "No, I cannot contribute."
validations:
required: false
10 changes: 5 additions & 5 deletions .github/workflows/checks.yml → .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -23,10 +23,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/pr-priority-label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pull Request Has Priority Label
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
pr-priority-label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
outputs:
status: ${{ steps.check-labels.outputs.status }}
steps:
- id: check-labels
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: "priority:*"
use_regex: true
add_comment: true
message: "PRs require a priority label. Please add one."
exit_type: failure
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand All @@ -42,7 +42,7 @@ jobs:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Stalebot for issues and PRs"

on:
schedule:
- cron: "30 13 * * 1-5"

jobs:
stale-high-priority:
uses: genomicmedlab/software-templates/.github/workflows/reusable-stale.yaml@main
with:
days-before-issue-stale: 90
days-before-pr-stale: 1
labels: priority:high

stale-medium-priority:
uses: genomicmedlab/software-templates/.github/workflows/reusable-stale.yaml@main
with:
days-before-issue-stale: 135
days-before-pr-stale: 3
labels: priority:medium

stale-low-priority:
uses: genomicmedlab/software-templates/.github/workflows/reusable-stale.yaml@main
with:
days-before-issue-stale: 180
days-before-pr-stale: 7
labels: priority:low
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0 # pre-commit-hooks version
hooks:
- id: check-added-large-files
- id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: detect-aws-credentials
args: [ --allow-missing-credentials ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
rev: v0.5.0 # ruff version
hooks:
- id: ruff-format
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
minimum_pre_commit_version: 3.7.1
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Runs service on port 80.
# Healthchecks service up every 5m.

FROM python:3.7
FROM python:3.10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably good to use the latest Python version

Suggested change
FROM python:3.10
FROM python:3.12

Copy link
Author

@rajatkapoordfci rajatkapoordfci Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can upgrade the python version to 3.12 , however this would depend on the compatibility with all the dependant modules of Variation Normalizer. If currently Variation Normalizer is working on 3.12 , we can upgrade to 3.12.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Variation Normalizer works with 3.12

RUN apt update ; apt install -y rsync
RUN pip install pipenv uvicorn[standard]
COPY . /app
Expand All @@ -13,4 +13,4 @@ EXPOSE 80
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost/variation || exit 1

CMD pipenv run uvicorn variation.main:app --port 80 --host 0.0.0.0
CMD pipenv run uvicorn variation.main:app --port 80 --host 0.0.0.0
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2023 VICC
Copyright (c) 2018-2024 VICC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ verify_ssl = true
pytest = "*"
pytest-asyncio = "*"
pytest-cov = "*"
pre-commit = "*"
pre-commit = ">=3.7.1"
variation-normalizer = {editable = true, path = "."}
jupyter = "*"
ipykernel = "*"
psycopg2-binary = "*"
ruff = "==0.2.0"
ruff = "==0.5.0"

[packages]
"biocommons.seqrepo" = "*"
fastapi = "*"
uvicorn = "*"
pydantic = "==2.*"
"ga4gh.vrs" = {version = "~=2.0.0a5", extras = ["extras"]}
gene-normalizer = "~=0.3.0.dev1"
"ga4gh.vrs" = {version = "~=2.0.0a10", extras = ["extras"]}
gene-normalizer = "~=0.4.0"
boto3 = "*"
cool-seq-tool = "~=0.4.0.dev1"
cool-seq-tool = "~=0.5.0"
bioutils = "*"
Loading
Loading