You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-6Lines changed: 31 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,14 +51,15 @@ breast-cancer-ops/
51
51
├── pyproject.toml # Project metadata and dependencies (managed by uv)
52
52
├── pytest.ini # pytest configuration
53
53
├── README.md # Project documentation
54
+
├── requirements.txt # Project dependencies (generated by uv for pip compatibility)
54
55
└── uv.lock # Locked dependency versions (generated by uv for reproducibility)
55
56
```
56
57
57
58
## Setup
58
59
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.
60
61
61
-
### Using `uv` (Recommended for faster setup)
62
+
### Using `uv` (Recommended for faster setup and reproducibility)
62
63
63
64
`uv` is a fast Python package installer and virtual environment manager written in Rust.
64
65
@@ -73,24 +74,48 @@ Follow these steps to set up the project environment and install dependencies us
73
74
python -m pip install uv
74
75
```
75
76
76
-
3. **Initialize the project and create/activate virtual environment:**
77
+
3. **Create and activate virtual environment:**
77
78
```bash
78
-
uv init
79
+
uv venv
79
80
# Then activate the environment. On Windows PowerShell:
80
81
.\.venv\Scripts\Activate.ps1
81
82
# On Linux/macOS:
82
83
source .venv/bin/activate
83
84
```
84
85
85
86
4. **Install dependencies:**
86
-
`uv` will install dependencies defined in `pyproject.toml`.
87
+
`uv` will install dependencies defined in `pyproject.toml` and `uv.lock`.
87
88
```bash
88
89
uv install
89
90
```
90
91
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
+
91
116
## Running tests
92
117
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:
94
119
95
120
1. **Run all tests:**
96
121
Ensure your virtual environment is activated. Then, from the project root directory, run:
0 commit comments