Skip to content

Commit

Permalink
Release 0.4.3 (#43)
Browse files Browse the repository at this point in the history
* Merge main into develop after release (#21)

* Release 0.3.0 (#20)

* precommit

* Fix delete cycle progress key and race condition (#24)

* Release 0.3.0 (#20)

* precommit

* add progress key to delete cycles

* Remove deprecated APIs, fix typos (#23)

* Update README.rst

* update license (#26)

* Updates to support 179d, includes creating property, downloading property reports from ESPM, and updating building search(#22)

* adding create_building and update_building methods
* modify search_buildings to provide appropriate cycle id
* adding client methods for creating extra data columns
* add pass throughs for file downloads
* updates for audit template workflow
* method to download property xlsx
---------

Co-authored-by: Alex Swindler <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>

* prep release

* increase timeout for server start

* increase timeout for server start (#31)

* cleanup before release (#32)

* configure seed to load small EEEJ dataset for integration test (#33)

* add analysis retrieve methods (#34)

* Added multiple cycle upload argument (#27)

* Added multiple cycle upload argument

* Responded to comments and fixed failing tests

* Converted to using kwargs

* Pre-commit

* Cleanup README.rst  (#35)

* cleanup readme

* populate description in pypi

* precommit fix

* Endpoint to download an Audit Template Report Submission and store in SEED (#36)

* start of AT report download method

* adding endpoint to download AT report submission and store in SEED

* add analysis retrieve methods (#34)

* Added multiple cycle upload argument (#27)

* Added multiple cycle upload argument

* Responded to comments and fixed failing tests

* Converted to using kwargs

* Pre-commit

* Cleanup README.rst  (#35)

* cleanup readme

* populate description in pypi

* precommit fix

* Endpoint to download an Audit Template Report Submission and store in SEED (#36)

* start of AT report download method

* adding endpoint to download AT report submission and store in SEED

* prep 0.4.1 (#37)

* Update CHANGELOG.rst

* update release instruction

* Update README.rst

* Update README.rst

* add new method to get AT submission metadata (#39)

* Update CHANGELOG.rst

* Update setup.cfg

* Added ESPM functions to py-seed client (#28)

* Added ESPM functions to py-seed client

* Cleaned up the code and put the downloads into its own
folder called "reports"

* Added openpyxl to requirements

* Fixing tests

* First pass at adding test

* First draft of finishing the test

* Finished get report template names test

* Started troubleshooting mypy errors

* Fixed remaining conflict

* Fixed integration test errors

* Fix mypy errors

* Fixed mypy for Python 3.10

* Precommit

* Fix unnecessary typing

* Fixed integration tests

---------

Co-authored-by: Nicholas Long <[email protected]>
Co-authored-by: Alex Swindler <[email protected]>

* prep version 0.4.3 (#41)

* Add PyPi release action (#42)

* add python 3.12

* update test versions

* add release connection and update instructions

---------

Co-authored-by: Alex Swindler <[email protected]>
Co-authored-by: Katherine Fleming <[email protected]>
Co-authored-by: Alex Chapin <[email protected]>
  • Loading branch information
4 people authored Jun 12, 2024
1 parent 51c8eec commit 9f6b851
Show file tree
Hide file tree
Showing 12 changed files with 294 additions and 94 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9, 3.10.9]
python-version: [3.9, 3.10.9, 3.12]
test_env: [python, precommit, mypy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display system info
Expand All @@ -36,9 +36,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Wait for web server
uses: nev7n/wait_for_response@v1
with:
# Increase the timeout significanlty, the EEEJ census tract
# Increase the timeout significantly, the EEEJ census tract
# migration take ~6 minutes to run along.
url: "http://localhost:8000/"
responseCode: 200
Expand All @@ -86,7 +86,7 @@ jobs:
SEED_PM_UN: ${{ secrets.SEED_PM_UN }}
SEED_PM_PW: ${{ secrets.SEED_PM_PW }}
run: |
pytest -m "integration" -s
pytest -m integration -s
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
55 changes: 55 additions & 0 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: PyPIRelease
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

release:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi_release
url: https://pypi.org/p/py-SEED
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
21 changes: 21 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
Changelog
=========

0.4.3
-----

## What's Changed

* Fix delete cycle progress key and race condition by @nllong in https://github.com/SEED-platform/py-seed/pull/24
* Remove Deprecated APIs, Fix Typos by @axelstudios in https://github.com/SEED-platform/py-seed/pull/23
* Update license dates by @nllong in https://github.com/SEED-platform/py-seed/pull/26
* 179D updates by @kflemin in https://github.com/SEED-platform/py-seed/pull/22
* Increase timeout for server start by @nllong in https://github.com/SEED-platform/py-seed/pull/31
* Cleanup changelog and a few docstrings by @nllong in https://github.com/SEED-platform/py-seed/pull/32
* configure seed to load small EEEJ dataset for integration test by @kflemin in https://github.com/SEED-platform/py-seed/pull/33
* Add analysis retrieve methods by @nllong in https://github.com/SEED-platform/py-seed/pull/34
* Added multiple cycle upload argument by @anchapin in https://github.com/SEED-platform/py-seed/pull/27
* Cleanup README.rst by @nllong in https://github.com/SEED-platform/py-seed/pull/35
* Endpoint to download an Audit Template Report Submission and store in SEED by @kflemin in https://github.com/SEED-platform/py-seed/pull/36
* add new method to get AT submission metadata by @kflemin in https://github.com/SEED-platform/py-seed/pull/39
* Added ESPM functions to py-seed client by @anchapin in https://github.com/SEED-platform/py-seed/pull/28

**Full Changelog**: https://github.com/SEED-platform/py-seed/compare/v0.4.2...v0.4.3

0.4.2
-----
What's Changed
Expand Down
26 changes: 11 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
py-SEED
===========


.. image:: https://github.com/seed-platform/py-seed/actions/workflows/ci.yml/badge.svg?branch=develop
:target: https://github.com/seed-platform/py-seed/actions/workflows/ci.yml/badge.svg

Expand Down Expand Up @@ -74,6 +73,7 @@ Low-Level Documentation
-----------------------
This client has access to the lower level API client by accessing `seed_client_base.SEEDOAuthReadOnlyClient`, `seed_client_base.SEEDOAuthReadWriteClient`, `seed_client_base.SEEDReadOnlyClient`, and `seed_client_base.SEEDReadWriteClient`. This provides two user authentication based Python clients and two authentication methods, basic and `OAuth2 <https://github.com/GreenBuildingRegistry/jwt_oauth2>`_. More information on authentication can be seen in the following py-SEED classes:

.. code-block:: bash
SEEDOAuthReadOnlyClient
SEEDOAuthReadWriteClient
Expand Down Expand Up @@ -107,10 +107,10 @@ Tests can be run via the `pytest` command.

You will need to export environment variables for a test portfolio manager account to test integration. Environment variables should be named:

..code-block:: bash
.. code-block:: bash
SEED_PM_UN
SEED_PM_PW
SEED_PM_UN
SEED_PM_PW
SEED Platform
Expand All @@ -126,16 +126,12 @@ Full details in LICENSE file.
Releasing
---------

* Configure your PyPi with token access `https://pypi.org/manage/account/token/ <https://pypi.org/manage/account/token/>`_.
* Merge down to main
* Tag release on GitHub and add in the change log
* Release via command line
This project is configured with GitHub Actions to automatically release to PyPi when a new tag is created. To release a new version:

.. code-block:: bash
* Create a branch with the prepared release change log
* Merge branch to develop, and open PR to main
* Once deployed to main, create a new tag in GitHub against main and copy the change log notes into the tag description
* GitHub Actions will automatically prepare the release the new version to PyPi
* Go to GitHub actions to approve the release

rm -rf dist
python setup.py sdist
pip install twine
# make sure to check the dist package for errors in the RST files
twine check dist/*
twine upload --repository py-seed dist/*
The GitHub Action required updates to the GitHub repo to only release on tags (https://github.com/SEED-platform/py-seed/settings/environments) after approval and on PyPi to add an authorized publisher (https://pypi.org/manage/project/py-SEED/settings/publishing/).
6 changes: 6 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@
"dname",
"durl",
"ECAM",
"EEEJ",
"ESPM",
"excpt",
"geocoded",
"greenbuildingregistry",
"jakejarvis",
"JSONAPI",
"jwalton",
"Munday",
"ndeloof",
"officedocument",
"openxmlformats",
"precommit",
"printenv",
"pyseed",
"pytest",
"sdist",
Expand Down
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mypy]
ignore_missing_imports = True
Loading

0 comments on commit 9f6b851

Please sign in to comment.