Skip to content

Add missing Python SDK endpoints - #61

Open
nik-solcast wants to merge 2 commits into
mainfrom
feature/python-sdk-endpoint-coverage
Open

nik-solcast wants to merge 2 commits into
mainfrom
feature/python-sdk-endpoint-coverage

Conversation

@nik-solcast

Copy link
Copy Markdown
Collaborator

Summary

  • Add TMY Advanced PV, utility-scale measurements, schedules, and Premium Wind resource methods.
  • Standardize utility measurement uploads on a measurements array, including a one-record list.
  • Add JSON-body support for PATCH and PUT, update SDK docs, and pin Black in CI.

Verification

  • Generator suite: 39 passed.
  • SDK suite: 58 passed; 3 live API tests deselected.
  • API validator tests: 14 passed.
  • API Docs validation and Black checks passed.

Add TMY Advanced PV, utility-scale measurements, schedules, and Premium Wind site resource methods. Update SDK docs and tests, add JSON-body support to PATCH and PUT, and pin Black in CI.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The endpoint additions, transport changes, tests, and documentation have no identified blocking issues.

No open issues 🎉

What changed in this PR

Extends the Python SDK with missing resource and data endpoints using the existing client.

Changes:

  • Adds Advanced PV TMY, utility measurement uploads, schedules, and Premium Wind resource methods.
  • Supports JSON bodies for PATCH and PUT and removes default format parameters from measurement deletes.
  • Adds tests and documentation and pins Black in CI.
File Description
tests/​test_wind_power_sites.py Tests Wind resource requests.
tests/​test_site_measurements.py Updates DELETE query expectations.
tests/​test_forecast_docs.py Checks forecast method documentation and links.
tests/​test_advanced_site_and_schedule_endpoints.py Tests new endpoints and JSON requests.
solcast/​wind_power_sites.py Adds Wind resource management methods.
solcast/​wind_power_site_measurements.py Removes default DELETE format parameters.
solcast/​urls.py Adds endpoint paths.
solcast/​tmy.py Adds Advanced PV TMY retrieval.
solcast/​schedules.py Adds schedule retrieval and management.
solcast/​pv_power_sites.py Adds measurement-array uploads.
solcast/​pv_power_site_measurements.py Removes default DELETE format parameters.
solcast/​api.py Adds PATCH and PUT JSON-body support.
solcast/​__init__.py Exports new modules.
mkdocs.yml Adds documentation navigation entries.
docs/​wind_power_sites.md Documents Wind resource management.
docs/​tmy.md Documents Advanced PV TMY retrieval.
docs/​schedules.md Documents schedule operations.
docs/​pv_power_sites.md Documents utility measurement uploads.
docs/​forecast.md Lists existing soiling forecast methods.
.github/​workflows/​black.yml Pins Python and Black versions.

Review effort: Balanced

@nik-solcast
nik-solcast requested a review from harry-dnv October 20, 2026 05:22
Comment thread docs/pv_power_sites.md Resolved
Comment thread docs/wind_power_sites.md Resolved
Comment thread tests/test_schedules.py Resolved
| Method | Purpose |
|---|---|
| `create_pv_site_measurements` | Submit site measurements. |
| `create_utility_scale_site_measurements` | Submit measured power data for an Advanced PV site. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this name will lead to confusion. It could be taken to mean that the other measurements are not utility scale, whereas in fact they are. That utility-scale endpoint is mainly used for the super_rapid product.

This is a bit of a mess now, because we have to clearly express what is different between create_utility_scale_pv_site_measurements and create_pv_site_measurements, with it not being clear that the latter is for premium.

Also, I think it is unfortunate that we have ended up with repetitive naming, with the same information in the module name and the function name. Compare with forecasts where it is forecast.premium_pv_power, not forecast.premium_pv_power_forecast. I should have picked up on that with previous reviews.

Analogous with that would be

measurement.create_premium_pv
measurement.create_premium_wind
measurement.create_standard_pv <- could be what we call non-premium usage?
measurement.create_premium_pv_sub_site
etc.

That would be a major breaking change. If we are doing that, I think we should more fully plan it out before we proceed. E.g. when we introduce premium aggregations, do their forecasts go under the aggregations module or the forecasts module?

This branch has not been deployed

No deployments
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.

3 participants