Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:

- name: Build the JupyterLite site
run: |
cp README.md content
jupyter lite build --contents content --output-dir dist

- name: Upload artifact
Expand All @@ -64,4 +63,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
65 changes: 21 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,41 @@
# Learning to programme with python
![Course logo](images/ARC448p.png)

Welcome to the Course "Learning to programme with python" repository! This repository contains all the materials and resources for the course.
# Course: Learning to programme with python

## Organization

The repository is organized as follows:

- `Basic.ipynb`: The course's jupyter notebook with the corresponding materials.

- `Basic_filled.ipynb`: The course's jupyter notebook with all the material filled in. It is meant for reference purposes for teaching the course and as a fallback if something is missing from the notes students made during the course.

- `pull_files_from_repo.py`: download script that can be executed to extract this repository into a folder.

## Getting Started as student
If you want to set up a new conda environment for the course you can use the environment.yml provided in this folder.
Welcome to the Learning to programme with python repository! This repository contains all the materials and resources for the course.

There are three possibilities to get the data:
## Course description

1. You only want to follow along. Just download and copy the Basics.ipynb to your environment
If you've never written a line of code but suspect programming might benefit your research, this course provides a gentle introduction through Python. Designed for complete beginners, we'll cover fundamental programming concepts, ensuring everyone builds solid foundations regardless of technical background.
The course takes a hands-on approach using Jupyter notebooks to explore essential programming elements: basic data types (strings, integers, floats, booleans), variables, operators, and control flow statements including if-statements and loops. You'll learn to write functions, handle user input, read and write files, and work with data structures like lists.
By the end, you'll understand how basic computer programs work, how to structure code effectively, and where to find resources for continued learning. There will be plenty of opportunities to experiment and ask questions throughout. No prior experience required, just curiosity about what programming can do.

2. To get everything (including the filled notebook)

a. Download the `pull_files_from_repo.py` file and put it into your environment

b. Execute `python pull_files_from_repo.py` in the folder.

3. If you have git available you can just clone the repo with:

`git clone https://github.com/DurhamARC-Training/BasicProgrammingPython.git`
## Organization

## Getting Started for Teaching
The repository is organized as follows:

To get started with teaching the course, follow these steps:
- `Basics.ipynb`: This file contains the course material we will be using during the course

1. Install the requirements including JupyterLab Deck by running the following command:
- `Basics_filled.ipynb`: This file contains the completed course material, the solutions to the exercises and the speaker notes. It is meant for reference purposes for teaching the course and as a fallback if something is missing from the notes students made during teaching.

```
conda env create -f environment.yml
```

2. Launch JupyterLab by running the following command:
## Accessing the Materials

```
conda activate basic_python
jupyter lab
```
For this course we are using [JupyterLite](https://jupyterlite.readthedocs.io/en/stable/), which is a tool that allows us to launch [JupyterLab](https://jupyterlab.readthedocs.io/en/latest/) and run our Python code in the web browser through the notebook (.ipynb) files contained in this repository.

3. Use the `Basics.ipynb` for the presentations and exercises to use during the course. If needed use the notebooks use the `Basics_filled.ipynb` as lecture notes
To access and run the course materials, start by:

4. Click on the little card styles JupyterLab-Deck icon for running a notebook as a presentation.
* Navigating to the course materials on our GitHub page: [https://durhamarc-training.github.io/BasicProgrammingPython/](https://durhamarc-training.github.io/BasicProgrammingPython/)

5. It is also possible to convert the Jupyter notebook to PDF (be sure first to run all cells you want to run and save):
* Start by accessing `Basics.ipynb` notebook.

* Call `jupyter nbconvert --to slides --post serve .\Basics.ipynb`
* Go to http://localhost:8000/Basics.slides.html?print-pdf#/
* Print via Print to PDF function of your browser
You are now ready to start the course!

NOTE: The first time you run your code/load new modules, there may be a small wait while the module(s) are loaded.

## How to contribute
## Contributing

If you find any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request. Contributions are welcome!

If you're a co-developer of our training course, please read the workflow we suggest in our [Developer's Guide](development.md).
You can add the files of the `common-tools` github submodule by typing in `git submodule update --init`. Consult the README in the then filled `common-tools` directory for further instructions.
In general you should never edit the content in the `Basics.ipynb` but work on `Basics_filled.ipynb` and have the tool generate the student notebook versions automatically as described in the `common-tools` README.
2 changes: 1 addition & 1 deletion common-tools
Binary file added images/ARC448p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion notebook_settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"source_path": "Basics_full.ipynb",
"source_path": "Basics_filled.ipynb",
"target_path": "Basics.ipynb",
"verbose": false,
"additional_args": ""
Expand Down