Skip to content

Commit

Permalink
Release version 0.2.0 and upload to PyPI (#24)
Browse files Browse the repository at this point in the history
* Add release data to whatsnew

* Update version number in setup.cfg

* Create publish.yml

* Update whatsnew date

* Fix typo in field_layout_discretization.ipynb

* Update whatsnew.md

* Update whatsnew.md

* Add functions to whatsnew.md

* Update whatsnew.md

* Update whatsnew.md

* Update whatsnew.md
  • Loading branch information
AdamRJensen authored Mar 11, 2022
1 parent 1189212 commit 251a4fd
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 8 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish distributions to PyPI

# if this workflow is modified to be a generic CI workflow then
# add an if statement to the publish step so it only runs on tags.
on:
push:
tags:
- "v*"

jobs:
build-n-publish:
name: Build and publish distributions to PyPI
if: github.repository == 'pvlib/twoaxistracking'
runs-on: ubuntu-latest
steps:
# fetch all commits and tags so versioneer works
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
- name: Build packages
run: python setup.py sdist bdist_wheel

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
4 changes: 2 additions & 2 deletions docs/source/notebooks/field_layout_discretization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"import pandas as pd\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"# The following libraries are not standard and have to be installed seperately.\n",
"# The following libraries are not standard and have to be installed separately.\n",
"# It is recommended to install shapely using conda.\n",
"import pvlib\n",
"from shapely import geometry"
Expand Down Expand Up @@ -310,7 +310,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.11"
"version": "3.7.12"
}
},
"nbformat": 4,
Expand Down
16 changes: 12 additions & 4 deletions docs/source/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.2.0] - 2022-03-11
The code in the second release is a complete restructure in order for the code to be
made into a package and available on PyPI.

### Added
- Added automatic documentation using Sphinx and autosummary
Expand All @@ -13,8 +15,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Tilted fields can now be simulated by specifyig the keywords ``slope_azimuth`` and
``slope_tilt`` (see PR#7).
- The code now is able to differentiate between the active area and total area (see PR#11).
- The class `TrackerField` has been added, which is now the recommended way for using
- The class {py:class}`twoaxistracking.TrackerField` has been added, which is now the recommended way for using
the package and is sufficient for most use cases.
- Added {py:func}`twoaxistracking.layout.max_shading_elevation` for calculating the
maximum elevation for which shading can occur for a specific field layout and collector geoemtry.
- Added {py:func}`twoaxistracking.shading.horizon_elevation_angle` for calculating the
horizon angle caused by having a sloped field.


### Changed
- Divide code into modules: shading, plotting, and layout
Expand All @@ -25,11 +32,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed naming of ``L_min`` to ``min_tracker_spacing``
- Changed naming of ``collector_area`` to ``total_collector_area``
- The field layout parameters are now required when using the
{py:func}`twoaxistracking.layout.generate_field_layout` function. The standard field layouts
are only available through the `TrackerField` class.
{py:func}`twoaxistracking.generate_field_layout` function. The standard field layouts
are only available through the {py:class}`twoaxistracking.TrackerField` class.

### Testing
- Linting using flake8 was added in PR#11
- Test coverage was added in PR#14 and PR#16

## [0.1.0] - 2022-01-25
This was the first release, containing the main functions and notebooks.
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[metadata]
name = twoaxistracking
version = 0.1.0
author = Adam R. Jensen
version = 0.2.0
author = 'Adam R. Jensen, Kevin Anderson'
author_email = [email protected]
description = twoaxistracking is a python package for simulating two-axis tracking solar collectors, particularly self-shading.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/pvlib/twoaxistracking
project_urls =
Bug Tracker = https://github.com/pvlib/twoaxistracking/issues
Documentation = https://twoaxistracking.readthedocs.io
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: BSD License
Expand Down

0 comments on commit 251a4fd

Please sign in to comment.