Skip to content

Commit 557cf05

Browse files
committed
Updated README
1 parent 6a5702d commit 557cf05

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

README.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ breast-cancer-ops/
5151
├── pyproject.toml # Project metadata and dependencies (managed by uv)
5252
├── pytest.ini # pytest configuration
5353
├── README.md # Project documentation
54+
├── requirements.txt # Project dependencies (generated by uv for pip compatibility)
5455
└── uv.lock # Locked dependency versions (generated by uv for reproducibility)
5556
```
5657

5758
## Setup
5859

59-
Follow these steps to set up the project environment and install dependencies using `uv`.
60+
Follow these steps to set up the project environment and install dependencies. This project uses `uv` for dependency management, and can also generate a `requirements.txt` file for compatibility with standard `pip` workflows.
6061

61-
### Using `uv` (Recommended for faster setup)
62+
### Using `uv` (Recommended for faster setup and reproducibility)
6263

6364
`uv` is a fast Python package installer and virtual environment manager written in Rust.
6465

@@ -73,24 +74,48 @@ Follow these steps to set up the project environment and install dependencies us
7374
python -m pip install uv
7475
```
7576
76-
3. **Initialize the project and create/activate virtual environment:**
77+
3. **Create and activate virtual environment:**
7778
```bash
78-
uv init
79+
uv venv
7980
# Then activate the environment. On Windows PowerShell:
8081
.\.venv\Scripts\Activate.ps1
8182
# On Linux/macOS:
8283
source .venv/bin/activate
8384
```
8485
8586
4. **Install dependencies:**
86-
`uv` will install dependencies defined in `pyproject.toml`.
87+
`uv` will install dependencies defined in `pyproject.toml` and `uv.lock`.
8788
```bash
8889
uv install
8990
```
9091
92+
### Using `pip` (Alternative method)
93+
94+
If you prefer to use standard `pip` for dependency management, you can do so by first generating `requirements.txt` with `uv`.
95+
96+
1. **Generate `requirements.txt`:**
97+
The `requirements.txt` file is generated from `pyproject.toml` using `uv`.
98+
```bash
99+
uv pip compile pyproject.toml -o requirements.txt
100+
```
101+
102+
2. **Create and activate a virtual environment (using `python -m venv` or `conda`):**
103+
```bash
104+
python -m venv .venv
105+
# Then activate the environment. On Windows PowerShell:
106+
.\.venv\Scripts\Activate.ps1
107+
# On Linux/macOS:
108+
source .venv/bin/activate
109+
```
110+
111+
3. **Install dependencies using `pip`:**
112+
```bash
113+
pip install -r requirements.txt
114+
```
115+
91116
## Running tests
92117
93-
Once the environment is set up and dependencies are installed using `uv`, you can run the tests:
118+
Once the environment is set up and dependencies are installed, you can run the tests:
94119
95120
1. **Run all tests:**
96121
Ensure your virtual environment is activated. Then, from the project root directory, run:

0 commit comments

Comments
 (0)