Skip to content

Commit

Permalink
updates for PyPi upload
Browse files Browse the repository at this point in the history
  • Loading branch information
aclerc committed Jul 7, 2024
1 parent 78bd17a commit 36bac4e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,40 @@ A tool to assess yield uplift of wind turbines
[![TaskRunner: poethepoet](https://img.shields.io/badge/poethepoet-enabled-1abc9c.svg)](https://github.com/nat-n/poethepoet)

## Getting Started
See [`examples`](examples) folder for example analysis using the wind-up package. [`smarteole_example.ipynb`](examples%2Fsmarteole_example.ipynb) is a good place to start.

The wind-up package can be installed in a virtual environment with the following commands:
```shell
# create and activate a virtual environment, if needed
python -m venv .venv
source .venv/Scripts/activate # or .venv/bin/activate on linux or ".venv/Scripts/activate" in Windows command prompt
# install the wind-up package in the virtual environment
pip install git+https://github.com/resgroup/wind-up.git # alternatively clone the repo, navigate to the wind-up folder and run "pip install ."
pip install wind-up # alternatively clone the repo, navigate to the wind-up folder and run "pip install ."
```
Note that the package is named `wind_up` (with an underscore) in Python code. For example to print the version of the installed package use the following code snippet:
```python
import wind_up
print(wind_up.__version__)
```

See [`examples`](examples) folder for example analysis using the wind-up package. [`smarteole_example.ipynb`](examples%2Fsmarteole_example.ipynb) is a good place to start.

## Contributing
To start making changes make a new branch from `main`. Note `main` is protected;
To start making changes fork the repository or make a new branch from `main`. Note `main` is protected;
if a commit fails to push and you want to undo it try `git reset origin/main --hard`

After cloning the repository and (creating and activating the virtual environment), use the following command to install the wind-up package
in editable mode with the dev dependencies:
After cloning the repository (and creating and activating the virtual environment), use the following commands to install the wind-up package in editable mode with the dev dependencies:
```shell
git clone https://github.com/resgroup/wind-up
git clone https://github.com/resgroup/wind-up # or your fork of wind-up
cd wind-up
# create and activate a virtual environment
python -m venv .venv
source .venv/Scripts/activate # or .venv/bin/activate on linux or ".venv/Scripts/activate" in Windows command prompt
# install the package in editable mode with the dev dependencies
pip install -e .[dev] # or .[jupyter,dev] if you want jupyter dependencies as well
```
Use `poe all` to run all required pre-push commands (make sure the virtual environment is activated)

## Running tests
Install dev dependencies and use `poe test` or `poe all` to run unit tests (make sure the virtual environment is activated)
Install dev dependencies and use `poe test` to run unit tests (make sure the virtual environment is activated)

## License
See [`LICENSE.txt`](LICENSE.txt)
Expand Down
18 changes: 16 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
[project]
name = "wind-up"
version = "0.1.4"
description = "A tool to assess yield uplift of wind turbines"
version = "0.1.5"
authors = [
{ name = "Alex Clerc", email = "alex.clerc@res-group.com" }
]
description = "A tool to assess yield uplift of wind turbines"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE.txt" }
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
]
dependencies = [
'geographiclib',
'matplotlib',
Expand All @@ -25,6 +32,13 @@ dependencies = [
'tqdm',
]

[project.urls]
Homepage = "https://github.com/resgroup/wind-up"

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project.optional-dependencies]
dev = [
'pytest',
Expand Down

0 comments on commit 36bac4e

Please sign in to comment.