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

load module from pythonpath #755

Merged

Conversation

drmorr0
Copy link
Contributor

@drmorr0 drmorr0 commented Nov 24, 2018

Description

This allows users to specify a skill module to import from your PYTHONPATH, by adding the "module" key to their configuration.yaml.

Fixes #661

Status

READY

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update
  • Documentation (fix or adds documentation)

How Has This Been Tested?

Added new tests, and tested locally.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

Many thanks for this.

It looks like ModuleNotFoundError is a python 3.6+ feature. In opsdroid we support 3.5+. Could you please rework this to support 3.5.

opsdroid/loader.py Outdated Show resolved Hide resolved
opsdroid/loader.py Outdated Show resolved Hide resolved
@drmorr0 drmorr0 force-pushed the drmorr/import_modules_from_python_path branch from 16cd102 to 206c265 Compare November 25, 2018 06:59
@codecov
Copy link

codecov bot commented Nov 25, 2018

Codecov Report

Merging #755 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #755   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          28     28           
  Lines        1843   1847    +4     
=====================================
+ Hits         1843   1847    +4
Impacted Files Coverage Δ
opsdroid/loader.py 100% <100%> (ø) ⬆️

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 d1bb5cb...39b730a. Read the comment docs.

@drmorr0 drmorr0 force-pushed the drmorr/import_modules_from_python_path branch from 206c265 to 39cdba2 Compare November 25, 2018 07:18
@FabioRosado FabioRosado merged commit 7d48803 into opsdroid:master Nov 26, 2018
FabioRosado pushed a commit to FabioRosado/opsdroid that referenced this pull request Dec 18, 2018
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.

Specify modules by Python module name
3 participants