Skip to content

Commit

Permalink
Merge pull request #295 from Remi-Gau/maint
Browse files Browse the repository at this point in the history
[MAINT] general maintenance
  • Loading branch information
Remi-Gau authored Feb 5, 2024
2 parents f49f780 + 7264337 commit 10f4322
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 102 deletions.
13 changes: 7 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 6 additions & 5 deletions .github/workflows/check_md_links.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 14 additions & 13 deletions .github/workflows/publishdocs.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
53 changes: 27 additions & 26 deletions .github/workflows/test_and_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Test and coverage

# This workflow will install Python dependencies, run tests
Expand All @@ -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
59 changes: 30 additions & 29 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
Expand All @@ -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']
45 changes: 23 additions & 22 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions mlc_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
},
{
"pattern": "^https://static-content.springer.com"
},
{
"pattern": "^https://twitter.com/.*$"
},
{
"pattern": "^https://neurovault.org/.*$"
}
]
}

0 comments on commit 10f4322

Please sign in to comment.