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

Move more shared code into DockerBatchBase #422

Merged
merged 3 commits into from Dec 8, 2023

Conversation

nweires
Copy link
Collaborator

@nweires nweires commented Dec 4, 2023

Pull Request Description

Moves two more sections of code into the parent class to be shared by the AWS and GCP implementations, and adds tests for them. Both are part of the tasks on the cloud that run the building simulations.

  • get_epws_to_download determines which weather files are needed by a particular batch of simulations.
  • run_simulations runs Openstudio, writes the results to the output bucket, and cleans up any intermediate files.

This is purely refactoring and does not change any behavior.

Checklist

Not all may apply

  • Code changes (must work)
  • Tests exercising your feature/bug fix (check coverage report on Checks -> BuildStockBatch Tests -> Artifacts)
  • Coverage has increased or at least not decreased. Update minimum_coverage in .github/workflows/coverage.yml as necessary.
  • All other unit and integration tests passing
  • Update validation for project config yaml file changes
  • Update existing documentation
  • Run a small batch run on Kestrel/Eagle to make sure it all works if you made changes that will affect Kestrel/Eagle
  • Add to the changelog_dev.rst file and propose migration text in the pull request

Copy link

github-actions bot commented Dec 4, 2023

File Coverage
All files 86%
base.py 90%
exc.py 57%
hpc.py 78%
local.py 70%
postprocessing.py 84%
utils.py 91%
cloud/docker_base.py 92%
sampler/base.py 79%
sampler/downselect.py 33%
sampler/precomputed.py 93%
sampler/residential_quota.py 61%
test/shared_testing_stuff.py 85%
test/test_docker.py 33%
test/test_validation.py 97%
workflow_generator/base.py 90%
workflow_generator/commercial.py 53%
workflow_generator/residential_hpxml.py 86%

Minimum allowed coverage is 33%

Generated by 🐒 cobertura-action against d826e51

Copy link
Member

@nmerket nmerket left a comment

Choose a reason for hiding this comment

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

Seems good to me too. Like I said in the other PR, I'd prefer having something in the changelog to track these changes.

@nweires
Copy link
Collaborator Author

nweires commented Dec 4, 2023

Seems good to me too. Like I said in the other PR, I'd prefer having something in the changelog to track these changes.

Sure - just added an update to changelog_dev.rst.

buildstockbatch/cloud/docker_base.py Outdated Show resolved Hide resolved
@nweires nweires requested a review from nmerket December 6, 2023 20:20
def run_simulations(cls, cfg, job_id, jobs_d, sim_dir, fs, bucket, prefix):
def run_simulations(cls, cfg, job_id, jobs_d, sim_dir, fs, output_path):
Copy link
Member

Choose a reason for hiding this comment

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

I like this too. I kind of wish I had done this everywhere and then parsed bucket and prefix out as needed.

@nmerket nmerket merged commit 61e32be into NREL:develop Dec 8, 2023
5 checks passed
@nweires nweires deleted the refactor_aws branch December 11, 2023 15:20
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.

None yet

3 participants