1
0
mirror of https://github.com/gsi-upm/sitc synced 2024-12-22 03:38:13 +00:00

Add Makefile

This commit is contained in:
J. Fernando Sánchez 2019-03-06 12:02:49 +01:00
parent 267421e5b8
commit d4b59e702d
2 changed files with 36 additions and 0 deletions

View File

@ -20,10 +20,36 @@ pip install nbstripout
nbstripout --install nbstripout --install
``` ```
This will install a git hook that strips all metadata from the notebooks before you commit changes to git. This will install a git hook that strips all metadata from the notebooks before you commit changes to git.
You can also remove the output from all cells using this command:
```
make clean
```
To limit the command to a specific folder (e.g. ml1):
```
make FOLDER=ml1 clean
```
4. Submit your pull request on GitHub. 4. Submit your pull request on GitHub.
5. A member of the GSI-UPM group will review your request. 5. A member of the GSI-UPM group will review your request.
6. The reviewer may ask for further changes before merging the contribution. Please, follow the reviewer's instructions before resubmitting. 6. The reviewer may ask for further changes before merging the contribution. Please, follow the reviewer's instructions before resubmitting.
## Testing the changes
You can execute all notebooks at once to make sure they work with this command:
```
make exec
```
To only check notebooks in a specific folder, run:
```
make FOLDER=ml2 exec # Run all notebooks in the ml2 folder
```
## Code of Conduct ## Code of Conduct
### Our Pledge ### Our Pledge

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
FOLDER:=.
exec:
find $(FOLDER) -iname '*.ipynb' -print0 | xargs -n 1 -0 sh -c 'jupyter nbconvert --execute --ClearOutputPreprocessor.enabled=True --inplace $$0 || exit 255'
clean:
find $(FOLDER) -iname '*.ipynb' -print0 | xargs -n 1 -0 sh -c 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace $$0 || exit 255'
.PHONY: exec clean