Skip to content
Merged
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
66 changes: 52 additions & 14 deletions learners/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,78 @@
title: Setup
---

Setup instructions live in this document. Please specify the tools and the data
sets the Learner needs to have installed.
This is an intermediate level Python course.
We expect familiarity with the command-line, and that you are comfortable
working with a coding text editor (like for instance,
[VS Code](https://code.visualstudio.com/)).

## Data Sets
### Data Sets

Clone the repository at [esciencecenter-digital-skills/parallel-python-workshop](https://github.com/esciencecenter-digital-skills/parallel-python-workshop). Follow software setup instructions there to setup the environment, and run the unit tests to see if your setup is working.
The course uses the following data sets:

## Software Setup
- New York taxi data ([description](https://www.nyc.gov/site/tlc/about/tlc-trip-record-data.page)).

The instructions below include downloading the data.


## Software and Data Setup

Clone the repository at [esciencecenter-digital-skills/parallel-python-workshop](https://github.com/esciencecenter-digital-skills/parallel-python-workshop).

Follow software setup instructions there to set up the environment, download the data,
and run the unit tests to see if your setup is working.

::::::::::::::::::::::::::::::::::::::: discussion

### Details
This is an intermediate level Python course. We expect familiarity with the command-line, and that you are comfortable working with a coding text editor (like for instance, [VS Code](https://code.visualstudio.com/)). We provide two choices for working environment: **conda** or **poetry**. If you are on **Windows** the prefered method is **conda**. On Linux or MacOS you should be fine with either.
We provide two choices for working environment: **uv** or **conda**.
If you are on **Windows** the preferred method is **conda**. On Linux or
MacOS you should be fine with either.

:::::::::::::::::::::::::::::::::::::::::::::::::::

:::solution
### Conda
From within the cloned repository root directory, run the following commands to create a conda environment from the environment.yml file and activate it
### UV

UV is our recommended tool to manage the Python environment.
Please follow the [UV install instructions](https://docs.astral.sh/uv/#installation)
if you haven't already. Then, running from the directory where you cloned this
repository, run the following command:

```bash
$ conda env create -f environment.yml --prefix ./env
$ conda activate ./env
uv sync
```

Next, run pytest and see if it completes all tests without errors.
Then, download the New York taxi dataset:
```
uv run ny-taxi/download.py
```

```bash
$ pytest
Finally, run `pytest` and see if it completes all tests without errors.
```
uv run pytest
```

:::

:::solution
### Poetry
### Conda
From within the cloned repository root directory, run the following commands to create a `conda` environment from the environment.yml file and activate it
```bash
$ conda env create -f environment.yml
$ conda activate parallel-python
```

Now, download the New York taxi data set:
```bash
$ python ny-taxi/download.py
```

Finally, run `pytest` and see if it completes all tests without errors.

```bash
$ pytest
```

:::

Loading