mirror of
				https://github.com/gsi-upm/sitc
				synced 2025-11-04 09:28:16 +00:00 
			
		
		
		
	Add Makefile
This commit is contained in:
		@@ -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
									
								
							
							
						
						
									
										10
									
								
								Makefile
									
									
									
									
									
										Normal 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
 | 
				
			||||||
		Reference in New Issue
	
	Block a user