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

Python wheel building improvements #10466

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dogganon
Copy link
Contributor

@dogganon dogganon commented Apr 13, 2024

Pull request overview

@Myoldmopar

Changes in this PR include:

  • Package Configuration: Replace half-backed setup.py with pyproject.toml for zero-config (almost) wheel building. Under the hood, scikit-build-core is used as the build system for interacting with CMake. Also it's much faster since it tells CMake to use Ninja by default.
  • Package Naming: Rename energyplus to energyplus.core. This converts energyplus to a namespace package, which allows sub-packages released under EnergyPlus's "umbrella" to be included in the namespace. Currently energyplus.core (the Python binding) is the only sub-package available (in this repo); In the future, there should be a energyplus.datasets for auxiliary example IDFs and EPWs. Once we have that clean separation of functionality each package can be installed separately so I imagine the installation would be much more lightweight compared to using installers.
  • Versioning Scheme: Add helper script scripts/dev/versioning.py for PEP 440. Since scikit-build-core is configured to use setuptools_scm for versioning, which in turn uses Git tags, tags are required to follow PEP 440. This should be relatively easy if the project had used a consistent, common versioning scheme. EnergyPlus is obviously not the case (mostly due to unconventional suffixes like "FollowupBuild" and "IOFreeze"). So I included a script versioning.py in scripts/dev/ to (hopefully) make future version tagging easier to get right, i.e. PEP 440 compliant. (Slidenote: CMake should be configured to pull versions from Git as well. Having two separate version-keeping systems is error-prone.)

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@nrel-bot-2c
Copy link

@dogganon @Myoldmopar it has been 28 days since this pull request was last updated.

3 similar comments
@nrel-bot
Copy link

@dogganon @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-2
Copy link

@dogganon @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot
Copy link

@dogganon @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-2b
Copy link

@dogganon @Myoldmopar it has been 29 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@dogganon @Myoldmopar it has been 28 days since this pull request was last updated.

2 similar comments
@nrel-bot-2c
Copy link

@dogganon @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@dogganon @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-2
Copy link

@dogganon it has been 20 days since this pull request was last updated.

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.

6 participants