Skip to content

Commit

Permalink
Cleanup README.rst (#35)
Browse files Browse the repository at this point in the history
* cleanup readme

* populate description in pypi

* precommit fix
  • Loading branch information
nllong authored Nov 16, 2023
1 parent b3e2ba5 commit 321ccfd
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exclude: |
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand Down Expand Up @@ -40,7 +40,7 @@ repos:
- id: flake8
args: ["--ignore=E501,E402,W503,W504,E731,F401"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v3.1.0
hooks:
- id: prettier
types_or: [css, yaml, markdown, html, scss, javascript]
Expand Down
66 changes: 30 additions & 36 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Py-SEED
py-SEED
=======

.. image:: https://github.com/seed-platform/py-seed/actions/workflows/ci.yml/badge.svg?branch=develop
Expand All @@ -7,17 +7,28 @@ Py-SEED
.. image:: https://badge.fury.io/py/py-seed.svg
:target: https://pypi.python.org/pypi/py-seed/

A python API client for the SEED Platform. This is an updated version of the Client. It is compatible with the latest version of the SEED Platform (>2.17.4). This client still has access to the previous format of generating a lower level API client by accessing `seed_client_base.SEEDOAuthReadOnlyClient`, `seed_client_base.SEEDOAuthReadWriteClient`, `seed_client_base.SEEDReadOnlyClient`, and `seed_client_base.SEEDReadWriteClient`. This lower level API is documented below under the `Low-Level Documentation`
py-SEED serves as a Python client for the SEED Platform API. This library is purpose-built for Python applications, enabling interaction with the SEED Platform API to access property lists, create properties, establish connections, and retrieve data from ENERGY STAR(R) Portfolio Manager, BETTER, and other sources. The SEED Platform has a robust API, granting users access to every front-end feature seamlessly via the API. Currently, this library exposes the most commonly used SEED API endpoints and will undergo continuous updates tailored to the community's evolving needs. py-SEED offers two interaction levels: a high-level API providing familiar endpoints for easy connectivity to SEED's API, and a low-level API that allows read-write access to any SEED API, demanding a deeper understanding of the SEED API architecture

py-SEED is compatible with the latest version of the SEED Platform (>2.17.4) and only support SEED API Version 3.

More information can be found here:

* https://seed-platform.org
* https://energy.gov/eere/buildings/standard-energy-efficiency-data-platform
* https://github.com/SEED-platform
* https://buildingdata.energy.gov/#/seed
* https://github.com/SEED-platform/pyseed-examples


Stakeholders
-------------

The following list of stakeholders should be considered when making changes to this module

- 179D Tax Deduction Web Application
- Earth Advantage Green Building Registry
- User scripts for managing building data
- ECAM
* 179D Tax Deduction Web Application
* Earth Advantage Green Building Registry
* User scripts for managing building data
* ECAM

Documentation
-------------
Expand Down Expand Up @@ -55,39 +66,20 @@ Within Python you can use the client like this:
'tests/data/test-seed-data-mappings.csv'
)
# See the projects unit tests for more examples.
# See the projects unit tests for more examples. https://github.com/SEED-platform/py-seed/blob/develop/tests/test_seed_client.py
# Or look at the py-SEED examples repository: https://github.com/SEED-platform/pyseed-examples
Low-Level Documentation
-----------------------
This provides two user authentication based Python clients and two OAuth2 authentication based Python clients for interacting with the SEED Platform Api::
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:


SEEDOAuthReadOnlyClient
SEEDOAuthReadWriteClient
SEEDReadOnlyClient
SEEDReadWriteClient



(The OAuthMixin is constructed around the the JWTGrantClient found in jwt-oauth2lib. see https://github.com/GreenBuildingRegistry/jwt_oauth2)

SEED (Standard Energy Efficiency Data Platform™) is an open source "web-based application that helps organizations easily manage data on the energy performance of large groups of buildings" funded by the United States Department of Energy.

More information can be found here:

* https://energy.gov/eere/buildings/standard-energy-efficiency-data-platform
* https://seed-platform.org
* https://github.com/SEED-platform
* https://buildingdata.energy.gov/#/seed


Note the clients do not provide per api-call methods, but does provide the standard CRUD methods: get, list, put, post, patch, delete

The intended use of these clients is to be further subclassed or wrapped in functions to provide the desired functionality. The CRUD methods are provided via mixins so its possible to create a client for example without the ability to delete by subclassing SEEDUserAuthBaseClient, or SEEDOAuthBaseClient, and adding only the mixins that provided the Create, Read and Update capabilities.

Basic usage for the provided clients is below.

Usage:
Note the clients do not provide per api-call methods, but does provide the standard CRUD methods: get, list, put, post, patch, delete. The intended use of these clients is to be further subclassed or wrapped in functions to provide the desired functionality. The CRUD methods are provided via mixins so its possible to create a client for example without the ability to delete by subclassing SEEDUserAuthBaseClient, or SEEDOAuthBaseClient, and adding only the mixins that provided the Create, Read and Update capabilities. Basic usage for the provided low-level clients is as follows:


.. code-block:: python
Expand All @@ -107,8 +99,8 @@ Usage:
# get a single property
seed_client.get(property_pk, endpoint='properties')
Local Testing
-------------
Testing
-------

Tests can be run via the `pytest` command.

Expand All @@ -120,15 +112,15 @@ You will need to export environment variables for a test portfolio manager accou
SEED_PM_PW


SEED Platform
-------------
SEED (Standard Energy Efficiency Data Platform™) is an open source "web-based application that helps organizations easily manage data on the energy performance of large groups of buildings" funded by the United States Department of Energy.


License
-------
Full details in LICENSE file.

Changelog
---------
py-SEED was developed for use in the greenbuildingregistry project but has been extended for various uses, including Salesforce data transfer and SEED data analysis.

For a full changelog see `CHANGELOG.rst <https://github.com/seed-platform/py-seed/blob/master/CHANGELOG.rst>`_.

Releasing
---------
Expand All @@ -142,4 +134,6 @@ Releasing
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 dist/*
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"apibase",
"buildingsync",
"codeauthor",
"datafile",
"dname",
"durl",
"ECAM",
Expand Down
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/usr/bin/env python

# Imports from Third Party Modules
from pathlib import Path
from setuptools import setup

setup()
this_directory = Path(__file__).parent
long_description = (this_directory / "README.rst").read_text()

setup(
name='py-SEED',
long_description=long_description,
long_description_content_type='text/x-rst'
)

0 comments on commit 321ccfd

Please sign in to comment.