-
Notifications
You must be signed in to change notification settings - Fork 12
add a components arg to checkout only select components #83
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
Conversation
|
I haven't been following the optional components design discussion, so I'm adding @gold2718 as a reviewer instead of myself. @jedwards4b it appears that many of the system tests are failing. Let me know if you'd like a bit of an orientation to the manage_externals testing, if you haven't used it before. |
|
@billsacks yes, I would appreciate that. I ran them from the command line and all passed. |
|
@billsacks All of these tests fail on master as well. |
|
Sorry that last was incorrect, all tests pass on master and on my branch: |
|
@jedwards4b the issue is that there are other tests besides |
|
@billsacks testing now passes - what's with the coverage check? |
|
Thanks, @jedwards4b . I'm happy with this once @gold2718 gives his okay. @bandre-ucar added an automated code coverage check, which I think checks the coverage of all of the unit and system tests. I guess this is telling us that (much of) the new code isn't covered by any unit or system tests, hence the decrease in code coverage. I guess that, ideally, there would be a test added to cover this new code; I'm fine leaving it to you to determine whether it's worth doing so, based on (a) how critical this code is, and (b) how hard it would be to add tests for it. |
|
someone who knew the format of these tests could do this in no time, but I have to blunder my way through. This is really nicely written and documented code, it's too bad the help desk is so unresponsive. |
|
@jedwards4b great, thanks for adding those tests. |
|
I don't know what I need to do to improve the coverage further. |
|
It seems normal for coverage to vary up or down by small amounts like this, and I think @bandre-ucar has been accepting changes even for small decreases in coverage. So I don't think you need to do anything more. (Aside: I wonder if there's a way to configure coveralls to list it as passing as long as coverage doesn't decrease by more than ~ 1% or so - or maybe just make that informational rather than a failing check.) |
gold2718
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly good but one show stopper for CAM moving forward.
manic/checkout.py
Outdated
|
|
||
| load_all = False | ||
| if args.optional: | ||
| if args.optional or args.components: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that if you use the new interface to specify a component (e.g., cam), this will force CAM to load all of its optional components which is certainly not the correct behavior. Is there a reason this has to be there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - I'll need to think about this a bit.
| source_tree.checkout(args.verbose, load_all) | ||
| if not args.components: | ||
| source_tree.checkout(args.verbose, load_all) | ||
| for comp in args.components: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this does the right thing but I feel adding an else before the loop would clarify that only one of these actions is intended to be taken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I originally had it that way and pylint flagged it as "too many branches."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pylint needs to get a life 👎 (but okay to leave it as is).
manic/externals_description.py
Outdated
|
|
||
| def __init__(self, model_data): | ||
| def __init__(self, model_data, components=None): | ||
| """Convert the xml into a standardized dict that can be used to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are here, aren't we cfg format situation? If so, please fix this comment.
| overall, tree = self.execute_cmd_in_dir(under_test_dir, | ||
| self.status_args) | ||
| self._check_container_component_post_checkout2(overall, tree) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good test but it seems that adding tests is not part of our standard PR template. Still, adding a mention of the new test is a good idea (IMHO).
|
@jedwards4b, will this new feature work if you have a dirty sandbox in an non-involved component? For instance, say components/pop is modified, can still work? |
a72642c to
c1b5b09
Compare
|
@gold2718 I think that I've addressed all of your concerns. Thanks |
2 similar comments
|
The answer to your dirty sandbox question is yes, sandboxes not directly involved in the request are ignored. |
|
@jedwards4b - I have merged this. Ben was making a tag for each merge to master, I think. Any feelings on whether we should continue that practice? |
|
I am fine with fewer tags. |
|
I don't see a strong need for tags. |
Add optional argument to only process components listed on the command line
checkout_externals cam clm
will only process externals associated with the listed components cam and clm.
Also added a test of the new functionality.
User interface changes?: Yes
An additional command line option was added, previous functionality continues to be supported
Fixes: #80
Testing:
test removed:
unit tests: all pass
system tests:
manual testing: Tested with lists of components in Externals.cfg and with ones that were not there.