-
Notifications
You must be signed in to change notification settings - Fork 33
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
Begin implementing the pr-only option. #52
Conversation
b325653
to
ae0c5a1
Compare
I think I'll catch the OpenEmbedded args up at a later date. Next step: add a configureable repo-directory option. |
@@ -19,14 +19,14 @@ def get_random_branch_name(): | |||
|
|||
|
|||
class ros_overlay(repo_instance): | |||
def __init__(self): | |||
def __init__(self, existing_repo=None): |
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.
Is this new argument used?
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 would appear not -- good catch.
superflore/repo_instance.py
Outdated
@@ -19,7 +19,7 @@ | |||
|
|||
|
|||
class repo_instance(object): |
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 class should be RepoInstance
@@ -19,14 +19,14 @@ def get_random_branch_name(): | |||
|
|||
|
|||
class ros_overlay(repo_instance): |
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 class should be CamelCased as well.
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.
Looking at the initialization. Do you really need the inheritance here or can you just have the repo_instance as a member?
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.
That's a good point.
I think I should also move the pull_request
function into RepoInstance
@@ -19,14 +19,14 @@ def get_random_branch_name(): | |||
|
|||
|
|||
class ros_overlay(repo_instance): | |||
def __init__(self): | |||
def __init__(self, existing_repo=None): | |||
# clone repo into a random tmp directory. | |||
repo_instance.__init__(self, 'ros', |
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.
Use super to init the base class. lots of details here: https://stackoverflow.com/questions/576169/understanding-python-super-with-init-methods
eaf1e10
to
d73de45
Compare
@@ -13,7 +13,8 @@ | |||
# limitations under the License. | |||
|
|||
|
|||
from superflore import repo_instance | |||
# TODO(allenh1): remove inheritance like the RosOverlay class. | |||
from superflore import RepoInstance as repo_instance |
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 temporary hacky-fix to avoid breaking things in the OpenEmbedded world. This will be updated when I catch OpenEmbedded up.
…bmitted by dry run.
removed inheritance for the RosOverlay class in favor of having a RepoInstance object.
9d0b840
to
113fd89
Compare
@tfoote rebased on top of master. Ready for review. |
…itance to be a member of the class (see #52).
* Switch to use util functions. * Use the generate_installers function from superflore.generate_installers * Linting * Change the ros_meta class to be RosMeta, as well as changed the inheritance to be a member of the class (see #52). * Removed the sym-linked structure to behave more like the Gentoo generator (see #51). * Removed a commented line from the ebuild logic copypasta, changed the print format slightly for the exception output after a failed pr, and called the file_pr function. * Add temporary file manager code, as suggested by @tfoote. * Switch to utils print functions for TempfileManager output. * Use tempfile manager to clean up temp directories at exit. * Linting. * Remove hard-coded org and repo from RepoInstance call. * Reorder import statements. * Ok, that's pretty cool. * Apply new TempfileManager usage to OpenEmbedded logic. * OpenEmbedded generation is now running. ToDo: automatically clean up the tar files. * Files were not generating in the directory, but are now. * Fixed argument mapping for ebuild generator.
* Switch to use util functions. * Use the generate_installers function from superflore.generate_installers * Linting * Change the ros_meta class to be RosMeta, as well as changed the inheritance to be a member of the class (see ros-infrastructure#52). * Removed the sym-linked structure to behave more like the Gentoo generator (see ros-infrastructure#51). * Removed a commented line from the ebuild logic copypasta, changed the print format slightly for the exception output after a failed pr, and called the file_pr function. * Add temporary file manager code, as suggested by @tfoote. * Switch to utils print functions for TempfileManager output. * Use tempfile manager to clean up temp directories at exit. * Linting. * Remove hard-coded org and repo from RepoInstance call. * Reorder import statements. * Ok, that's pretty cool. * Apply new TempfileManager usage to OpenEmbedded logic. * OpenEmbedded generation is now running. ToDo: automatically clean up the tar files. * Files were not generating in the directory, but are now. * Fixed argument mapping for ebuild generator.
connects to #49