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

Fix version check #342

Merged
merged 3 commits into from Jan 31, 2023
Merged

Fix version check #342

merged 3 commits into from Jan 31, 2023

Conversation

nmerket
Copy link
Member

@nmerket nmerket commented Jan 30, 2023

Fixes #328.

Pull Request Description

Checks versions instead of the dict type. Adds test and rearranges resstock_required condition so it can be used across the testing suite.

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/ci.yml as necessary.
  • All other unit tests passing
  • Update validation for project config yaml file changes
  • Update existing documentation
  • Run a small batch run to make sure it all works (local is fine, unless an Eagle specific feature)
  • Add to the changelog_dev.rst file and propose migration text in the pull request

@nmerket nmerket changed the base branch from develop to release_2022.01.0 January 30, 2023 18:42
@github-actions
Copy link

File Coverage
All files 86%
base.py 89%
eagle.py 74%
exc.py 57%
localdocker.py 63%
postprocessing.py 85%
utils.py 96%
sampler/base.py 79%
sampler/downselect.py 33%
sampler/precomputed.py 93%
sampler/residential_quota.py 83%
test/test_validation.py 97%
workflow_generator/base.py 90%
workflow_generator/commercial.py 53%
workflow_generator/residential.py 96%
workflow_generator/residential_hpxml.py 69%

Minimum allowed coverage is 33%

Generated by 🐒 cobertura-action against 92927e7

@resstock_required
def test_validate_resstock_or_comstock_version(mocker):
# Set the version to a 'really old' one so we trigger the version check error
mocker.patch("buildstockbatch.base.bsb_version", "0.1")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice idea for a test here. So this checks that latest resstock, when trying to use buildstockbatch v0.1, triggers a version validation error (i.e., latest resstock requires a version of buildstockbatch much more recent).

@nmerket nmerket merged commit 00f2c43 into release_2023.01.0 Jan 31, 2023
@nmerket nmerket deleted the fix_version_check branch January 31, 2023 21:13
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.

Bug in validate_resstock_or_comstock_version method
2 participants