-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved installation instructions and separate installation from bas…
…ic python.
- Loading branch information
Showing
175 changed files
with
12,473 additions
and
1,694 deletions.
There are no files selected for viewing
Binary file modified
BIN
+24 Bytes
(100%)
_downloads/02455a388cef9885eb9ffbbbd37a47a9/python_basics-strings.pdf
Binary file not shown.
Binary file modified
BIN
+46 KB
(160%)
_downloads/03b64cf485748e55c9f602b44d3cfba0/projects-writing_simple_pytasks.pdf
Binary file not shown.
Binary file modified
BIN
+42.6 KB
(160%)
_downloads/048af2856cd5004e582b3719a6ed54f5/software_engineering-idea_of_testing.pdf
Binary file not shown.
Binary file modified
BIN
-1 Byte
(100%)
_downloads/06a094bd3c5d699718160812bd1fade7/projects-directory_structure.pdf
Binary file not shown.
Binary file modified
BIN
-664 KB
(17%)
_downloads/06b4f966cd9a770240a7476ea1c3985d/background-os_history.pdf
Binary file not shown.
Binary file modified
BIN
+3 Bytes
(100%)
_downloads/07628fb03f37043c159a28dd5e8acac2/software_engineering-pure_functions.pdf
Binary file not shown.
Binary file modified
BIN
-32.5 KB
(73%)
_downloads/0f33f4cb8a10352106b283c781a3e269/python_basics-functions_basics.pdf
Binary file not shown.
Binary file modified
BIN
+48.2 KB
(140%)
_downloads/13c484b9f525026d99cf31d30670ee68/python_basics-pathlib.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
_downloads/15ad80c05b0e5675f14eed62f3766214/projects-reproducibility.pdf
Binary file not shown.
Binary file modified
BIN
+37.9 KB
(160%)
_downloads/22393dd56dc1451a88a1a245f8716811/pandas-what_is_pandas.pdf
Binary file not shown.
Binary file modified
BIN
-67.2 KB
(31%)
_downloads/296f9d7b6a2c1a89f30b04766d949f47/background-file_systems.pdf
Binary file not shown.
Binary file modified
BIN
-78.8 KB
(56%)
_downloads/2c55eab50a3eba258876c70376ddaf46/software_engineering-reuse_test_code.pdf
Binary file not shown.
Binary file modified
BIN
-1 Byte
(100%)
_downloads/2e495dd57d3d5b8c1e03386ab3c34ba0/tools-windows_navigation.pdf
Binary file not shown.
Binary file added
BIN
+265 KB
...ads/30e1b642a2ee90a95beffbebdcc7e8f1/python_installation_execution-executing_py_shell.pdf
Binary file not shown.
Binary file modified
BIN
+16.5 KB
(130%)
_downloads/329adf43100cc51769b6c3102f726419/tools-why_shells_today.pdf
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
_downloads/3793951a17990cd6feb257c3fe80858f/projects-setup.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
_downloads/3ac9bbbdb4a26f6f1742605a5f43f70d/pandas-loading_and_saving.pdf
Binary file not shown.
Binary file modified
BIN
+5 Bytes
(100%)
_downloads/42992eab203923aca81c879a5399449f/projects-pytask_docs.pdf
Binary file not shown.
Binary file added
BIN
+547 KB
...ea7970daf3fd8a7fe6c3f544af8d5/python_installation_execution-executing_notebook_vscode.pdf
Binary file not shown.
Binary file modified
BIN
-139 KB
(38%)
_downloads/4fc2a5a7ae966a3e4a028dd490024ced/projects-reusing_pytask_functions.pdf
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
_downloads/5140db96ccdfb8ce7cbb85ed14c1d041/projects-paths.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
_downloads/5758640a3af1b3d13e57bc59ebea0bbb/python_basics-importing.pdf
Binary file not shown.
Binary file added
BIN
+475 KB
...ds/58df93097a2a6ca43c53b1ad421c796e/python_installation_execution-executing_py_vscode.pdf
Binary file not shown.
Binary file modified
BIN
+121 KB
(140%)
_downloads/5a88042a5b93818d82a05790e5d0e9b0/software_engineering-what_does_pytest_do.pdf
Binary file not shown.
Binary file modified
BIN
+34 Bytes
(100%)
_downloads/5d004c6cbe8a015a4696d018810dcdd7/software_engineering-writing_simple_pytests.pdf
Binary file not shown.
Binary file modified
BIN
+25.9 KB
(160%)
_downloads/61d4c36d3448dfe36e736b034ea41645/pandas-functional.pdf
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
_downloads/625f517e924ac315b36bcb80e89f8e0b/python_basics-comprehensions.pdf
Binary file not shown.
Binary file modified
BIN
+43.7 KB
(180%)
_downloads/632263fe7c244d00de46295397df23b0/pandas-rules.pdf
Binary file not shown.
Binary file modified
BIN
+11 Bytes
(100%)
_downloads/6af7b7987d7b9db774a5e6a322d671a5/git-introduction.pdf
Binary file not shown.
Binary file modified
BIN
-3 Bytes
(100%)
_downloads/6c9fa5aa9026570c8af4b5a275fcd3b3/python_basics-lists_tuples_sets.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
_downloads/7074395418673116e11fdceabd3f837c/texts-markdown_applications.pdf
Binary file not shown.
Binary file modified
BIN
+16 Bytes
(100%)
_downloads/71ec56bb1ce9431f6f20f7422348253a/background-graphs.pdf
Binary file not shown.
Binary file modified
BIN
+32 KB
(120%)
_downloads/797a90c46f861a8856f79d051a71ab66/pandas-merging.pdf
Binary file not shown.
Binary file modified
BIN
-13.6 KB
(94%)
_downloads/7c891eb5cbacd6d67972dc6ab799bfdf/pandas-inspecting_and_summarizing.pdf
Binary file not shown.
Binary file modified
BIN
-33.5 KB
(61%)
_downloads/7ceda313aad825479ec338239f6bf7b4/software_engineering-what_and_how_to_test.pdf
Binary file not shown.
Binary file modified
BIN
+23.2 KB
(110%)
_downloads/83be5425c95a0fd95b0bf3cc42d1e254/git-pre_commits.pdf
Binary file not shown.
Binary file modified
BIN
-76.4 KB
(60%)
_downloads/87f911a13823128cf33089e3b16a1f6d/projects-writing_pytasks_multiple_outputs.pdf
Binary file not shown.
Binary file modified
BIN
-30.5 KB
(64%)
_downloads/8a24a95cdb3635530ee80fa72d9e598e/python_basics-functions_principles.pdf
Binary file not shown.
Binary file modified
BIN
+32.5 KB
(130%)
_downloads/8c5c2ab8274b50eb811e7e2fa2464bb9/python_basics-assignment_and_scalar_types.pdf
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
_downloads/8d1c67ebba4b5b88ead060edaa601c5e/tools-unix_navigation.pdf
Binary file not shown.
Binary file modified
BIN
+46 Bytes
(100%)
_downloads/910cbca26824838bbd0d41e3e23aa708/python_basics-tracebacks.pdf
Binary file not shown.
27 changes: 27 additions & 0 deletions
27
_downloads/932540eb00d93aa8e7b88a388b3b61b1/environment.yml
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,27 @@ | ||
--- | ||
name: epp | ||
channels: [conda-forge, nodefaults] | ||
dependencies: | ||
- estimagic | ||
- nlopt | ||
- jupyter | ||
- matplotlib | ||
- numba | ||
- numpy | ||
- openpyxl | ||
- pandas >= 2.1 | ||
- pip | ||
- plotly | ||
- pre-commit | ||
- pyarrow >= 13.0 | ||
- pytask >= 0.4 | ||
- pytest | ||
- python==3.11 | ||
- scikit-learn | ||
- scipy | ||
- seaborn | ||
- statsmodels | ||
- toml | ||
- line_profiler | ||
- snakeviz | ||
- pip: [kaleido, pdbp] |
Binary file modified
BIN
-11 Bytes
(100%)
_downloads/9bbb01d4edb43a1a5e74132d956c2c92/python_basics-dicts.pdf
Binary file not shown.
Binary file added
BIN
+602 KB
...aa53c6a9367318583e7ba9e06a07/python_installation_execution-executing_notebook_browser.pdf
Binary file not shown.
Binary file modified
BIN
+4.19 KB
(100%)
_downloads/a5cd74a273b58b2a37c0fb61b0829873/pandas-datatypes.pdf
Binary file not shown.
Binary file modified
BIN
+26.1 KB
(110%)
_downloads/a8b235424fc9457bc5ffeef13bceb310/projects-what_does_pytask_do.pdf
Binary file not shown.
Binary file modified
BIN
-4 Bytes
(100%)
_downloads/acd681a25c563b33ae9783852ff1c297/pandas-creating_variables.pdf
Binary file not shown.
Binary file modified
BIN
+13 Bytes
(100%)
_downloads/b91e063a3f0a95945309232042458e89/software_engineering-style_guides.pdf
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
_downloads/bd9a2c40c03c40c252c2c72482d5a9b7/texts-markup_languages.pdf
Binary file not shown.
Binary file modified
BIN
-33.5 KB
(75%)
_downloads/cb575c6779071de1750436c36c0f21ab/pandas-selection.pdf
Binary file not shown.
Binary file modified
BIN
-8 Bytes
(100%)
_downloads/d23b6c04dfb5250081c1cce2563ac857/texts-markdown_syntax.pdf
Binary file not shown.
Binary file modified
BIN
+8 Bytes
(100%)
_downloads/d6de29a86718ccdca654d77a04d7803d/software_engineering-pytest_error_handling.pdf
Binary file not shown.
Binary file modified
BIN
+33.8 KB
(140%)
_downloads/da85e84f301287521c06ec8bfc78669c/python_basics-if_conditions.pdf
Binary file not shown.
Binary file modified
BIN
+38 Bytes
(100%)
_downloads/db875671b2c61c4fcbdba6f89f5ad948/pandas-columns_and_indices.pdf
Binary file not shown.
Binary file modified
BIN
-38 KB
(70%)
_downloads/e447272ecd78c885703278ae78499cac/python_basics-for_loops.pdf
Binary file not shown.
Binary file modified
BIN
-1 Byte
(100%)
_downloads/e459ceaf2fecdc2d90a41479eb777989/projects-what_are_templates.pdf
Binary file not shown.
Binary file added
BIN
+198 KB
...loads/e4bba0bad5b8b364b84a1dff5a090cd8/python_installation_execution-executing_pytask.pdf
Binary file not shown.
Binary file added
BIN
+160 KB
...loads/e57f785da689e76e22de44c7e95d151d/python_installation_execution-executing_pytest.pdf
Binary file not shown.
Binary file modified
BIN
+16 Bytes
(100%)
_downloads/eb76c8cf78f480f510d8e685f897a080/pandas-dataframes_and_series.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
_downloads/f35c8681367644c9662366746a03df79/software_engineering-naming.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
# Content and Learning Objectives | ||
|
||
The topics in this chapter ... | ||
|
||
After working through this chapter, you should be able to: | ||
|
||
- ... |
38 changes: 38 additions & 0 deletions
38
_sources/python_installation_execution/executing_notebook_browser/objectives_materials.ipynb
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,38 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Executing notebooks in a browser\n", | ||
"\n", | ||
"## Learning Objectives\n", | ||
"\n", | ||
"After working through this topic, you should be able to:\n", | ||
"\n", | ||
"- Activate a conda environment in your shell\n", | ||
"- Start jupyter notebooks in your browser from the shell\n", | ||
"\n", | ||
"## Materials\n", | ||
"\n", | ||
"Here is the [screencast](https://player.uni-bonn.educast.nrw/4881691a-00c3-4a83-9fc9-deffac2dcf72) and these are the\n", | ||
"[slides](python_installation_execution-executing_notebook_browser.pdf).\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
39 changes: 39 additions & 0 deletions
39
_sources/python_installation_execution/executing_notebook_vscode/objectives_materials.ipynb
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,39 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Executing jupyter notebooks in VS Code\n", | ||
"\n", | ||
"## Learning Objectives\n", | ||
"\n", | ||
"After working through this topic, you should be able to:\n", | ||
"\n", | ||
"- Select different jupyter kernels in VS Code\n", | ||
"- Run jupyter notebooks in VS Code\n", | ||
"\n", | ||
"## Materials\n", | ||
"\n", | ||
"Here is the\n", | ||
"[screencast](https://player.uni-bonn.educast.nrw/3988cf3c-9382-481f-98ac-fe14b91fb8f1)\n", | ||
"and these are the [slides](python_installation_execution-executing_notebook_vscode.pdf)." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
95 changes: 95 additions & 0 deletions
95
_sources/python_installation_execution/executing_py_shell/objectives_materials.ipynb
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,95 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Executing `.py` files from the shell\n", | ||
"\n", | ||
"## Learning Objectives\n", | ||
"\n", | ||
"After working through this topic, you should be able to:\n", | ||
"\n", | ||
"- Activate a conda environment in your shell\n", | ||
"- Execute python files from your shell\n", | ||
"\n", | ||
"## Materials\n", | ||
"\n", | ||
"We assume that you have already watched the screencasts on installation and have a \n", | ||
"fully working conda installation on your computer. \n", | ||
"\n", | ||
"We also assume that you have watched the screencasts on the shell and know how to \n", | ||
"navigate to directories in a shell. \n", | ||
"\n", | ||
"Here is the\n", | ||
"[screencast](https://player.uni-bonn.educast.nrw/fdb5d582-02db-4ccb-818a-d415de3bef61)\n", | ||
"and these are the [slides](python_installation_execution-executing_py_shell.pdf).\n", | ||
"\n", | ||
"## Quiz" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from jupyterquiz import display_quiz\n", | ||
"\n", | ||
"content = [\n", | ||
" {\n", | ||
" \"question\": (\n", | ||
" \"Your project's folder contains the following files: exercise_1.py, \\\n", | ||
" a folder called data, and a folder called results. Your shell is currently \\\n", | ||
" in the data folder. Which of the following commands would you use to run \\\n", | ||
" the exercise_1.py script?\"\n", | ||
" ),\n", | ||
" \"type\": \"many_choice\",\n", | ||
" \"answers\": [\n", | ||
" {\n", | ||
" \"answer\": \"'python exercise_1.py'\",\n", | ||
" \"correct\": False,\n", | ||
" \"feedback\": \"This would work if you were in the folder containing \\\n", | ||
" exercise_1.py.\",\n", | ||
" },\n", | ||
" {\n", | ||
" \"answer\": \"'python ../exercise_1.py'\",\n", | ||
" \"correct\": True,\n", | ||
" \"feedback\": \"This works because ../ moves you up one folder, \\\n", | ||
" and then you can run the script from there.\",\n", | ||
" },\n", | ||
" {\n", | ||
" \"answer\": \"'python ~/exercise_1.py'\",\n", | ||
" \"correct\": False,\n", | ||
" \"feedback\": \"This would work if you were in your home folder (on a \\\n", | ||
" Mac system).\",\n", | ||
" },\n", | ||
" {\n", | ||
" \"answer\": \"'cd ..' and then 'python exercise_1.py'\",\n", | ||
" \"correct\": True,\n", | ||
" \"feedback\": \"This works because cd .. moves you up one folder, \\\n", | ||
" and then you can run the script from there.\",\n", | ||
" },\n", | ||
" ],\n", | ||
" },\n", | ||
"]\n", | ||
"display_quiz(content, colors=\"fdsp\")" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
39 changes: 39 additions & 0 deletions
39
_sources/python_installation_execution/executing_py_vscode/objectives_materials.ipynb
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,39 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Executing `.py` files in VS Code\n", | ||
"\n", | ||
"## Learning Objectives\n", | ||
"\n", | ||
"After working through this topic, you should be able to:\n", | ||
"\n", | ||
"- Select different python interpreters in VS Code\n", | ||
"- Run python files in VS Code\n", | ||
"\n", | ||
"## Materials\n", | ||
"\n", | ||
"Here is the\n", | ||
"[screencast](https://player.uni-bonn.educast.nrw/527c21d3-ef88-4e70-a62d-a2261436203f)\n", | ||
"and these are the [slides](python_installation_execution-executing_py_vscode.pdf).\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
73 changes: 73 additions & 0 deletions
73
_sources/python_installation_execution/executing_pytask/objectives_materials.ipynb
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,73 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Running Python code via pytask\n", | ||
"\n", | ||
"## Learning Objectives\n", | ||
"\n", | ||
"After working through this topic, you should be able to:\n", | ||
"\n", | ||
"- Execute a reproducible project using pytask\n", | ||
"- Activate the correct environment for using pytask\n", | ||
"\n", | ||
"## Materials\n", | ||
"\n", | ||
"Here is the \n", | ||
"[screencast](https://player.uni-bonn.educast.nrw/993ed1d4-7f3f-45ef-bf1b-664f794490c2) \n", | ||
"and these are the [slides](python_installation_execution-executing_pytask.pdf).\n", | ||
"\n", | ||
"## Additional Materials\n", | ||
"\n", | ||
"- The pytask [command line interface](https://pytask-dev.readthedocs.io/en/stable/reference_guides/command_line_interface.html)\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"tags": [ | ||
"remove-input" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from epp_topics.quiz_utilities import display_quiz\n", | ||
"\n", | ||
"content = {\n", | ||
" \"In contrast to other ways of executing Python code\": {\n", | ||
" \"Pytask runs multiple .py files at once\": False,\n", | ||
" \"Pytask runs functions instead of entire `.py` files\": True,\n", | ||
" \"Pytask works for notebooks and `.py` files\": False,\n", | ||
" \"Pytasks automatically install all dependencies for you\": False,\n", | ||
" },\n", | ||
" \"Which of the following is true?\": {\n", | ||
" \"Pytask saves runtime by executing only tasks that need to be executed\": True,\n", | ||
" \"Pytask only works if you define functions\": True,\n", | ||
" \"If you use pytask, you don't need git\": False,\n", | ||
" \"Pytask requires a very specific directory structure\": False,\n", | ||
" },\n", | ||
"}\n", | ||
"\n", | ||
"display_quiz(content)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
73 changes: 73 additions & 0 deletions
73
_sources/python_installation_execution/executing_pytest/objectives_materials.ipynb
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,73 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Running Python code via pytest\n", | ||
"\n", | ||
"## Learning Objectives\n", | ||
"\n", | ||
"After working through this topic, you should be able to:\n", | ||
"\n", | ||
"- Execute all tests in a project using pytest\n", | ||
"- Activate the correct environment for using pytest\n", | ||
"\n", | ||
"## Materials\n", | ||
"\n", | ||
"Here is the \n", | ||
"[screencast](https://player.uni-bonn.educast.nrw/31bef7c1-79cf-4281-98a8-3187d0ea9bdc) \n", | ||
"and these are the [slides](python_installation_execution-executing_pytest.pdf).\n", | ||
"\n", | ||
"## Additional Materials\n", | ||
"\n", | ||
"- The pytest \n", | ||
" [command line interface](https://docs.pytest.org/en/stable/how-to/usage.html)\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"tags": [ | ||
"remove-input" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from epp_topics.quiz_utilities import display_quiz\n", | ||
"\n", | ||
"content = {\n", | ||
" \"In contrast to other ways of executing Python code\": {\n", | ||
" \"Pytest runs multiple .py files at once\": False,\n", | ||
" \"Pytest runs functions instead of entire `.py` files\": True,\n", | ||
" \"Pytest works for notebooks and `.py` files\": False,\n", | ||
" \"Pytests automatically install all dependencies for you\": False,\n", | ||
" },\n", | ||
" # \"Which of the following is true?\": {\n", | ||
" # \"Pytest only works if you define functions\": True,\n", | ||
" # \"If you use pytest, you don't need git\": False,\n", | ||
" # \"Pytest requires a very specific directory structure\": False,\n", | ||
" # },\n", | ||
"}\n", | ||
"\n", | ||
"display_quiz(content)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Oops, something went wrong.