@@ -4,29 +4,56 @@ These __Python Snippets__ are tested with Python 3.6.x. All snippets are
4
4
available as Jupyter notebooks (http://jupyter.org/ ).
5
5
6
6
7
- ##Get started...
8
- To get started create a virtual environment and install the required packages.
7
+ ##Getting Started
8
+ All the required Python packages can be installed with ` pipenv ` .
9
9
10
- - Juypter Notebook
11
- - pandas
12
- - geojson
13
- - beautifulsoup4
14
- - feedparser
15
- - scikit-image
16
- - matplotlib
10
+ ###Project Setup
11
+ First you nee to install` pipenv ` .
17
12
13
+ ``` bash
14
+ $ pip install --user pipenv
15
+ ```
16
+
17
+ Install all the required packages
18
+
19
+ ``` bash
20
+ $ pipenv install --dev
21
+ ```
22
+
23
+ ###Run the Notebook
24
+ You can start` jupyter-lab ` to play around with the Juypter notebooks.
25
+
26
+
27
+ ``` bash
28
+ pipenv run jupyter-lab
29
+ ```
30
+
31
+ ###Run the Tests (nbval)
32
+ To test the Jupyter notebooks this project uses[ nbval] ( https://github.com/computationalmodelling/nbval ) , which is a` py.test `
33
+ plugin for validating Jupyter notebooks.
18
34
19
- ###Conda
20
- The following example shows how to create an environment with_ "conda"_
21
- (http://conda.pydata.org/ ) and Python 3.6 with
22
- the required packages.
35
+
36
+ This will check all Jupyter notebooks for errors.
23
37
24
38
``` bash
25
- conda create -n py36-ps python=3.6
39
+ pipenv run py.test --nbval-lax
40
+ ```
41
+
42
+ ###Upgrade Python Packages
43
+ Check which packages have changed.
26
44
27
- source activate py36-ps
45
+ ```
46
+ pipenv update --outdated
47
+ ```
48
+
49
+ This will upgrade everything.
50
+
51
+ ``` bash
52
+ pipenv update
53
+ ```
28
54
29
- ```
55
+ ##CI Build (GitHub Actions)
56
+ - ![ CI Build] ( https://github.com/rueedlinger/python-snippets/workflows/CI%20Build/badge.svg )
30
57
31
58
##The Python Snippets
32
59
The Python snippets are organized by topic.