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

api: reorganize artifact generation API #195

Merged
merged 4 commits into from
Apr 8, 2020

Conversation

kyrofa
Copy link
Member

@kyrofa kyrofa commented Apr 8, 2020

This PR continues the reorganization of #188 by extracting the artifact generation API into its own module.

Note that this introduces no behavioral changes, it's just moving code around.

args.keystore_root_path, args.security_contexts, args.policy_files)
except FileNotFoundError as e:
raise RuntimeError(str(e))
return 0 if success else 1


def _generate_artifacts(keystore_path=None, identity_names=[], policy_files=[]):
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that using lists as default values should probably be fixed in a follow-up.

@kyrofa
Copy link
Member Author

kyrofa commented Apr 8, 2020

@mikaelarguedas you'll notice I'm not using any git tricks on this one, because I don't know any that work when moving code into a file that already exists. Do you?

@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

Merging #195 into master will decrease coverage by 0.41%.
The diff coverage is 9.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #195      +/-   ##
==========================================
- Coverage   55.38%   54.96%   -0.42%     
==========================================
  Files          17       18       +1     
  Lines         585      584       -1     
  Branches       52       52              
==========================================
- Hits          324      321       -3     
- Misses        247      249       +2     
  Partials       14       14              
Flag Coverage Δ
#unittests 54.96% <9.09%> (-0.42%) ⬇️
Impacted Files Coverage Δ
sros2/sros2/api/__init__.py 55.00% <ø> (+22.30%) ⬆️
sros2/sros2/api/_artifact_generation.py 0.00% <0.00%> (ø)
sros2/sros2/verb/generate_artifacts.py 0.00% <0.00%> (ø)
sros2/sros2/api/_utilities.py 86.11% <42.85%> (-4.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b41a2a...6290890. Read the comment docs.

sros2/sros2/verb/generate_artifacts.py Outdated Show resolved Hide resolved
sros2/sros2/verb/generate_artifacts.py Outdated Show resolved Hide resolved
@mikaelarguedas
Copy link
Member

you'll notice I'm not using any git tricks on this one, because I don't know any that work when moving code into a file that already exists. Do you?

That's where my git-fu stops as well. Git is alledgedly able to track such copies using git blame -C but we won't be able to track this through the github blame interface. In that case we'll just have to live with following the change by hand. It's still moved in the same commit so not that hard to track

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
@kyrofa kyrofa force-pushed the feature/api-clean-artifact-generation branch from a8c331f to 31d7b1f Compare April 8, 2020 20:48
@kyrofa kyrofa force-pushed the feature/api-clean-artifact-generation branch from 31d7b1f to 6290890 Compare April 8, 2020 20:53
@kyrofa
Copy link
Member Author

kyrofa commented Apr 8, 2020

Alright this should be ready for another pass.

Copy link
Member

@mikaelarguedas mikaelarguedas left a comment

Choose a reason for hiding this comment

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

looks great!

Copy link

@artivis artivis left a comment

Choose a reason for hiding this comment

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

LGTM.

@kyrofa kyrofa merged commit 1984821 into ros2:master Apr 8, 2020
@kyrofa kyrofa deleted the feature/api-clean-artifact-generation branch April 8, 2020 21:31
@kyrofa kyrofa mentioned this pull request Apr 8, 2020
3 tasks
@mikaelarguedas mikaelarguedas mentioned this pull request Jun 5, 2020
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.

3 participants