Skip to content

PySAM Incompatible API Changes & Regenerating PySAM Files

Darice L Guittet edited this page Nov 14, 2024 · 4 revisions

What are PySAM incompatible API changes?

Certain changes to compute modules will cause incompatible API changes for PySAM. This will require a new Major version and will also potentially force users to change their PySAM scripts to handle these new changes if they should update to the new Major version. Therefore, pull requests that will cause these incompatibilities need to be appropriately recorded for documentation and PySAM releasing.

The SSC compute module variable changes that cause incompatible API changes are new required variables, deleted variables and renamed variables. Any new deleted compute modules will also cause incompatible API changes. Code changes within a compute module does not affect the API.

Changes to the Technology-Financial configurations in startup.lk will also cause incompatible API changes, such as renaming a technology or financial model, a new combination of a technology and financial model, or a deletion.

How to check if a Pull Request has them?

You can check your changes in the pull request to see if any of the SSC compute module changes listed above are present.

You can also check the results of the GitHub Actions, which will upload a JSON file of the SSC variable changes. A script is run automatically with every branch. Go to Actions, select a workflow run for your branch, scroll to the Artifact section at the bottom to download "SSC Var & SAM Defaults Diff"

When do the PySAM files need to be regenerated via export_config?

  1. Any PySAM incompatible API changes (the above)
  2. Non-required variables or new outputs variables to compute modules
  3. Changes to documentation of any variables
  4. Any defaults in SAM are changed (the defaults file will need to be regenerated)