Commit 9f22622
authored
Refactor repo structure and move package management to uv (#38)
# Refactor repo structure and move package management to uv
## ♻️ Current situation & Problem
This PR restructures the repository for better organization and
modernizes the package management by migrating from `requirements.txt`
to `uv` (a fast Python package installer and resolver). This addresses:
- **Organization**: Improved project structure with proper separation of
concerns
- **Package Management**: Migration to `uv` for faster, more reliable
dependency resolution
- **Maintainability**: Cleaner project layout that aligns with Python
best practices
- **Submodule Cleanup**: Removal of unused submodule dependencies
Resolves the ongoing effort to improve project organization and
developer experience.
## ⚙️ Release Notes
### Features
- **Package Management Migration**: Migrated from `requirements.txt` to
`pyproject.toml` with `uv.lock` for reproducible builds
- Faster dependency resolution with `uv`
- Better lock file management for reproducible environments
- Centralized project metadata in `pyproject.toml`
- **Repository Structure Improvements**:
- Moved root-level utility scripts to `scripts/` directory for better
organization
- Converted `.gitignore` files to `.gitkeep` in empty directories
(`data/`, `notebooks/`)
- Removed unused `.gitmodules` and submodule references
- Updated `.python-version` to specify Python 3.12
- **Updated Documentation**: README now reflects the new structure and
package management approach
### Migration Guide for Users
If you were previously using `requirements.txt`:
**Before:**
```bash
pip install -r requirements.txt
```
**After:**
```bash
uv sync
```
## 📚 Documentation
The project now uses `pyproject.toml` as the single source of truth for
project metadata and dependencies. Key sections include:
- **Project Metadata**: Name, version, description, authors, keywords,
and classifiers
- **Dependencies**: All runtime and optional development dependencies
are clearly specified
- **Python Requirements**: Requires Python >= 3.12
For detailed project information, see `README.md` and the inline
documentation in `pyproject.toml`.
The repository structure has been improved:
```
opentslm/
├── src/ # Source code
├── test/ # Test suite
├── scripts/ # Utility scripts
├── demo/ # Demo notebooks and examples
├── evaluation/ # Evaluation tools and scripts
├── data/ # Data storage
└── notebooks/ # Jupyter notebooks
```
## ✅ Testing
This PR maintains full backward compatibility with existing tests. No
new test files were added as this is primarily a structural and tooling
refactoring:
- All existing tests remain in the `test/` directory
- Import paths in model files were updated to reflect organizational
changes
- Development environment can be tested using `uv sync` followed by test
execution
Manual testing steps:
1. Clone/update the repository
2. Run `uv sync` to install all dependencies
3. Verify scripts in `scripts/` directory are executable and functional
4. Run the existing test suite to ensure no regressions
### Code of Conduct & Contributing Guidelines
By creating and submitting this pull request, you agree to follow our
[Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
---------
Signed-off-by: masquare <masquare@users.noreply.github.com>1 parent 7a0d412 commit 9f22622
File tree
182 files changed
+4700
-1008
lines changed- .github/workflows
- .reuse/templates
- assets
- data
- demo/huggingface
- evaluation
- baseline
- clinician_eval
- clinicianecg
- pipeline
- memory
- opentslm
- ecg_qa_cot
- sleep
- tsqa
- scripts
- src
- model/projector
- opentslm
- model
- encoder
- llm
- projector
- prompt
- time_series_datasets
- ecg_qa
- har_cot
- m4
- monash
- pamap2
- simulation
- sleep
- ucr
- prompt
- time_series_datasets
- ecg_qa
- har_cot
- monash
- pamap2
- sleep
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
182 files changed
+4700
-1008
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
44 | 37 | | |
45 | 38 | | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
51 | | - | |
| 44 | + | |
52 | 45 | | |
53 | 46 | | |
54 | | - | |
| 47 | + | |
55 | 48 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
59 | 52 | | |
60 | 53 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
64 | 57 | | |
65 | 58 | | |
66 | 59 | | |
| |||
87 | 80 | | |
88 | 81 | | |
89 | 82 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
97 | 86 | | |
98 | | - | |
| 87 | + | |
99 | 88 | | |
100 | 89 | | |
101 | 90 | | |
| |||
104 | 93 | | |
105 | 94 | | |
106 | 95 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
113 | 102 | | |
114 | 103 | | |
115 | 104 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| |||
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
172 | 180 | | |
173 | 181 | | |
174 | 182 | | |
| |||
229 | 237 | | |
230 | 238 | | |
231 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
232 | 258 | | |
233 | 259 | | |
234 | 260 | | |
| |||
335 | 361 | | |
336 | 362 | | |
337 | 363 | | |
338 | | - | |
| 364 | + | |
339 | 365 | | |
340 | 366 | | |
341 | 367 | | |
342 | 368 | | |
343 | 369 | | |
344 | | - | |
345 | 370 | | |
| 371 | + | |
346 | 372 | | |
347 | | - | |
| 373 | + | |
348 | 374 | | |
349 | 375 | | |
350 | 376 | | |
| 377 | + | |
| 378 | + | |
351 | 379 | | |
352 | | - | |
353 | | - | |
354 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
355 | 383 | | |
356 | 384 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
0 commit comments