forked from NationalGenomicsInfrastructure/TACA
-
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 #32 from SciLifeLab/master
Version sync
- Loading branch information
Showing
99 changed files
with
6,259 additions
and
4,050 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 |
---|---|---|
@@ -1,31 +1,29 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile | ||
{ | ||
"name": "TACA", | ||
"build": { | ||
// Sets the run context to one level up instead of the .devcontainer folder. | ||
"context": "..", | ||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. | ||
"dockerfile": "../Dockerfile" | ||
"name": "TACA", | ||
"build": { | ||
// Sets the run context to one level up instead of the .devcontainer folder. | ||
"context": "..", | ||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. | ||
"dockerfile": "../Dockerfile", | ||
}, | ||
"features": {}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["ms-python.python"], | ||
}, | ||
"features": {}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
] | ||
} | ||
}, | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
"postCreateCommand": "cd ../flowcell_parser/ && pip3 install -e . && cd ../TACA && pip3 install -e .", | ||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "devcontainer" | ||
"mounts": [ | ||
"source=${localEnv:HOME}/repos/flowcell_parser,target=/workspaces/flowcell_parser,type=bind,consistency=cached" | ||
] | ||
} | ||
}, | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
"postCreateCommand": "cd ../flowcell_parser/ && pip3 install -e . && cd ../TACA && pip3 install -e .", | ||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "devcontainer" | ||
"mounts": [ | ||
"source=${localEnv:HOME}/repos/flowcell_parser,target=/workspaces/flowcell_parser,type=bind,consistency=cached", | ||
], | ||
} |
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 @@ | ||
# Start adding here | ||
|
||
# 2024-01-31, Non-invasive fixes after merge with master //AKe | ||
a676908bb32d60bcbc5e42ce710f889980845af4 | ||
2ba0179015e380b3b7e0ce8b9b99666533a7443f | ||
8ea4523b1c9789d03410178d75aea93b6b2ffa77 | ||
d5330f615b237beadcec22d5422dff3c02aa54ff | ||
b9ee704ad4da26790e539b8fe1d39aa71f831ef1 | ||
6a3edf3710b6fdd8c233662ebf900e9bd24e6bd5 |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '1' | ||
version: "1" | ||
invalidStatus: "pending" | ||
labelRule: | ||
values: | ||
|
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,26 @@ | ||
name: Check VERSIONLOG.MD has been updated | ||
on: [pull_request] | ||
|
||
jobs: | ||
check-versionlog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags | ||
|
||
- name: Check for VERSIONLOG.MD changes | ||
id: versionlog_check | ||
# 1) Find the common ancestor between the current HEAD and the base branch | ||
# 2) Then see if the versionlog has been updated in the PR since it diverged | ||
# from the common ancestor | ||
run: | | ||
PR_BASE_SHA=$(git merge-base HEAD ${{ github.event.pull_request.base.sha }}) | ||
FILE_CHANGED=$(git diff --name-only $PR_BASE_SHA HEAD | grep 'VERSIONLOG.md' || true) | ||
if [ -n "$FILE_CHANGED" ]; then | ||
echo "VERSIONLOG.MD has been changed." | ||
else | ||
echo "VERSIONLOG.MD has NOT been changed." | ||
exit 1 # Fail the workflow if no changes in VERSIONLOG.MD | ||
fi |
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,124 @@ | ||
name: Lint code | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
# Use ruff to check for code style violations | ||
ruff-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
- name: ruff --> Check for style violations | ||
# Configured in pyproject.toml | ||
run: ruff check . | ||
|
||
# Use ruff to check code formatting | ||
ruff-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
- name: ruff --> Check code formatting | ||
run: ruff format --check . | ||
|
||
# Use mypy for static type checking | ||
mypy-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install mypy | ||
# Start by installing type stubs | ||
- name: mypy --> Install stubs | ||
run: echo -e "y" | mypy --install-types **/*.py || exit 0 | ||
- name: mypy --> Static type checking | ||
# Configured in pyprojet.toml | ||
run: mypy **/*.py | ||
|
||
# Use pipreqs to check for missing dependencies | ||
pipreqs-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install pipreqs | ||
run: pip install pipreqs | ||
|
||
- name: Install requirements | ||
run: pip install -r requirements.txt | ||
|
||
- name: Run pipreqs | ||
run: pipreqs --savepath pipreqs.txt | ||
|
||
- name: Compare requirements | ||
run: | | ||
# Extract and sort package names | ||
awk -F'(=|==|>|>=|<|<=| @ )' '{print $1}' requirements.txt | sort -u > requirements.compare | ||
awk -F'(=|==|>|>=|<|<=| @ )' '{print $1}' pipreqs.txt | sort -u > pipreqs.compare | ||
# Compare package lists | ||
if cmp -s requirements.compare pipreqs.compare | ||
then | ||
echo "Requirements are the same" | ||
exit 0 | ||
else | ||
echo "Requirements are different" | ||
echo "" | ||
echo "=== current requirements.txt ===" | ||
echo "" | ||
cat requirements.compare | ||
echo "" | ||
echo "=== pipreqs requirements ===" | ||
echo "" | ||
cat pipreqs.compare | ||
exit 1 | ||
fi | ||
# Use Prettier to check various file formats | ||
prettier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install Prettier | ||
run: npm install -g prettier | ||
|
||
- name: Run Prettier --check | ||
run: prettier --check . |
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 |
---|---|---|
|
@@ -9,3 +9,7 @@ _build | |
.benchmarks | ||
.coverage | ||
__pycache__ | ||
.pytest_cache | ||
.vscode | ||
.ruff_cache | ||
.mypy_cache |
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,15 @@ | ||
# .pre-commit-config.yaml | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.6 | ||
hooks: | ||
- id: ruff | ||
- id: ruff-format | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: "v1.7.1" | ||
hooks: | ||
- id: mypy | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v4.0.0-alpha.8" | ||
hooks: | ||
- id: prettier |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.