diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f733c7a5..e73f065b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,13 +1,14 @@ +--- # Documentation # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 updates: - - package-ecosystem: 'github-actions' - directory: '/' +- package-ecosystem: github-actions + directory: / schedule: - interval: 'monthly' + interval: monthly - - package-ecosystem: 'gitsubmodule' - directory: '/' +- package-ecosystem: gitsubmodule + directory: / schedule: - interval: 'monthly' + interval: monthly diff --git a/.github/workflows/check_md_links.yml b/.github/workflows/check_md_links.yml index 60f3b141..bbe33e6f 100644 --- a/.github/workflows/check_md_links.yml +++ b/.github/workflows/check_md_links.yml @@ -1,10 +1,11 @@ +--- name: Check Markdown links on: push jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 + markdown-link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: gaurav-nelson/github-action-markdown-link-check@v1 diff --git a/.github/workflows/publishdocs.yaml b/.github/workflows/publishdocs.yaml index 5586266f..5c84d0a7 100644 --- a/.github/workflows/publishdocs.yaml +++ b/.github/workflows/publishdocs.yaml @@ -1,18 +1,19 @@ +--- name: Publish docs via GitHub Pages on: - push: - branches: - - master + push: + branches: + - master jobs: - build: - name: Deploy docs - runs-on: ubuntu-latest - steps: - - name: Checkout master - uses: actions/checkout@v4 + build: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - name: Checkout master + uses: actions/checkout@v4 - - name: Deploy docs - uses: mhausenblas/mkdocs-deploy-gh-pages@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Deploy docs + uses: mhausenblas/mkdocs-deploy-gh-pages@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test_and_coverage.yml b/.github/workflows/test_and_coverage.yml index c923a8bc..72f7006a 100644 --- a/.github/workflows/test_and_coverage.yml +++ b/.github/workflows/test_and_coverage.yml @@ -1,3 +1,4 @@ +--- name: Test and coverage # This workflow will install Python dependencies, run tests @@ -13,36 +14,36 @@ on: [push, pull_request] jobs: - build: + build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest - steps: + steps: - - name: Clone repo - uses: actions/checkout@v4 + - name: Clone repo + uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools - pip install -r python/requirements.txt - cd python && pip install -e . && cd .. - mkdir -p lib && git clone https://github.com/Remi-Gau/reproschema-py.git lib/reproschema-py - cd lib/reproschema-py && git checkout remi_schema_creator && pip install -e . + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + pip install -r python/requirements.txt + cd python && pip install -e . && cd .. + mkdir -p lib && git clone https://github.com/Remi-Gau/reproschema-py.git lib/reproschema-py + cd lib/reproschema-py && git checkout remi_schema_creator && pip install -e . - - name: Run tests and generate coverage report - run: python -m pytest python/tests --cov=./ --cov-report=xml + - name: Run tests and generate coverage report + run: python -m pytest python/tests --cov=./ --cov-report=xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - file: ./coverage.xml - flags: unittests - name: codecov-umbrella - fail_ci_if_error: true - verbose: true + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index bea86225..abeec57f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,46 +1,47 @@ +--- name: Validate eCobidas protocols and activities on: push: - branches: [master] + branches: [master] pull_request: - branches: "*" + branches: '*' jobs: - build: + build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: "12.x" + steps: + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 12.x # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 # Checks that our JSON are valid - - name: Check for syntax errors - run: | - npm install -g jsonlint - grep -r "@context" activities | cut -d: -f1 | xargs -I fname jsonlint -q fname - grep -r "@context" python/conversion/tests/data | cut -d: -f1 | xargs -I fname jsonlint -q fname + - name: Check for syntax errors + run: | + npm install -g jsonlint + grep -r "@context" activities | cut -d: -f1 | xargs -I fname jsonlint -q fname + grep -r "@context" python/conversion/tests/data | cut -d: -f1 | xargs -I fname jsonlint -q fname # Checks that the schemas are valid - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.8 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools - pip install reproschema requests_cache - - - name: Test with pyshacl - run: | - reproschema -l DEBUG validate python/tests/data/protocols - reproschema -l DEBUG validate python/tests/data/activities + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + pip install reproschema requests_cache + + - name: Test with pyshacl + run: | + reproschema -l DEBUG validate python/tests/data/protocols + reproschema -l DEBUG validate python/tests/data/activities diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a752ebac..eb538cef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +--- # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: @@ -15,6 +16,13 @@ repos: - id: black - repo: https://github.com/ikamensh/flynt/ - rev: '1.0.1' + rev: 1.0.1 hooks: - id: flynt + + +- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.3 + hooks: + - id: yamlfmt + args: [--mapping, '4', --sequence, '4', --offset, '0'] diff --git a/mkdocs.yml b/mkdocs.yml index d678cd65..01b549be 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,33 +1,34 @@ +--- # Project information -site_name: 'eCOBIDAS' -repo_name: 'Remi-Gau/eCobidas' -repo_url: 'https://github.com/Remi-Gau/eCobidas' +site_name: eCOBIDAS +repo_name: Remi-Gau/eCobidas +repo_url: https://github.com/Remi-Gau/eCobidas # docs_dir: alternative_path # docs/ is the default folder # This will use Material them theme: - name: 'material' - language: 'en' - palette: - primary: 'light blue' - accent: 'light blue' + name: material + language: en + palette: + primary: light blue + accent: light blue # Pages nav: - - Welcome: "index.md" - - Motivations: "10-motivations.md" - - Goals: - - Short term goals: "21-short-term.md" - - Mid term goals: "22-mid-term.md" - - Long term goals: "23-long-term.md" - - General organization: "30-general-organization.md" - - Working with the spreadhseets: "40-spreadsheets.md" - - Viewing the checklist: "50-how-to-render-the-checklist.md" - - How to contribute: "80-how-to-contribute.md" - - Contributors: "90-contributors.md" - - References: "99-references.md" +- Welcome: index.md +- Motivations: 10-motivations.md +- Goals: + - Short term goals: 21-short-term.md + - Mid term goals: 22-mid-term.md + - Long term goals: 23-long-term.md +- General organization: 30-general-organization.md +- Working with the spreadhseets: 40-spreadsheets.md +- Viewing the checklist: 50-how-to-render-the-checklist.md +- How to contribute: 80-how-to-contribute.md +- Contributors: 90-contributors.md +- References: 99-references.md # list of extension markdown_extensions: - - admonition - - pymdownx.details +- admonition +- pymdownx.details diff --git a/mlc_config.json b/mlc_config.json index b568162d..234eb33a 100644 --- a/mlc_config.json +++ b/mlc_config.json @@ -8,6 +8,12 @@ }, { "pattern": "^https://static-content.springer.com" + }, + { + "pattern": "^https://twitter.com/.*$" + }, + { + "pattern": "^https://neurovault.org/.*$" } ] }