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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
06-instructors/find_duplicate_packages.sh
__pycache__/
.ipynb_checkpoints
tmp/
tmp/
uv.lock
lcr-env
.venv
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The technical facilitator will introduce the concepts through a collaborative li
* Participants are encouraged to ask questions and collaborate with others to enhance learning.
* Participants must have a computer and an internet connection to participate in online activities.
* Participants must not use generative AI such as ChatGPT to generate code to complete assignments. It should be used as a supportive tool to seek out answers to questions you may have.
* We expect participants to have completed the steps in the [onboarding repo](https://github.com/UofT-DSI/Onboarding/tree/tech-onboarding-docs).
* We expect participants to have completed the steps in the [onboarding repo](https://github.com/UofT-DSI/onboarding/blob/main/environment_setup/README.md).
* We encourage participants to default to having their camera on at all times and turning the camera off only as needed. This will greatly enhance the learning experience for all participants and provides real-time feedback for the instructional team.

## Resources
Expand Down Expand Up @@ -127,6 +127,8 @@ Alternative Textbook: [Data Science: A First Introduction](https://python.datasc
├── 03_instructional_team
├── 04_this_cohort
├── LICENSE
├── SETUP.md
├── pyproject.toml
└── README.md
```

Expand All @@ -137,5 +139,7 @@ Alternative Textbook: [Data Science: A First Introduction](https://python.datasc
* **this_cohort**: Additional materials and resources for this cohort.
* **.gitignore**: Files to exclude from this folder, specified by the Technical Facilitator
* **LICENSE**: The license for this repository.
* **SETUP.md**: Contains the steps required to set up this repo for the module.
* **pyproject.toml**: Tells Python which packages this repo needs to run.
* **README.md**: This file.

67 changes: 67 additions & 0 deletions SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Setup
## Environment Setup Guide
Before using this repo, make sure you’ve completed the [environment setup guide](https://github.com/UofT-DSI/onboarding/blob/main/environment_setup/README.md), which installs the core tools you’ll need for this module, such as:

- Git
- Git Bash (for Windows)
- Visual Studio Code
- UV

## Necessary Packages
The "Linear regression, classification, and resampling" module uses its own isolated environment called `lcr-env` so that packages don’t conflict with other projects.
We use UV to create this environment, activate it, and install the required packages listed in the module’s `pyproject.toml`.
This setup only needs to be done **once per module**, after that, you just activate the environment whenever you want to work in this repo.


Open a terminal (macOS/Linux) or Git Bash (Windows) in this repo, and run the following commands in order:

1. Create a virtual environment called `lcr-env`:
```
uv venv lcr-env --python 3.11
```

2. Activate the environment:
- for macOS/Linux:
```
source lcr-env/bin/activate
```

- for windows (git bash):
```
source lcr-env/Scripts/activate
```

3. Install all required packages from the [pyproject.toml](./pyproject.toml)
```bash
uv sync --active
```

## Environment Usage
In order to run any code in this repo, you must first activate its environment.
- for macOS/Linux:
```
source lcr-env/bin/activate
```

- for windows (git bash):
```
source lcr-env/Scripts/activate
```

When the environment is active, your terminal prompt will change to show:
```
(lcr-env) $
```
This is your **visual cue** that you’re working inside the right environment.

When you’re finished, you can deactivate it with:
```bash
deactivate
```

> **👉 Remember**
> Only one environment can be active at a time. If you switch to a different repo, first deactivate this one (or just close the terminal) and then activate the new repo’s environment.

---

For questions or issues, please contact the "Linear regression, classification, and resampling" Module learning support team or email [email protected].
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[project]
name = "lcr-env"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"ipykernel>=6.30.1",
"kaleido>=1.1.0",
"matplotlib>=3.10.6",
"numpy>=2.3.3",
"pandas>=2.3.2",
"plotly>=6.3.0",
"requests>=2.32.5",
"scikit-learn>=1.7.2",
"seaborn>=0.13.2",
"statsmodels>=0.14.5",
]
Loading