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

DM-42217: Add unit tests for RBTransiNetConfig #23

Merged
merged 1 commit into from Jan 31, 2024
Merged

Conversation

kfindeisen
Copy link
Member

This PR allows RBTransiNetConfig.modelPackageName to be set to either None or the empty string when modelPackageStorageMode == "butler"; previously only None was allowed. Unit tests have been added for all three cases.

@NimSed
Copy link
Contributor

NimSed commented Jan 29, 2024

In practical scenarios, when does RBTransiNetConfig.modelPackageName == "" happen?

@kfindeisen
Copy link
Member Author

kfindeisen commented Jan 29, 2024

It happens if you try to unset modelPackageName in a pipeline YAML:

config:
    modelPackageStorageMode: butler
    modelPackageName: ""

I did that at first (that's how I noticed the behavior!) before moving to a Python config file for the shared-code benefits.

@NimSed
Copy link
Contributor

NimSed commented Jan 29, 2024

I'd like to have @TallJimbo's opinion here, since he was suggesting the user should not be allowed to specify anything at all for modelPackageName in the yaml -- hence the check and the consequent error message. I think "" is also "something".

@NimSed NimSed requested review from TallJimbo and removed request for NimSed January 29, 2024 21:50
@TallJimbo
Copy link
Member

I don't care if you use "" or None as the special value for "empty", and a very slight preference to just pick one and reject the other.

@kfindeisen kfindeisen changed the title DM-42217: Allow "" as the name for Butler model packages DM-42217: Add unit tests for RBTransiNetConfig Jan 30, 2024
@kfindeisen
Copy link
Member Author

Fine -- I still think it's a usability problem, but as I've demonstrated on the other PRs, you can work around it by going through Python. I've descoped this PR to just the unit tests.

@NimSed NimSed requested review from NimSed and removed request for TallJimbo January 30, 2024 20:01
Copy link
Contributor

@NimSed NimSed left a comment

Choose a reason for hiding this comment

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

All looks good.

@kfindeisen kfindeisen merged commit 4daa84c into main Jan 31, 2024
2 checks passed
@kfindeisen kfindeisen deleted the tickets/DM-42217 branch January 31, 2024 19:40
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