Skip to content

Commit e565105

Browse files
Update packaging (#183)
* Update packaging * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * hack install * Update test.yml * quotes * Update test.yml quotes * Update test.yml all --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ad333cc commit e565105

File tree

6 files changed

+64
-71
lines changed

6 files changed

+64
-71
lines changed

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ jobs:
1919
# brew_install: "proj geos librttopo"
2020
os_list: '["ubuntu-latest"]'
2121
python-version: "['3.10', '3.11']"
22+
extra_commands: "pip3 install -e '.[all]'"

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Some slightly more structured notes on deliberate experiments we have performed
3131
```bash
3232
git clone https://github.com/openclimatefix/PVNet.git
3333
cd PVNet
34-
pip install -r requirements.txt
34+
pip install .
3535
```
3636

3737
The commit history is extensive. To save download time, use a depth of 1:
@@ -49,7 +49,7 @@ pip install -e .
4949
### Additional development dependencies
5050

5151
```bash
52-
pip install -r requirements-dev.txt
52+
pip install ".[dev]"
5353
```
5454

5555

@@ -101,7 +101,7 @@ conda create -n ocf_datapipes python=3.10
101101
Then go inside the ocf_datapipes repo to add packages
102102

103103
```bash
104-
pip install -r requirements.txt -r requirements-dev.txt
104+
pip install ".[dev]"
105105
```
106106

107107
Then exit this environment, and enter back into the pvnet conda environment and install ocf_datapies in editable mode (-e). This means the package is directly linked to the source code in the ocf_datapies repo.

pyproject.toml

+60
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1+
[project]
2+
name="PVNet"
3+
description = "PVNet"
4+
authors = [{name="Peter Dudfield", email="[email protected]"}]
5+
dynamic = ["version", "readme"]
6+
license={file="LICENCE"}
7+
8+
dependencies = [
9+
"ocf_datapipes>=3.3.6",
10+
"ocf_ml_metrics>=0.0.11",
11+
"numpy",
12+
"pandas",
13+
"matplotlib",
14+
"xarray",
15+
"ipykernel",
16+
"h5netcdf",
17+
"torch>=2.0.0",
18+
"lightning>=2.0.1",
19+
"torchvision",
20+
"pytest",
21+
"pytest-cov",
22+
"typer",
23+
"sqlalchemy",
24+
"fsspec[s3]",
25+
"wandb",
26+
"huggingface-hub",
27+
"tensorboard",
28+
"tqdm",
29+
"omegaconf",
30+
"hydra-core",
31+
"python-dotenv",
32+
"hydra-optuna-sweeper",
33+
"rich",
34+
"gcsfs",# gcsfs is only needed when getting data from Google Cloud Storage
35+
]
36+
37+
[tool.setuptools.dynamic]
38+
version = {attr = "pvnet.__version__"}
39+
readme = {file = "README.md"}
40+
41+
[tool.setuptools.package-dir]
42+
"PVNet" = "pvnet"
43+
44+
[project.optional-dependencies]
45+
dev=[
46+
"pvlive-api @ git+https://github.com/SheffieldSolar/PV_Live-API",
47+
"black",
48+
"flake8",
49+
"isort",
50+
"mypy",
51+
"pre-commit",
52+
"pytest",
53+
"pytest-cov",
54+
]
55+
all_models=[
56+
"pytorch-tabnet",
57+
"efficientnet_pytorch"
58+
]
59+
all=["PVNet[dev,all_models]"]
60+
161
[tool.mypy]
262
exclude = [
363
"^tests/",

requirements-dev.txt

-8
This file was deleted.

requirements.txt

-27
This file was deleted.

setup.py

-33
This file was deleted.

0 commit comments

Comments
 (0)