Adding info regarding python quality checking
This commit is contained in:
		
							parent
							
								
									cb3c17c5db
								
							
						
					
					
						commit
						3d7428e76f
					
				
					 1 changed files with 18 additions and 1 deletions
				
			
		
							
								
								
									
										19
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -96,7 +96,7 @@ If you need to do some global scaling / offset of all zooms in HTML (if for exam
 | 
			
		|||
 | 
			
		||||
## Setting up quality checking for JS
 | 
			
		||||
 | 
			
		||||
 Regarding JS, quality checking is done using [eslint](https://eslint.org/).
 | 
			
		||||
Regarding JS, quality checking is done using [eslint](https://eslint.org/).
 | 
			
		||||
 | 
			
		||||
The configuration file is `eslint/eslintrc.json`.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -110,6 +110,23 @@ To do so, assuming you are using linux, after installing docker, you can run fro
 | 
			
		|||
 | 
			
		||||
You can now open `eslint_report.html` to see the result.
 | 
			
		||||
 | 
			
		||||
## Setting up quality checking for Python
 | 
			
		||||
 | 
			
		||||
Regarding Python, quality checking is done using [prospector](https://prospector.landscape.io/en/master/) using [mypy](https://mypy.readthedocs.io/en/stable/) as an additional checker.
 | 
			
		||||
Auto-formating is done using [Black](https://pypi.org/project/black/)
 | 
			
		||||
 | 
			
		||||
Dependencies are managed not using `pip` but [`pipenv`](https://pipenv.pypa.io/en/latest/).
 | 
			
		||||
 | 
			
		||||
To setup prospector, you need to run:
 | 
			
		||||
 | 
			
		||||
+ Only once, in melpomene's root folder:
 | 
			
		||||
    + Install pipenv: `pip install pipenv`
 | 
			
		||||
    + Install melpomene's root folder: `pipenv install --dev`
 | 
			
		||||
+ Every time to run the quality checking:
 | 
			
		||||
    + `pipenv shell`
 | 
			
		||||
    + `prospector -s veryhigh -w mypy --max-line-length 88 .`
 | 
			
		||||
    + `black .`
 | 
			
		||||
 | 
			
		||||
# Credits
 | 
			
		||||
 | 
			
		||||
Most examples and the documentation of Melpomene uses illustrations from David "Deevad" Revoy's "Pepper & Carrot" webcomic, which is published under CC-BY 4.0. Full licence [here](https://www.peppercarrot.com/en/license/index.html). 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue