-
Notifications
You must be signed in to change notification settings - Fork 153
Depend on python-rtmbot 0.4.0 #24
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 will start testing this out soon. |
Docker is throwing a |
@bboe : I'll send over a patch file soon with the fixes. |
@mikegrima I'm curious why docker is trying to access that directly (I haven't looked at the code). In theory shouldn't it be able to use the version installed on the path by the rtmbot installation? To add, with version 0.4.0, there is a release on pip, so |
bot_components/slack_comm.py
Outdated
@@ -8,7 +8,7 @@ | |||
""" | |||
import json | |||
|
|||
import bot_components | |||
from .. import bot_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.
@bboe I'm having an utter NIGHTMARE with the relative imports. Getting things working with the Duo plugin and the Travis plugin is causing a bunch of havoc.
For example, the following stacktrace results:
File "/hubcommander/plugins/hubcommander.py", line 11, in <module>
from .auth_plugins.enabled_plugins import AUTH_PLUGINS
File "/hubcommander/plugins/auth_plugins/enabled_plugins.py", line 6, in <module>
from auth_plugins.duo.plugin import DuoPlugin
File "/venv/lib/python3.5/site-packages/auth_plugins/duo/plugin.py", line 14, in <module>
from bot_components.slack_comm import send_info, send_error, send_success
File "/venv/lib/python3.5/site-packages/bot_components/slack_comm.py", line 11, in <module>
from .. import bot_components
ValueError: attempted relative import beyond top-level package
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 think some of this might have to do with the semi-strange way these are installed as their own packages by the basic_install.sh
script rather than being all part of one package.
I skipped the pip install
for the package directory and instead relied on them being in the plugins directory for rtmbot in which case the entire directory is treated as a single package.
To make things simpler going forward, I propose this entire project be treated a single package so that it can just be pip install
and then given the proper configuration externally. In the current form this installation process doesn't play nicely with python's method for installing packages and makes it considerably more difficult to get up and running for someone new to the project. Thoughts?
I am more than happy to help this setup be realized.
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.
@bboe : What do you suggest as a solution to this problem?
I'm running the testing inside of the docker image.
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'm not up to speed on the docker side of things, though I would imagine if this project worked like many other python packages, then there should be no need to set up any directory and only providing an rtmbot.conf
that specifies loading the botcommander plugin. Assuming botcommander is properly installed, via pip install botcommand
, for example, then rtmbot will be able to load it.
This, of course, would require a different means for loading in changes to the module as the source files for the package shouldn't be modified. I have some ideas to handle that too (i.e., loading optional modules out of the current working directory).
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.
@bboe : Are you on Gitter? We can discuss this better there.
Are you referring to having a hubcommander
directory within plugins
? I would like to have the imports set up such that they are hubcommander.path.to.whatever
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'll try to whip together an prototype of what you mean so you can take a look.
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.
@bboe : I think I am on the right path now. Making some good progress.
Need to have a plugins/hubcommander
directory, and need to have the imports everywhere be along the lines of: plugins.hubcommander.path.to.whatever
<-- this is how I prefer the imports to be.
And also also modify the rtmbot.conf
file as well.
I'm going to merge this in and add follow-up issues to add the remaining things. |
Resolves #1
I didn't test the
basic_install.sh
script changes because they didn't actually work in the first place.The documentation should specify that a
rtmbot.conf
needs to be created that looks something like: