Skip to content

#11489 - Transition App Needing Write Access in Install Directory + improve updater#11616

Merged
mitchute merged 6 commits into
developfrom
11489_auxiliary_updater_ubuntu
Jun 5, 2026
Merged

#11489 - Transition App Needing Write Access in Install Directory + improve updater#11616
mitchute merged 6 commits into
developfrom
11489_auxiliary_updater_ubuntu

Conversation

@jmarrec
Copy link
Copy Markdown
Contributor

@jmarrec jmarrec commented Jun 3, 2026

Pull request overview

The changes are mostly on the python utility itself:

Incidentally also fixed the release_mac since I tested a bunch of them on my fork. std::format needs OSX deployment target = 13.3 minimum

Description of the purpose of this PR

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies
  • If adding/removing any output files (e.g., eplustbl.*)
    • Update ..\scripts\Epl-run.bat
    • Update ..\scripts\RunEPlus.bat
    • Update ..\src\EPLaunch\ MainModule.bas, epl-ui.frm, and epl.vbp (VersionComments)
    • Update ...github\workflows\energyplus.py

Reviewer

  • 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

jmarrec added 5 commits June 3, 2026 12:59
…_DEPLOYMENT_TARGET=13.0.

Apple's libc++ marks to_chars for floating-point types (including long double) as unavailable below macOS 13.0 (Ventura). std::format with floating-point arguments internally calls to_chars, so the   whole chain requires 13.0 minimum
  1. Matrix key changed from macos_dev_target to os — cleaner since the OS runner is the stable identifier, with macos_dev_target as a per-include property rather than the primary dimension.
  2. x86-64 deployment target bumped from 12.1 to 13.3 — necessary for std::format with floating-point.
@jmarrec jmarrec self-assigned this Jun 3, 2026
@jmarrec jmarrec added Defect Includes code to repair a defect in EnergyPlus AuxiliaryTool Related to an auxiliary tool, not EnergyPlus itself (readvars, preprocessor, ep-launch, etc.) labels Jun 3, 2026
PKGS = {
"energyplus_launch": "3.7.4",
"energyplus_transition_tools": "2.1.4",
"energyplus_transition_tools": "3.0.0",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bump here

Comment on lines +277 to +302
auto *updaterCLISubCommand = auxiliaryToolsSubcommand->add_subcommand("updater-cli", "IDF Version Updater CLI");
updaterCLISubCommand->allow_extras();
updaterCLISubCommand->footer("You can pass extra arguments after the updater-cli keyword, they will be forwarded to IDF Version Updater.\n"
"To get updater-cli's help, invoke without any arguments.");

updaterCLISubCommand->callback([&state, updaterCLISubCommand] {
EnergyPlus::Python::PythonEngine engine(state);
auto const &fwd_args = updaterCLISubCommand->remaining();

std::string cmd = R"python(import sys
sys.argv = ["energyplus auxiliary updater-cli"]

from energyplus_transition.cli import main
main([)python";
if (fwd_args.empty()) {
cmd += "\"--help\"";
} else {
for (const auto &arg : fwd_args) {
cmd += EnergyPlus::format("\"{}\", ", arg);
}
}
cmd += "])\n";
engine.exec(cmd);
exit(0);
});

Copy link
Copy Markdown
Contributor Author

@jmarrec jmarrec Jun 3, 2026

Choose a reason for hiding this comment

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

New energyplus auxliary updater-cli command

usage: energyplus auxiliary updater-cli [-h] [-e DIR] [-s] [-v] [-p] [-j N] [-t VERSION] IDF_FILE [IDF_FILE ...]                                                                                            
                                                                                                                                                                                                            
Transition EnergyPlus IDF files to a newer version                                                                                                                                                          

positional arguments:
  IDF_FILE              IDF/IMF/lst file(s) to transition

options:
  -h, --help            show this help message and exit
  -e DIR, --eplus-dir DIR
                        EnergyPlus installation directory (auto-detected if omitted)
  -s, --save-intermediate
                        Save intermediate versions during transitioning
  -v, --verbose         Enable verbose output
  -p, --progress        Show a tqdm progress bar
  -j N, --jobs N        Number of parallel workers (default: number of CPUs)
  -t VERSION, --to-version VERSION
                        Stop transitioning at this target version (e.g. 24.2)

Example, with fancy TQDM progress bars:

energyplus auxiliary updater-cli --save-intermediate --progress ~/Downloads/tmp/*.idf
demo_cli

Comment thread CMakeLists.txt
Comment on lines +16 to +22
# Raise an error if attempting to compile on macOS older than 13.3 - it does not work
# 10.15 minimum for std::filesystem, 13.3 minimum for std::format with floating-point (to_chars)
if (APPLE)
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
message(FATAL_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not set. Please set CMAKE_OSX_DEPLOYMENT_TARGET to 10.15 or greater and try again.")
elseif (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.15")
message(FATAL_ERROR "The minimum required version for macOS is 10.15, however CMAKE_OSX_DEPLOYMENT_TARGET is set to ${CMAKE_OSX_DEPLOYMENT_TARGET}.")
message(FATAL_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not set. Please set CMAKE_OSX_DEPLOYMENT_TARGET to 13.3 or greater and try again.")
elseif (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "13.3")
message(FATAL_ERROR "The minimum required version for macOS is 13.3, however CMAKE_OSX_DEPLOYMENT_TARGET is set to ${CMAKE_OSX_DEPLOYMENT_TARGET}.")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fix mac std::format

Comment on lines +32 to +41
os: [macos-15-intel, macos-14]
include:
- macos_dev_target: 12.1
os: macos-15-intel
- os: macos-15-intel
macos_dev_target: 13.3
allow_failure: false
arch: x86_64
python-arch: x64
pretty: "Mac x64"
- macos_dev_target: 14.0
os: macos-14
- os: macos-14
macos_dev_target: 14.0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fix mac

@jmarrec
Copy link
Copy Markdown
Contributor Author

jmarrec commented Jun 3, 2026

Tested on a clean Ubuntu 24.04 with https://github.com/jmarrec/EnergyPlus/releases/tag/v26.2.0-Updater4

@jmarrec jmarrec requested a review from mitchute June 3, 2026 15:08
@mitchute
Copy link
Copy Markdown
Collaborator

mitchute commented Jun 5, 2026

Tested this on Mac using the installer from the link posted above, which is one of the places I was having trouble. I installed via the standard process, which on Mac drops the install into the Applications folder, which is not a writeable location.

To test, I grabbed a random collection of v24.1 files, dropped them into a temporary directory and then bulk-applied the transitions. All transitions completed successfully, but I did not attempt to run the files.

This all looks good to me. Merging.

@mitchute mitchute merged commit 2bf7b0d into develop Jun 5, 2026
11 checks passed
@mitchute mitchute deleted the 11489_auxiliary_updater_ubuntu branch June 5, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AuxiliaryTool Related to an auxiliary tool, not EnergyPlus itself (readvars, preprocessor, ep-launch, etc.) Defect Includes code to repair a defect in EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible Issue with Transition App Needing Write Access in Install Directory

3 participants