Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Change rename function for FileSystem for Windows #8008

Merged
merged 7 commits into from
Jun 4, 2020

Conversation

matthew-larson
Copy link
Contributor

Pull request overview

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • 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

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

@nealkruis nealkruis self-requested a review May 20, 2020 15:40
@nealkruis nealkruis added Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze) labels May 20, 2020
Copy link
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

I'm planning on merging this based on CI's success. If anyone has an issue with the changes, speak up.

// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

// EnergyPlus::DataVectorTypes::Vector Unit Tests
Copy link
Member

Choose a reason for hiding this comment

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

Accidentally left in a comment, no reason to hold this all up for a comment though.

@@ -68,6 +68,7 @@ set( test_src
FanCoilUnits.unit.cc
Fans.unit.cc
FaultsManager.unit.cc
FileSystem.unit.cc
Copy link
Member

Choose a reason for hiding this comment

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

Yet another new unit test file, we've got to be nearly done with new unit test files. 👍

@@ -240,7 +240,12 @@ namespace FileSystem {

void moveFile(std::string const &filePath, std::string const &destination)
{
#ifdef _WIN32
//Note: on Windows, rename function doesn't always replace the existing file so MoveFileExA is used
MoveFileExA(filePath.c_str(), destination.c_str(), MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING);
Copy link
Member

Choose a reason for hiding this comment

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

This seems totally fine. I'm relying on CI a little as I try to avoid building on Windows. CI is super happy with this branch, so I think this is good to go. The only caveat I can find about this function is that it is missing in the Windows Phone ™️ linkages, so if someone is planning on building E+ for embedding in their Windows phone app, we'd need to have a fallback. 😰

Copy link
Contributor

Choose a reason for hiding this comment

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

@Myoldmopar I'll test here.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

Reproduce the problem locally with 9.3.0 release. Confirmed that epmidf and expidf update as expected now from the base idf using this branch. Unit test runs locally. So, all good here.

@mjwitte mjwitte merged commit 03b20ba into NREL:develop Jun 4, 2020
@matthew-larson matthew-larson deleted the fix-cli-expandidf branch June 5, 2020 12:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command line interface does not update RunPeriods between runs.
8 participants