dmytromishkin commited on
Commit
fca5c51
·
unverified ·
1 Parent(s): 8aa440a

fully move to toml

Browse files
Files changed (3) hide show
  1. hoho2025/hoho.py +12 -6
  2. pyproject.toml +1 -1
  3. requirements.txt +0 -15
hoho2025/hoho.py CHANGED
@@ -114,12 +114,18 @@ def importt(module_name, as_name=None):
114
 
115
 
116
  def prepare_submission():
117
- # Download packages from requirements.txt
118
- if Path('requirements.txt').exists():
119
- print('downloading packages from requirements.txt')
120
- Path('packages').mkdir(exist_ok=True)
121
- with open('requirements.txt') as f:
122
- packages = f.readlines()
 
 
 
 
 
 
123
  for p in packages:
124
  download_package(p.strip())
125
 
 
114
 
115
 
116
  def prepare_submission():
117
+ # Read dependencies from pyproject.toml and download them for offline submission.
118
+ import tomllib
119
+ pyproject = Path(__file__).parent.parent / 'pyproject.toml'
120
+ if not pyproject.exists():
121
+ print('pyproject.toml not found; skipping package download.')
122
+ else:
123
+ with open(pyproject, 'rb') as f:
124
+ data = tomllib.load(f)
125
+ packages = data.get('project', {}).get('dependencies', [])
126
+ if packages:
127
+ print('downloading packages from pyproject.toml')
128
+ Path('packages').mkdir(exist_ok=True)
129
  for p in packages:
130
  download_package(p.strip())
131
 
pyproject.toml CHANGED
@@ -21,7 +21,7 @@ dependencies = [
21
  "opencv-python",
22
  "Pillow",
23
  "plotly",
24
- "pycolmap>=0.6",
25
  "scipy",
26
  "torch",
27
  "trimesh",
 
21
  "opencv-python",
22
  "Pillow",
23
  "plotly",
24
+ "pycolmap>=3.13",
25
  "scipy",
26
  "torch",
27
  "trimesh",
requirements.txt DELETED
@@ -1,15 +0,0 @@
1
- # Python >= 3.10 required (see setup.py)
2
- datasets
3
- huggingface-hub
4
- ipywidgets
5
- matplotlib
6
- numpy
7
- opencv-python
8
- Pillow
9
- plotly
10
- pycolmap>=0.6
11
- scipy
12
- torch
13
- trimesh
14
- webdataset
15
- manifold3d # for metric computation