diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..0116ccd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,86 @@ +name: Bug Report +description: File a report of a problem you encountered. +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + # Thanks for taking the time to fill out this bug report! + ### The following information will help us in getting your issue resolved. + - type: textarea + id: what-happened + attributes: + label: What happened? + description: A short description of what went wrong. + validations: + required: true + - type: textarea + id: command + attributes: + label: What command did you use? + description: | + If you're using `fmriprep-docker`, please include the `RUNNING: ...` line that is printed first. + This helps us replicate the problem. This will be automatically formatted into code, so no need for backticks. + render: shell + validations: + required: true + - type: input + id: version + attributes: + label: What version of fMRIPost-template are you running? + validations: + required: true + - type: dropdown + id: environment + attributes: + label: How are you running fMRIPost-template? + options: + - Docker + - Singularity + - Local installation ("bare-metal") + - Other + validations: + required: true + - type: dropdown + id: bids-valid + attributes: + label: Is your data BIDS valid? + description: | + The BIDS validator can be found at: https://bids-standard.github.io/bids-validator/ + Errors should not be present, but warnings are acceptable. + options: + - "Yes" + - "No" + validations: + required: true + - type: dropdown + id: reuse + attributes: + label: Are you reusing any previously computed results? + description: | + You can select multiple options. + We recommend using a fresh working directory when upgrading to a new fMRIPost-template minor series. + multiple: true + options: + - FreeSurfer + - Anatomical derivatives + - Work directory + - "No" + validations: + required: true + - type: textarea + id: logs + attributes: + label: Please copy and paste any relevant log output. + description: | + Can you find some traces of the error reported in the visual report (at the bottom) or in *crashfiles*? + This will be automatically formatted into code, so no need for backticks. + render: shell + - type: textarea + id: addinfo + attributes: + label: Additional information / screenshots + description: | + If you would like to include any further information, such as any visual reports, please include them below. + Alternatively, you can privately share with us at . + Reports do not contain data usable with personal identification or other research purposes. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..c75c5ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Questions + url: https://neurostars.org/tag/fmripost-template + about: For general questions, please search Neurostars for existing posts before starting a new one. diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md new file mode 100644 index 0000000..0639afc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -0,0 +1,14 @@ +--- +name: Documentation improvement +about: Is the documentation of something missing, unclear, or lacking? This is the place. +title: '' +labels: 'documentation' +assignees: '' + +--- + diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..5f0acd0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,39 @@ +name: Feature Request +description: Suggest an idea for a new feature or a change to an existing one. +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + ## Thank you for your suggestion! + + We welcome any ideas about how to make *fMRIPost-template* better for the community. + Please keep in mind that features may not get implemented immediately. + - type: textarea + id: summary + attributes: + label: What would you like to see added in fMRIPost-template? + description: | + What are you trying to achieve with fMRIPost-template? + Is this a more convenient way to do something that is already possible, or is a workaround currently unfeasible? + Does this feature adhere to the [NiPreps driving principles](https://www.nipreps.org/community/CONTRIBUTING/#driving-principles)? + validations: + required: true + - type: dropdown + id: interest + attributes: + label: Do you have any interest in helping implement the feature? + description: | + We appreciate any help you can offer! + For information on how to contribute, please refer to our [contributing guidelines](https://www.nipreps.org/community/CONTRIBUTING/). + options: + - "Yes" + - Yes, but I would need guidance + - "No" + validations: + required: true + - type: textarea + id: addinfo + attributes: + label: Additional information / screenshots + description: Add any additional information or context about the feature request here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..1e8c74c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +version: 2 +updates: + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'monthly' + groups: + actions-infrastructure: + patterns: + - 'actions/*' + - package-ecosystem: 'pip' + directory: '/services/datalad' + schedule: + interval: 'monthly' + groups: + pipenv: + patterns: + - '*' diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..1f527a6 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,49 @@ + + +## Changes proposed in this pull request + + + + +## Documentation that should be reviewed + + + + + diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..0c8fee8 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,20 @@ +changelog: + exclude: + labels: + - ignore-for-release + categories: + - title: 🛠 Breaking Changes + labels: + - breaking-change + - title: 🎉 Exciting New Features + labels: + - enhancement + - title: 👎 Deprecations + labels: + - deprecation + - title: 🐛 Bug Fixes + labels: + - bug + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml new file mode 100644 index 0000000..ae7833e --- /dev/null +++ b/.github/workflows/contrib.yml @@ -0,0 +1,40 @@ +name: Contribution checks + +on: + push: + branches: + - main + - maint/* + pull_request: + branches: + - main + - maint/* + +defaults: + run: + shell: bash + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + style: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: pipx run ruff check . + - run: pipx run ruff format --diff . + + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..e231f22 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,48 @@ +name: Publish Docker image + +on: + push: + branches: [main] + release: + types: [published] + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + attestations: write + id-token: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.6.1 + + - name: Log in to Docker Hub + uses: docker/login-action@v3.3.0 + with: + username: niprepsbot + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5.5.1 + with: + images: nipreps/fmripost-template + # generate Docker tags based on the following events/attributes + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + + - name: Build and push Docker image + uses: docker/build-push-action@v6.9.0 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..dc8966d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,71 @@ +name: Tests + +on: + push: + branches: + - main + - maint/* + pull_request: + branches: + - main + - maint/* + # Allow job to be triggered manually from GitHub interface + workflow_dispatch: + +defaults: + run: + shell: bash + +# Force tox and pytest to use color +env: + FORCE_COLOR: true + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + stable: + # Check each OS, all supported Python, minimum versions and latest releases + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ['ubuntu-latest'] + python-version: ['3.10', '3.11', '3.12'] + dependencies: ['full', 'pre'] + include: + - os: ubuntu-latest + python-version: '3.10' + dependencies: 'min' + + env: + DEPENDS: ${{ matrix.dependencies }} + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install tox + run: | + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + - name: Show tox config + run: tox c + - name: Run tox + run: tox -v --exit-and-dump-after 1200 + - uses: codecov/codecov-action@v4 + if: ${{ always() }} + with: + files: cov.xml + token: ${{ secrets.CODECOV_TOKEN }}