Skip to content

Commit

Permalink
merge with upstream and merge with conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
anroy1 committed Jan 23, 2024
2 parents c127d2d + 4ae564d commit 87b9a78
Show file tree
Hide file tree
Showing 91 changed files with 3,195 additions and 1,582 deletions.
22 changes: 11 additions & 11 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM scilus/scilus:1.6.0

RUN apt update && apt install -y \
git \
python3-venv \
wget \
&& rm -rf /var/lib/apt/lists/*

RUN python3 -m pip install pipx && \
python3 -m pipx ensurepath && \
pipx install poetry
FROM scilus/scilus:1.6.0

RUN apt update && apt install -y \
git \
python3-venv \
wget \
&& rm -rf /var/lib/apt/lists/*

RUN python3 -m pip install pipx && \
python3 -m pipx ensurepath && \
pipx install poetry
91 changes: 65 additions & 26 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,65 @@
{
"name": "NF-SCIL development container",
"build": { "dockerfile": "Dockerfile" },
"forwardPorts": [3000],
"onCreateCommand": "bash .devcontainer/setup_container.sh",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/git-lfs: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": {}
},
"customizations": {
"vscode": {
"extensions": [
"AlexVCaron.nf-scil-extensions"
]
}
},
"init": true,
"privileged": true
}
{
"name": "NF-SCIL development container",
"build": { "dockerfile": "Dockerfile" },
"forwardPorts": [3000],
"onCreateCommand": "bash .devcontainer/setup_container.sh",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/git-lfs: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-scil-venv",
"target": "/workspaces/nf-scil/.venv",
"type": "volume"
},
{
"source": "nf-scil-tmp",
"target": "/tmp",
"type": "volume"
}
],
"customizations": {
"vscode": {
"settings": {
"pythonIndent.keepHangingBracketOnLine": true,
"pythonIndent.trimLinesWithOnlyWhitespace": true,
"python.createEnvironment.trigger": "off",
"python.terminal.activateEnvironment": true,
"python.poetryPath": "/root/.local/bin/poetry",
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
"python.analysis.exclude": [
"${workspaceFolder}/.dvc",
"${workspaceFolder}/.pytest_cache",
"${workspaceFolder}/.test_data",
"${workspaceFolder}/.vscode",
"${workspaceFolder}/nf-scil-extensions",
"**/__pycache__",
"${workspaceFolder}/.git"
],
"python.analysis.ignore": [
"${workspaceFolder}/.dvc",
"${workspaceFolder}/.pytest_cache",
"${workspaceFolder}/.test_data",
"${workspaceFolder}/.vscode",
"${workspaceFolder}/nf-scil-extensions",
"**/__pycache__",
"${workspaceFolder}/.git"
]
},
"extensions": [
"AlexVCaron.nf-scil-extensions",
"ms-python.autopep8"
]
}
},
"init": true,
"privileged": true
}
5 changes: 2 additions & 3 deletions .devcontainer/setup_container.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash

poetry install

echo "poetry shell" >> ~/.bashrc
poetry install --no-root
echo "export PROFILE=docker" >> ~/.bashrc

15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
indent_style = space

[*.{md,yml,yaml,html,css,scss,js,cff}]
indent_size = 2

[LICENSE]
indent_size = 1
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ assignees: AlexVCaron
---

**System (complete the following information, else the issue will be closed):**
- OS: [e.g. Ubuntu, CentOS, other Linux distributions, MacOS, WSL, Windows, ...]
- Python version [e.g. 3.10, PyPa 3.7, CPython 3.9, ...]
- `nf-scil` version [e.g. 1.0.0, 1.2.post3, 0.1.dev0, main, feat/awesome_module, ...]
- OS: [e.g. Ubuntu, CentOS, other Linux distributions, MacOS, WSL, Windows, ...]
- Python version [e.g. 3.10, PyPa 3.7, CPython 3.9, ...]
- `nf-scil` version [e.g. 1.0.0, 1.2.post3, 0.1.dev0, main, feat/awesome_module, ...]

**Describe the bug**
A clear and concise description of what the bug is.
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/code_linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Code Linting
run-name: Code Linting (automated)
on:
issue_comment:
types: [created]

jobs:
fix-linting:
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords
if: >
contains(github.event.comment.html_url, '/pull/') &&
contains(github.event.comment.body, '@nf-scil-bot fix linting') &&
github.repository == 'scilus/nf-scil'
runs-on: ubuntu-latest
steps:
# Use the @nf-scil-bot token to check out so we can push later
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

# indication that the linting is being fixed
- name: React on comment
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ github.event.comment.id }}
reactions: eyes

# Action runs on the issue comment, so we don't get the PR by default
# Use the gh cli to check out the PR
- name: Checkout Pull Request
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-node@v4

- name: Install Prettier
run: npm install -g prettier @prettier/plugin-php

# Check that we actually need to fix something
- name: Run 'prettier --check'
id: prettier_status
run: |
if prettier --check ${GITHUB_WORKSPACE}; then
echo "::set-output name=result::pass"
else
echo "::set-output name=result::fail"
fi
- name: Run 'prettier --write'
if: steps.prettier_status.outputs.result == 'fail'
run: prettier --write ${GITHUB_WORKSPACE}

- name: Post nothing-to-do comment
if: steps.prettier_status.outputs.result == 'pass'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.issue.number }}
body: |
Nothing for me to do here! :shrug:
This is probably because the linting errors come from `nf-core lint` and have to be fixed manually (or with `nf-core lint --fix`).
- name: Commit & push changes
if: steps.prettier_status.outputs.result == 'fail'
run: |
git config user.email "[email protected]"
git config user.name "nf-scil-bot"
git config push.default upstream
git add .
git status
git commit -m "[automated] Fix linting with Prettier"
git push
Loading

0 comments on commit 87b9a78

Please sign in to comment.