Skip to content

Commit

Permalink
Update packaging (#183)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
mahdilamb and pre-commit-ci[bot] authored May 9, 2024
1 parent ad333cc commit e565105
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 71 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
# brew_install: "proj geos librttopo"
os_list: '["ubuntu-latest"]'
python-version: "['3.10', '3.11']"
extra_commands: "pip3 install -e '.[all]'"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Some slightly more structured notes on deliberate experiments we have performed
```bash
git clone https://github.com/openclimatefix/PVNet.git
cd PVNet
pip install -r requirements.txt
pip install .
```

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

```bash
pip install -r requirements-dev.txt
pip install ".[dev]"
```


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

```bash
pip install -r requirements.txt -r requirements-dev.txt
pip install ".[dev]"
```

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.
Expand Down
60 changes: 60 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
[project]
name="PVNet"
description = "PVNet"
authors = [{name="Peter Dudfield", email="[email protected]"}]
dynamic = ["version", "readme"]
license={file="LICENCE"}

dependencies = [
"ocf_datapipes>=3.3.6",
"ocf_ml_metrics>=0.0.11",
"numpy",
"pandas",
"matplotlib",
"xarray",
"ipykernel",
"h5netcdf",
"torch>=2.0.0",
"lightning>=2.0.1",
"torchvision",
"pytest",
"pytest-cov",
"typer",
"sqlalchemy",
"fsspec[s3]",
"wandb",
"huggingface-hub",
"tensorboard",
"tqdm",
"omegaconf",
"hydra-core",
"python-dotenv",
"hydra-optuna-sweeper",
"rich",
"gcsfs",# gcsfs is only needed when getting data from Google Cloud Storage
]

[tool.setuptools.dynamic]
version = {attr = "pvnet.__version__"}
readme = {file = "README.md"}

[tool.setuptools.package-dir]
"PVNet" = "pvnet"

[project.optional-dependencies]
dev=[
"pvlive-api @ git+https://github.com/SheffieldSolar/PV_Live-API",
"black",
"flake8",
"isort",
"mypy",
"pre-commit",
"pytest",
"pytest-cov",
]
all_models=[
"pytorch-tabnet",
"efficientnet_pytorch"
]
all=["PVNet[dev,all_models]"]

[tool.mypy]
exclude = [
"^tests/",
Expand Down
8 changes: 0 additions & 8 deletions requirements-dev.txt

This file was deleted.

27 changes: 0 additions & 27 deletions requirements.txt

This file was deleted.

33 changes: 0 additions & 33 deletions setup.py

This file was deleted.

0 comments on commit e565105

Please sign in to comment.