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

Create public feed endpoints #4622

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from
Open

Create public feed endpoints #4622

wants to merge 73 commits into from

Conversation

perryr16
Copy link
Contributor

@perryr16 perryr16 commented Apr 10, 2024

Any background context you want to provide?

Chula Vista has requested a public feed endpoint

What's this PR do?

Exposes a new public feed endpoint for JSON and HTML.

    Returns all property and taxlot state data for a given organization as a json object. The results are ordered by "state.update".

    Optional and configurable url query_params:
    :query_param labels: comma separated list of case sensitive label names. Results will include inventory that has any of the listed labels. Default is all inventory
    :query_param cycles: comma separated list of cycle ids. Results include inventory from the listed cycles. Default is all cycles
    :query_param properties: boolean to return properties. Default is True
    :query_param taxlots: boolan to return taxlots. Default is True
    :query_param page: integer page number
    :query_param per_page: integer results per page

    Example requests:
    {seed_url}/api/v3/public/organizations/feed.json?{query_param1}={value1}&{query_param2}={value2}
    dev1.seed-platform.org/api/v3/public/organizations/1/feed.json
    dev1.seed-platform.org/api/v3/public/organizations/1/feed.json?page=2&labels=Compliant&cycles=1,2,3&taxlots=False 

How should this be manually tested?

Go to {seed_url}/api/v3/public/organizations/{org_id}/feed.json?{query_param1}={value1}&{query_param2}={value2}.
Go to {seed_url}/api/v3/public/organizations/{org_id}/feed.html?{query_param1}={value1}&{query_param2}={value2}.
The page will be populated depending on the value of the organization setting public_feed_enabled

What are the relevant tickets?

#4513

Screenshots (if appropriate)

Screenshot 2024-04-26 at 3 04 20 PM

Screenshot 2024-04-26 at 3 05 26 PM

Screenshot 2024-04-26 at 3 03 44 PM

@perryr16 perryr16 added DO NOT MERGE Feature Add this label to new features. This will be reflected in the change log when generated. labels Apr 10, 2024
@perryr16 perryr16 marked this pull request as ready for review April 15, 2024 16:27
@perryr16 perryr16 requested a review from kflemin April 15, 2024 17:03
@perryr16 perryr16 changed the title Create public feed endpoints Create public feed json endpoint Apr 15, 2024
@axelstudios
Copy link
Member

Since this PR fixes the previously incorrect migration order, any existing instances will have to manually fix the problem before running migrations:

UPDATE django_migrations
SET name = '0216_alter_sensor_unique_together'
WHERE name = '0215_alter_sensor_unique_together';

@perryr16 perryr16 changed the title Create public feed json endpoint Create public feed endpoints Apr 26, 2024
perryr16 and others added 21 commits April 26, 2024 15:08
* Speed up ali tree

* Fix Tests
* Automate ugprading a database from 12 to 14.

* parameterize source conversion and target test database service versions.

---------

Co-authored-by: Damon Haley <damon.haley@nrel.gov>
Added documentation for upgrading Postgres and TimescaleDB to the latest version
* Fix email

* Fix

* Fix

* Fix package.json

* map from property_view_id not id

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
Co-authored-by: Nicholas Long <nicholas.long@nrel.gov>
* Initial cleanup

* Renamed ambiguous inventory settings files

* Major cleanup of files loaded on landing vs seed

* Fixed loading faq page on Windows, much faster homepage hyperlink

* Tons of UI improvements around number formatting/user sorting, and massive improvement from js/css bundling/compression

* Major UBID performance improvement

* Update chrome url

* Replaced deprecated Protractor with Puppeteer, updated dependencies, centralized vendor scripts

* Switched to Puppeteer, cleaned up front-end tests, removed hardcoded paths, fixed ubid tests
* new stats table

* commitment sqft added to goal

* actions to  goal stats table

* stats table, actions dropdown

* stats, create goal_notes for newly uploaded properties

* add current cycle property ids to goal get

* actions dropdown and base for bulk goalnote edit

* bulk update goalnote

* bulk update historical note

* rename

* precommit

* permissions and tests

* lint

* permission refactor

* permission refactor

* lint

* phrasing

* small language update and added translations

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>
---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Add this label to new features. This will be reflected in the change log when generated.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants