Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enode API Changes #87

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Enode API Changes #87

wants to merge 23 commits into from

Commits on Apr 23, 2023

  1. Configuration menu
    Copy the full SHA
    23e4aa8 View commit details
    Browse the repository at this point in the history
  2. Test

    neha-vard authored and AndrewLester committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    cd99e2e View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2023

  1. Add fake inverter test

    Fix lint errors
    
    Finish both endpoints
    
    Fix formatting and lint errors
    
    Update pv_site_api/main.py
    
    Co-authored-by: Andrew Lester <[email protected]>
    
    Update pv_site_api/main.py
    
    Co-authored-by: Andrew Lester <[email protected]>
    
    Update pv_site_api/main.py
    
    Co-authored-by: Andrew Lester <[email protected]>
    
    Address PR comments
    
    Update pyproject.toml
    
    Fix lint errors
    
    Fix formatting
    
    Fix imports
    
    Fix bugs
    
    Remove unused import
    
    Fix formatting
    
    Fix import order
    
    Create enode_auth.py
    
    Define basic auth function
    
    Get api key from env
    
    Finish part 1
    anyaparekh authored and AndrewLester committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    db19834 View commit details
    Browse the repository at this point in the history
  2. Create httpx auth class

    Remove test end point
    
    clean up
    
    Remove print messages
    
    Make getenv set variable to str
    
    make format
    
    lint and format
    
    Remove unecessary check
    
    Remove test files
    
    Use env var for enode token url
    
    Change get_enode_access_token to return request
    
    Refactor get_enode_access_token() into EnodeAuth class
    
    change 404 to 401
    
    format
    
    Remove test code
    
    Remove print
    
    Address PR changes
    
    Update enode constructor to take in client_id, secret, and url
    
    Add type hints
    
    Add inverters test for site specific
    
    Fix lint errors
    
    Modularize code
    
    Fix lint errors
    jackypark9852 authored and AndrewLester committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    0eddcde View commit details
    Browse the repository at this point in the history
  3. Add enode link URL endpoint (#86)

    * Add enode link URL endpoint
    
    * Fix lint
    
    * Rename test var for clarity
    
    * Add comment to mock urls fixtuer
    
    * Use redirect response
    AndrewLester committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    e1dadaf View commit details
    Browse the repository at this point in the history
  4. [WIP] Add put endpoint for editing site (#88)

    * Bump version: 0.0.36 → 0.0.37
    
    * TDD: add failing test, looking at forecasts in the future
    
    * add start utc filter on forecast future qery
    
    * lint
    
    * lint
    
    * isort
    
    * add freeze gun to dev dependencies
    
    * self PR comments
    
    * Bump version: 0.0.37 → 0.0.38
    
    * Make site_uuid field on PVSiteMetadata model optional
    
    * Make pydantic field optional
    
    * Move test site with real UUID to real db test
    
    * Don't use uuid in tests
    
    * Add part of check back
    
    * Ensure autogenerated site uuid is not null in database
    
    * Add WHERE statement on query for past forecasts
    
    This doesn't change the result but speeds up the query in general.
    
    * Bump version: 0.0.38 → 0.0.39
    
    * Bump version: 0.0.39 → 0.0.40
    
    * add logging
    
    * lint
    
    * run blacks
    
    * add extra logs
    
    * Bump version: 0.0.40 → 0.0.41
    
    * add structlogging
    
    * add structlog to requiremwnts
    
    * add logging
    
    * Bump version: 0.0.41 → 0.0.42
    
    * Add structlog initialisation
    
    * blacks
    
    * isort
    
    * Bump version: 0.0.42 → 0.0.43
    
    * Uniformize check to FAKE and fix related test
    
    * Set codecov targets
    
    * Hard-code the "now" time for all tests
    
    This means that the same tests are run now matter the time at which we
    run them.
    
    * add caching
    
    * fix
    
    * lint
    
    * isort
    
    * fix for routes calling routes
    
    * lint
    
    * Bump version: 0.0.43 → 0.0.44
    
    * PR comment
    
    * add args to cache
    
    * lint
    
    * Update pv_site_api/cache.py
    
    Co-authored-by: Simon Lemieux <[email protected]>
    
    * tidy
    
    * Bump version: 0.0.44 → 0.0.45
    
    * What I've got
    
    * Add basic authorization to the /sites* routes
    
    The caller of the routes must have a proper Bearer authorization
    header set.
    
    * refactor
    
    * add tests
    
    * fix error in import
    
    * update pvsite-datamodel (in line with main)
    
    * fix bug
    
    * fix incompatible types
    
    * lint and format
    
    * add site existence check
    
    * add back correct datamodel dependency
    
    * fix test name
    
    * allow tests to pass by adding fake condition
    
    * remove 404 check
    
    * use or instead of is not none
    
    * Bump version: 0.0.45 → 0.0.46
    
    * add site existence check
    
    * format and lint
    
    * Bump version: 0.0.46 → 0.0.47
    
    * add post endpoint
    
    * add test back in
    
    * fix errors and format
    
    * add site name to test
    
    * fix tiny error
    
    * fix another small error
    
    * run tests
    
    * fix bugs
    
    * lint and format
    
    * fix fake
    
    * :pleading-face:
    
    * yet another is_fake() addition
    
    * address comments
    
    ---------
    
    Co-authored-by: Peter Dudfield <[email protected]>
    Co-authored-by: BumpVersion Action <bumpversion@github-actions>
    Co-authored-by: peterdudfield <[email protected]>
    Co-authored-by: AndrewLester <[email protected]>
    Co-authored-by: Simon Lemieux <[email protected]>
    Co-authored-by: devsjc <[email protected]>
    
    Fix some functions
    
    Fix Enode link endpoint
    
    Remove duplicate fixture
    
    Rename /inverters to /enode/inverters
    ericcccsliu authored and AndrewLester committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    3541f2f View commit details
    Browse the repository at this point in the history
  5. Add post inverters for site endpoint

    Move a few things
    
    Fix pyproject
    
    Fix
    
    Fix tests
    
    Fix import order
    
    Default the token URL
    
    Add some tests for other states
    
    Fix last missing coverage in main.py
    AndrewLester committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    f491656 View commit details
    Browse the repository at this point in the history
  6. Add Enode auth test

    AndrewLester committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    f4258e3 View commit details
    Browse the repository at this point in the history
  7. Fix format

    AndrewLester committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    ec1898c View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. Configuration menu
    Copy the full SHA
    6715206 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Configuration menu
    Copy the full SHA
    d904f3a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ab5a5c1 View commit details
    Browse the repository at this point in the history
  3. lint and format

    ericcccsliu committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    e4c0922 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2023

  1. Configuration menu
    Copy the full SHA
    94c3767 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2023

  1. Configuration menu
    Copy the full SHA
    6329cb1 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Configuration menu
    Copy the full SHA
    af3ca34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a04fd5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    381f849 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5d622a2 View commit details
    Browse the repository at this point in the history
  5. Fix format

    AndrewLester committed May 4, 2023
    Configuration menu
    Copy the full SHA
    e185d93 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2023

  1. Configuration menu
    Copy the full SHA
    246724d View commit details
    Browse the repository at this point in the history

Commits on May 18, 2023

  1. Configuration menu
    Copy the full SHA
    7e80ee4 View commit details
    Browse the repository at this point in the history
  2. Fix import order

    AndrewLester committed May 18, 2023
    Configuration menu
    Copy the full SHA
    819f55f View commit details
    Browse the repository at this point in the history