-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Remi-Gau/lint
[ENH] package and container
- Loading branch information
Showing
14 changed files
with
582 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# ignoring this might speed up build | ||
# by preventing passing extra content to the docker daemon | ||
|
||
|
||
# General | ||
.DS_Store | ||
|
||
.github | ||
.vscode | ||
|
||
**/data | ||
**/docs | ||
**/tests | ||
**/*.zip | ||
**/*.asc | ||
**/*.edf | ||
**/*.EDF | ||
|
||
**/build | ||
.pytest_cache | ||
.mypy_cache | ||
coverage_html | ||
.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: docker | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build docker image | ||
run: docker build -t eye2bids:latest . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# Generated by Neurodocker and Reproenv. | ||
|
||
FROM ubuntu:22.04 | ||
RUN apt-get update -qq \ | ||
&& apt-get install -y -q --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
gcc \ | ||
gnupg2 \ | ||
pip \ | ||
python3 \ | ||
software-properties-common \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN apt-key adv --fetch-keys https://apt.sr-research.com/SRResearch_key && add-apt-repository 'deb [arch=amd64] https://apt.sr-research.com SRResearch main' | ||
RUN apt-get update -qq \ | ||
&& apt-get install -y -q --no-install-recommends \ | ||
eyelink-display-software \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN mkdir /eye2bids | ||
COPY [".", \ | ||
"/eye2bids"] | ||
WORKDIR /eye2bids | ||
RUN pip install .[dev] | ||
|
||
# Save specification to JSON. | ||
RUN printf '{ \ | ||
"pkg_manager": "apt", \ | ||
"existing_users": [ \ | ||
"root" \ | ||
], \ | ||
"instructions": [ \ | ||
{ \ | ||
"name": "from_", \ | ||
"kwds": { \ | ||
"base_image": "ubuntu:22.04" \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "install", \ | ||
"kwds": { \ | ||
"pkgs": [ \ | ||
"gnupg2", \ | ||
"curl", \ | ||
"gcc", \ | ||
"ca-certificates", \ | ||
"software-properties-common", \ | ||
"python3", \ | ||
"pip" \ | ||
], \ | ||
"opts": null \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "run", \ | ||
"kwds": { \ | ||
"command": "apt-get update -qq \\\\\\n && apt-get install -y -q --no-install-recommends \\\\\\n ca-certificates \\\\\\n curl \\\\\\n gcc \\\\\\n gnupg2 \\\\\\n pip \\\\\\n python3 \\\\\\n software-properties-common \\\\\\n && rm -rf /var/lib/apt/lists/*" \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "run", \ | ||
"kwds": { \ | ||
"command": "apt-key adv --fetch-keys https://apt.sr-research.com/SRResearch_key && add-apt-repository '"'"'deb [arch=amd64] https://apt.sr-research.com SRResearch main'"'"'" \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "install", \ | ||
"kwds": { \ | ||
"pkgs": [ \ | ||
"eyelink-display-software" \ | ||
], \ | ||
"opts": null \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "run", \ | ||
"kwds": { \ | ||
"command": "apt-get update -qq \\\\\\n && apt-get install -y -q --no-install-recommends \\\\\\n eyelink-display-software \\\\\\n && rm -rf /var/lib/apt/lists/*" \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "run", \ | ||
"kwds": { \ | ||
"command": "mkdir /eye2bids" \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "copy", \ | ||
"kwds": { \ | ||
"source": [ \ | ||
".", \ | ||
"/eye2bids" \ | ||
], \ | ||
"destination": "/eye2bids" \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "workdir", \ | ||
"kwds": { \ | ||
"path": "/eye2bids" \ | ||
} \ | ||
}, \ | ||
{ \ | ||
"name": "run", \ | ||
"kwds": { \ | ||
"command": "pip install .[dev]" \ | ||
} \ | ||
} \ | ||
] \ | ||
}' > /.reproenv.json | ||
# End saving to specification to JSON. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.PHONY: Dockerfile | ||
|
||
Dockerfile: | ||
docker run --rm repronim/neurodocker:0.9.5 generate docker \ | ||
--pkg-manager apt \ | ||
--base-image ubuntu:22.04 \ | ||
--install gnupg2 curl gcc ca-certificates software-properties-common python3 pip \ | ||
--run "apt-key adv --fetch-keys https://apt.sr-research.com/SRResearch_key && add-apt-repository 'deb [arch=amd64] https://apt.sr-research.com SRResearch main'" \ | ||
--install eyelink-display-software \ | ||
--run "mkdir /eye2bids" \ | ||
--copy "." "/eye2bids" \ | ||
--workdir "/eye2bids" \ | ||
--run "pip install .[dev]" \ | ||
> Dockerfile | ||
|
||
docker_build: | ||
docker build -t eye2bids . | ||
|
||
test_data: | ||
python tools/download_test_data.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,80 @@ | ||
# eye2bids | ||
|
||
## Instructions for testing conversion_json | ||
## Installation | ||
|
||
### Requirements | ||
|
||
- edf file by EyeLink Eye Tracker | ||
- Python3 | ||
- EyeLink Developers Kit. Download from [SR-Research support forum] (forum registration required) | ||
- Python >= 3.8 | ||
|
||
If you want to use eye2bids to convert EyeLink data, | ||
you will need to install the EyeLink Developers Kit. | ||
It can be downloaded from SR-Research support forum (forum registration required). | ||
|
||
The installation on Ubuntu can also be done with the following commands: | ||
|
||
Taken from: https://www.sr-research.com/support/docs.php?topic=linuxsoftware | ||
|
||
```bash | ||
sudo add-apt-repository universe | ||
sudo apt update | ||
sudo apt install ca-certificates | ||
sudo apt-key adv --fetch-keys https://apt.sr-research.com/SRResearch_key | ||
sudo add-apt-repository 'deb [arch=amd64] https://apt.sr-research.com SRResearch main' | ||
sudo apt update | ||
sudo apt install eyelink-display-software | ||
``` | ||
|
||
### Install eye2bids | ||
|
||
- Clone the repository | ||
|
||
```bash | ||
git clone https://github.com/bids-standard/eye2bids.git | ||
``` | ||
|
||
- Install the package in editatble mode | ||
|
||
```bash | ||
cd eye2bids | ||
pip install . | ||
``` | ||
|
||
## Using eye2bids | ||
|
||
- Supporeted Input data: | ||
|
||
- edf file by EyeLink Eye Tracker | ||
|
||
To try it, you can install our test data from OSF by running the following command: | ||
|
||
```bash | ||
python tools/download_test_data.py | ||
``` | ||
|
||
- manual_metadata.yml file (find template and an example in conversion_json folder) | ||
|
||
### Run code | ||
|
||
``` | ||
python3 edf2bids_json.py | ||
```bash | ||
python edf2bids_json.py | ||
``` | ||
|
||
[SR-Research support forum]: https://www.sr-research.com/support/forum-9.html | ||
|
||
## Docker | ||
|
||
You can build the docker image with the following command: | ||
|
||
```bash | ||
docker build -t eye2bids:latest . | ||
``` | ||
|
||
## Contributing | ||
|
||
Make sure you install eye2bids in editable mode (see above) and install the development dependencies: | ||
|
||
```bash | ||
pip install --editable .[dev] | ||
``` | ||
|
||
## Related projects |
Oops, something went wrong.