Skip to content

Commit

Permalink
merging dev and cool-seq-tool structure changes
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl committed Aug 13, 2024
2 parents bd2f5e9 + fbe0a83 commit 95de540
Show file tree
Hide file tree
Showing 71 changed files with 2,306 additions and 2,051 deletions.
4 changes: 2 additions & 2 deletions .ebextensions/01_build.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ container_commands:
command: "yarn --cwd client build"

03_mv_client:
test: test ! -d "server/curfu/build"
command: "cp -R client/build server/curfu/build"
test: test ! -d "server/src/curfu/build"
command: "cp -R client/build server/src/curfu/build"
52 changes: 14 additions & 38 deletions .ebextensions/02_data_downloads.config
Original file line number Diff line number Diff line change
@@ -1,46 +1,22 @@
commands:
01_install_postgresql_devel:
command: "yum install -y python-devel postgresql-devel"
02_install_aws_cli:
01_install_aws_cli:
command: "yum install -y awscli"
03_install_p7zip:
command: "yum install -y p7zip"
04_export_eb_env_var:
02_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_seqrepo_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"

09_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
21 changes: 11 additions & 10 deletions .github/workflows/backend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11

Expand All @@ -18,14 +18,15 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: black
uses: psf/black@stable
- name: Setup Python
uses: actions/setup-python@v5
with:
src: "./server"
python-version: "3.11"

- name: ruff
uses: chartboost/ruff-action@v1
with:
src: "./server"
- name: Install dependencies
run: python3 -m pip install "server/.[dev]"

- name: Check style
run: python3 -m ruff check server/ && python3 -m ruff format --check server/
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
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: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
**/.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down Expand Up @@ -176,8 +176,8 @@ yarn-debug.log*
yarn-error.log*
frontend/public/
frontend/node_modules
node_modules/
**/node_modules/
**/.yarn

# Data
server/curfu/data
client/node_modules
server/src/curfu/data
17 changes: 8 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0
rev: v4.6.0 # pre-commit-hooks version
hooks:
- id: check-added-large-files
args: ["--maxkb=2000"]
- id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3.11
- id: check-merge-conflict
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.286
rev: v0.5.0 # ruff version
hooks:
- id: ruff-format
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: [--fix, --exit-non-zero-on-fix, --config=server/pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: "v8.20.0"
hooks:
Expand All @@ -34,3 +32,4 @@ repos:
rev: "v2.7.1"
hooks:
- id: prettier
minimum_pre_commit_version: 3.7.1
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) 2021-2022 Alex H. Wagner
Copyright (c) 2021-2024 Genomic Medicine Lab

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
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: sh -c 'cd ./server/ && gunicorn -k uvicorn.workers.UvicornWorker curfu.main:app --timeout 1000 --log-level debug'
web: sh -c 'cd ./server/src/ && gunicorn -k uvicorn.workers.UvicornWorker curfu.main:app --timeout 1000 --log-level debug'
Loading

0 comments on commit 95de540

Please sign in to comment.