Skip to content

Commit 947deec

Browse files
authored
Merge pull request #2 from alexisthual/refactoring
Major refactoring of folder structure
2 parents ba42f98 + 3cf6469 commit 947deec

File tree

115 files changed

+1680
-1320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1680
-1320
lines changed

.flake8

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run brain-cockpit api tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
unittest:
13+
name: Test API
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
python_version: "3.7"
20+
- os: ubuntu-latest
21+
python_version: "3.8"
22+
- os: ubuntu-latest
23+
python_version: "3.9"
24+
- os: ubuntu-latest
25+
python_version: "3.10"
26+
- os: ubuntu-latest
27+
python_version: "3.11"
28+
- os: macos-latest
29+
python_version: "3.7"
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Set up Python
33+
uses: actions/setup-python@v2
34+
with:
35+
python-version: ${{ matrix.python_version }}
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install -e .[test]
40+
- name: Lint with pflake8
41+
run: |
42+
pflake8 api
43+
- name: Test with pytest
44+
run: |
45+
pytest
File renamed without changes.

.github/workflows/build_front.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build brain-cockpit front end
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
build:
13+
name: Build front-end
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
node_version: "14"
20+
- os: ubuntu-latest
21+
node_version: "16"
22+
- os: ubuntu-latest
23+
node_version: "18"
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node_version }}
31+
32+
- name: Run install
33+
uses: borales/actions-yarn@v4
34+
with:
35+
cmd: install
36+
dir: web
37+
38+
- name: Build production bundle
39+
uses: borales/actions-yarn@v4
40+
with:
41+
cmd: build
42+
dir: web
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Mirror to Ebrains
2+
3+
# Configure the events that are going to trigger tha automated update of the mirror
4+
on:
5+
push:
6+
branches: [main]
7+
8+
# Configure what will be updated
9+
jobs:
10+
# set the job name
11+
mirror_to_ebrains:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# this task will push the main branch of the source_repo (github) to the
15+
# destination_repo (ebrains gitlab)
16+
- name: sync-main
17+
uses: wei/git-sync@v3
18+
with:
19+
source_repo: "alexisthual/brain-cockpit"
20+
source_branch: "main"
21+
destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/alexisthual/brain-cockpit"
22+
destination_branch: "main"
23+
# this task will push all tags from the source_repo to the destination_repo
24+
- name: sync-tags
25+
uses: wei/git-sync@v3
26+
with:
27+
source_repo: "alexisthual/brain-cockpit"
28+
source_branch: "refs/tags/*"
29+
destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/alexisthual/brain-cockpit"
30+
destination_branch: "refs/tags/*"

.gitignore

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
node_modules
2-
.eslintcache
3-
yarn-error.log
4-
api/public/meshes/*
5-
public/assets/*
6-
public/meshes/*
7-
.env.local
8-
.env.development
9-
.env.development.local
10-
.env.production
11-
.env.production.local
12-
.env.test.local
13-
__pycache__
14-
.sync-config.cson
15-
build
16-
.vscode
1+
**/node_modules
2+
**/.eslintcache
3+
**/yarn-error.log
4+
**/api/public/meshes/*
5+
**/public/assets/*
6+
**/public/meshes/*
7+
**/.env.local
8+
**/.env.development
9+
**/.env.development.local
10+
**/.env.production
11+
**/.env.production.local
12+
**/.env.test.local
13+
**/__pycache__
14+
**/.sync-config.cson
15+
**/build
16+
**/.vscode
1717

1818
.ipynb_checkpoints
1919

2020
# yarn without zero-installs
2121
# see https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
22-
.pnp.*
23-
.yarn/*
24-
!.yarn/patches
25-
!.yarn/plugins
26-
!.yarn/releases
27-
!.yarn/sdks
28-
!.yarn/versions
22+
**/.pnp.*
23+
**/.yarn/*
24+
!**/.yarn/patches
25+
!**/.yarn/plugins
26+
!**/.yarn/releases
27+
!**/.yarn/sdks
28+
!**/.yarn/versions
2929

3030
# Documentation
3131
doc/_build
@@ -34,4 +34,10 @@ doc/gen_modules
3434
doc/generated
3535
doc/modules/generated
3636

37-
*.egg-info
37+
*.egg-info
38+
39+
# Don't export meshes computed by brain-cockpit
40+
*.gltf
41+
*.bin
42+
43+
.pytest_cache

.pre-commit-config.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
repos:
22
- repo: https://github.com/pre-commit/mirrors-prettier
3-
rev: v2.2.0
3+
rev: v3.0.0-alpha.6
44
hooks:
55
- id: prettier
66
- repo: https://github.com/ambv/black
7-
rev: stable
7+
rev: 23.1.0
88
hooks:
99
- id: black
10-
language_version: python3.7
1110
- repo: https://github.com/pycqa/flake8
12-
rev: 3.7.9
11+
rev: 6.0.0
1312
hooks:
1413
- id: flake8

.prettierrc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
trailingComma: "es5"
2+
singleQuote: false

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@
66

77
`brain-cockpit` is a web-app comprising a Typescript front-end and a Python back-end. It is meant to help explore:
88

9-
* large surface fMRI datasets projected
10-
* alignments computed between brains, such as those computed with [fugw](https://alexisthual.github.io/fugw/index.html)
9+
- large surface fMRI datasets projected on surface meshes
10+
- alignments computed between brains, such as those computed with [fugw](https://alexisthual.github.io/fugw/index.html)
1111

12-
![Screenshot](https://mybox.inria.fr/thumbnail/192bdcc47f8c4decbac7/1024/Screenshot%20from%202020-12-07%2012-23-45.png)
12+
You can try our [online demo](https://brain-cockpit.athual.fr/)!
13+
14+
![Screenshot](https://mybox.inria.fr/seafhttp/files/71b1d396-c856-45a7-81c4-a432e9347b7f/main_screenshot.png)
15+
16+
## Acknowledgement
17+
18+
This work has received funding from the European Union’s Horizon 2020 Framework Programme for Research and Innovation
19+
under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3).
20+
It has also been supported by the the KARAIB AI chair (ANR-20-CHIA-0025-01) and the NeuroMind Inria associate team.

0 commit comments

Comments
 (0)