-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fixerrorcodes
- Loading branch information
Showing
27 changed files
with
938 additions
and
213 deletions.
There are no files selected for viewing
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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,17 @@ | ||
FROM scilus/scilus:2.0.2 | ||
|
||
ARG POETRY_VERSION | ||
|
||
ENV POETRY_VERSION=${POETRY_VERSION:-1.8.*} | ||
|
||
RUN apt update && apt install -y \ | ||
curl \ | ||
git \ | ||
openjdk-17-jre \ | ||
python3-venv \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN python3 -m pip install pipx && \ | ||
python3 -m pipx ensurepath && \ | ||
pipx install poetry==${POETRY_VERSION} |
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,77 @@ | ||
{ | ||
"name": "prototyping", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"POETRY_VERSION": "1.8.*" | ||
} | ||
}, | ||
"forwardPorts": [3000], | ||
"initializeCommand": "bash .devcontainer/prototyping/initializeCommand.sh", | ||
"onCreateCommand": "bash .devcontainer/prototyping/onCreateCommand.sh", | ||
"updateContentCommand": "bash .devcontainer/prototyping/updateContentCommand.sh", | ||
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", | ||
"containerEnv": { | ||
"WORKSPACE": "${containerWorkspaceFolder}" | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1": {}, | ||
"ghcr.io/devcontainers/features/github-cli:1": {}, | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {}, | ||
"ghcr.io/robsyme/features/nextflow:1": {}, | ||
"ghcr.io/devcontainers-contrib/features/curl-apt-get:1": {}, | ||
"ghcr.io/devcontainers-contrib/features/tmux-apt-get:1": {}, | ||
"ghcr.io/devcontainers-contrib/features/wget-apt-get:1": {} | ||
}, | ||
"mounts": [ | ||
{ | ||
"source": "nf-proto-${devcontainerId}-venv", | ||
"target": "${containerWorkspaceFolder}/.venv", | ||
"type": "volume" | ||
}, | ||
{ | ||
"target": "/tmp", | ||
"type": "volume" | ||
}, | ||
{ | ||
"source": "nf-proto-${devcontainerId}-profile", | ||
"target": "/root", | ||
"type": "volume" | ||
}, | ||
{ | ||
"target": "/root/.vscode-server", | ||
"type": "volume" | ||
} | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python": { | ||
"analysis.exclude": [ | ||
"${containerWorkspaceFolder}/.vscode", | ||
"${containerWorkspaceFolder}/.venv", | ||
"**/__pycache__", | ||
"${containerWorkspaceFolder}/.git" | ||
], | ||
"analysis.ignore": [ | ||
"${containerWorkspaceFolder}/.vscode", | ||
"${containerWorkspaceFolder}/.venv", | ||
"**/__pycache__", | ||
"${containerWorkspaceFolder}/.git" | ||
], | ||
"createEnvironment.trigger": "off", | ||
"interpreter.infoVisibility": "always", | ||
"poetryPath": "/root/.local/bin/poetry", | ||
"defaultInterpreterPath": "${containerWorkspaceFolder}/.venv", | ||
"terminal.activateEnvironment": true, | ||
"terminal.activateEnvInCurrentTerminal": true, | ||
"terminal.focusAfterLaunch": true | ||
} | ||
}, | ||
"extensions": ["nf-neuro.nf-neuro-extensionpack"] | ||
} | ||
}, | ||
"init": true, | ||
"privileged": true | ||
} |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The prototyping environment must not be started in the nf-neuro repository. | ||
|
||
if [[ $PWD =~ .*/nf-neuro$ ]] | ||
then | ||
|
||
echo "You cannot open a prototyping environment in the nf-neuro repository." | ||
echo "Please, locate yourself elsewhere, outside the nf-neuro tree if possible." | ||
|
||
exit 1 | ||
|
||
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,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Setup for NF-CORE | ||
|
||
mkdir -p $XDG_CONFIG_HOME/nf-neuro | ||
touch $XDG_CONFIG_HOME/nf-neuro/.env | ||
echo "source $XDG_CONFIG_HOME/nf-neuro/.env" >> ~/.bashrc | ||
|
||
# Try to download nf-neuro setup with poetry. If it fails, we defer to pip | ||
{ | ||
NFNEURO_RAW_REPOSITORY=https://raw.githubusercontent.com/scilus/nf-neuro/main | ||
NFCORE_VERSION=2.14.1 | ||
wget -N $NFNEURO_RAW_REPOSITORY/pyproject.toml \ | ||
$NFNEURO_RAW_REPOSITORY/poetry.toml \ | ||
$NFNEURO_RAW_REPOSITORY/poetry.lock | ||
} || { | ||
echo "Failed to download nf-neuro base project configuration. Creating requirements.txt for pip" | ||
echo "nf-core==$NFCORE_VERSION" > requirements.txt | ||
} | ||
|
||
# Try to download VSCode settings from nf-neuro | ||
{ | ||
NFNEURO_RAW_REPOSITORY=https://raw.githubusercontent.com/scilus/nf-neuro/main | ||
mkdir -p .vscode | ||
wget -N -P .vscode $NFNEURO_RAW_REPOSITORY/.vscode/settings.json | ||
} || { | ||
echo "Could not fetch default extension settings from nf-neuro" | ||
} | ||
|
||
# Initial setup for a pipeline prototyping environment | ||
# - nf-core requires a .nf-core.yml file present, else it bugs out (issue nfcore/tools#3340) | ||
touch .nf-core.yml |
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,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
maxmem=$(grep MemTotal /proc/meminfo | awk '{print $2}') | ||
|
||
cat <<EOF > $XDG_CONFIG_HOME/nf-neuro/.env | ||
# This file is used to store environment variables for the project. | ||
# It is sourced by the shell on startup of every terminals. | ||
export PROFILE=docker | ||
export NFCORE_MODULES_GIT_REMOTE=https://github.com/scilus/nf-neuro.git | ||
export NFCORE_MODULES_BRANCH=main | ||
export NFCORE_SUBWORKFLOWS_GIT_REMOTE=https://github.com/scilus/nf-neuro.git | ||
export NFCORE_SUBWORKFLOWS_BRANCH=main | ||
export DEVCONTAINER_RAM_LIMIT_GB=$((maxmem / 1024 / 1024)) | ||
export DEVCONTAINER_CPU_LIMIT=$(grep -c ^processor /proc/cpuinfo) | ||
EOF | ||
|
||
unset maxmem | ||
NFCORE_VERSION=2.14.1 | ||
|
||
if [ -f poetry.lock ] && [ -f pyproject.toml ] | ||
then | ||
poetry install --no-root | ||
elif [ -f requirements.txt ] | ||
then | ||
python3 -m pip install -r requirements.txt | ||
else | ||
echo "No requirements file found, installing nf-core to version $NFCORE_VERSION using pip" | ||
python3 -m pip install nf-core==$NFCORE_VERSION | ||
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,16 @@ | ||
name: Trigger checks manually | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
- edited | ||
|
||
jobs: | ||
checks: | ||
if: github.event.issue.pull_request && contains(github.event.comment.body, '@rerun-checks') | ||
# Cancel if a newer run is started | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
uses: ./.github/workflows/run_checks_suite.yml | ||
secrets: inherit |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.