Skip to content

Support PySAM on Python 3.14 via nlr-pysam package - #2872

Open
mokazemi wants to merge 1 commit into
pvlib:mainfrom
mokazemi:upgrade-pysam-python314
Open

mokazemi wants to merge 1 commit into
pvlib:mainfrom
mokazemi:upgrade-pysam-python314

Conversation

@mokazemi

@mokazemi mokazemi commented Sep 28, 2026 •

Copy link
Copy Markdown

Changes

  • Updates optional dependency from nrel-pysam to nlr-pysam
  • Uncomment nlr-pysam in Python 3.14 CI requirements
  • PySAM 8.0.0+ is distributed as nlr-pysam for Python 3.8-3.14

Testing

The existing test test_fit_cec_sam shows minor numerical differences when using nlr-pysam 8.0.0+:

  • Adjust parameter: 2.3 → 1.507 (~34% difference)
  • Other parameters within 5% tolerance

This may indicate algorithmic improvements or changes in nlr-pysam and should be reviewed by maintainers familiar with the PySAM library.

Closes #2871

  • Closes Support PySAM on Python 3.14 via the nlr-pysam package name #2871
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

- Update optional dependency from 'nrel-pysam' to 'nlr-pysam'
- Uncomment nlr-pysam in Python 3.14 CI requirements
- PySAM 8.0.0+ is distributed as nlr-pysam for Python 3.8-3.14

Note: test_fit_cec_sam shows minor numerical differences between
nlr-pysam 8.0.0+ and nrel-pysam, particularly in the 'Adjust'
parameter. This may indicate algorithmic changes in the newer
nlr-pysam distribution that needs further investigation.

Fixes pvlib#2871
@github-actions

Copy link
Copy Markdown

Hey @mokazemi! 🎉

Thanks for opening your first pull request! We appreciate your
contribution. Please ensure you have reviewed and understood the
contributing guidelines.

If AI is used for any portion of this PR, you must vet the content
for technical accuracy.

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.

Support PySAM on Python 3.14 via the nlr-pysam package name

1 participant