Skip to content

Move geocode URLs to webapis.conf#1380

Merged
cpaulgilman merged 5 commits into
developfrom
move-geocode
Mar 23, 2023
Merged

Move geocode URLs to webapis.conf#1380
cpaulgilman merged 5 commits into
developfrom
move-geocode

Conversation

@cpaulgilman

@cpaulgilman cpaulgilman commented Mar 23, 2023

Copy link
Copy Markdown
Collaborator

Description

Goes with https://github.com/NREL/SAM-private/pull/89 and NatLabRockies/wex#160.

Move all URLs to webapis.conf:

  • If a web service URL changes, we can possibly update the URL in webapis.conf without touching source code.

  • Centralized list of URLS provides transparency for users with cybersecurity questions about what web services SAM uses.

Fixes #1204

Tests

These tests require building SAM-private:

  • NSRDB download with street address (Advanced Download option on Location and Resource page)
  • WIND toolkit download with street address
  • Marine Wave resource download (Wave Resource Data Download window does not have a location option, so GeocodeDeveloper() never gets called from UI)
  • 3D shade calculator map underlay and map lookup by location name: On the Location tab, type an address and click Lookup address.
  • LK geocode() function (Location without advanced option on Location and Resource page also tests this)
  • Note geocode() not available from SDKtool LK script editor.

Can also test by temporarily assigning values to keys and new user email variable in SAM/private.h.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This change modifies variables in existing compute modules. Please see Checking for PySAM Incompatible API Changes.

Checklist:

If you have added a new compute module in a SSC pull request related to this one, be sure to check the Process Requirements.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

* Update to Cambium 2022

* Update URL in webapis.conf.

* On UI form, read UUID from URL in webapis.conf instead of hard coding it. Future updates should only require updating the URL in webapis.conf.

* Revise tooltip descriptions to be Cambium version agnositc.

* Fix UI group box sizes so Merchant Plant Revenue page are all same size.

* Cambium sample script

* Update sample script to Cambium 2020.

* Update sample script to work for all PPA models, including Host Developer.

* Cambium macro button for PPA models

* Create macro based on sample script and add button to Revenue or Time of Delivery input page for all PPA models.

* Help revisions for Cambium 2022

* UI adjustments for Mac/Linux

* Update multiple year downloads for Cambium 2022

* Add optional escalation rate input and update defaults
* Support non-monotonic available years from Cambium (Cambium 2020 years were even years, Cambium 2022 varies)
* Update Help
* Update UI descriptions and tooltips

* Fix application of cambium escalation for copied data

* Fix cambium progress bar text

* Allow escalation for single-year download

* Help updates for cambium single-year escalation

* Fix input number format
* Migrate from wtk-srw-download to wtk-download

* Adds option to download subhourly wind resource data

* Fix intervals list

* Clean up WIND Toolkit download messages

* Fix string declarations and typo
Update SAM CMakeLists.txt for new geotools.cpp

New URLs in webapis.conf file for geocoding, static map, and time zone APIs.

New URL in webapis.conf for calls to URDB wiki (for consistency, not related to geocoding)

Move geocoding functions from WEX to new geotools.cpp file.

Move LK `geocode()` from WEX to SAM so it can access SAM API keys.

Define variables for Bing, Google, and special NREL Geocode API keys so that they can be managed in teh same way as SAM API key.

Add new `user_email` variable so that open source versions of SAM can use NREL developer APIs that require an email parameter.

Rename `GeoCodeDeveloper()` to `GeocodeDeveloper()`;

Remove `SetApiKeys()` function, which is only required to make geocoding API keys available in WEX.
@cpaulgilman cpaulgilman added this to the SAM Fall 2023 Release milestone Mar 23, 2023
@cpaulgilman cpaulgilman requested a review from sjanzou March 23, 2023 00:07
@cpaulgilman cpaulgilman changed the title Move geocode Move URLs to webapis.conf Mar 23, 2023
@cpaulgilman cpaulgilman changed the title Move URLs to webapis.conf Move geocode URLs to webapis.conf Mar 23, 2023

@sjanzou sjanzou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested per document in SAM-private pull request 89

@cpaulgilman cpaulgilman merged commit 8628eb1 into develop Mar 23, 2023
@cpaulgilman cpaulgilman deleted the move-geocode branch March 23, 2023 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants