depfinder
depfinder copied to clipboard
add ModuleNotFoundError to catch all possible errors
~~This is required for py311 I guess.~~
Oof. Did the api change or something?
Also, feel free to drop older python versions as you see fit
Codecov Report
Patch coverage has no change and project coverage change: -0.11% :warning:
Comparison is base (
561d5fe) 90.90% compared to head (ef07a0a) 90.80%. Report is 1 commits behind head on main.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@ Coverage Diff @@
## main #96 +/- ##
==========================================
- Coverage 90.90% 90.80% -0.11%
==========================================
Files 7 7
Lines 451 446 -5
==========================================
- Hits 410 405 -5
Misses 41 41
| Files Changed | Coverage Δ | |
|---|---|---|
| depfinder/cli.py | 95.09% <ø> (-0.05%) |
:arrow_down: |
| depfinder/inspection.py | 88.63% <ø> (-0.09%) |
:arrow_down: |
| depfinder/main.py | 95.34% <ø> (-0.06%) |
:arrow_down: |
| depfinder/reports.py | 95.08% <ø> (-0.08%) |
:arrow_down: |
| depfinder/utils.py | 79.06% <0.00%> (-0.48%) |
:arrow_down: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Oof. Did the api change or something?
I'm not even sure why this failed in my tests. According to this it should be OK without it.
Also, feel free to drop older python versions as you see fit
I think that making depfinder >=3.8 is pretty safe at this point. I'll add that change.
I'll fix the CIs tomorrow...
@ericdill this should be ready for a review. I kind of need a new release after it. We are putting together a very hackish way for a jupyter notebook to inspect itself and install the necessary dependencies to run using depfinder.
!pip install ipynbname depfinder --quiet
import subprocess
import sys
def _install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", "--quiet", package])
def _colab_install_missing_deps():
import ipynbname
import depfinder
import importlib
nb_path = ipynbname.path()
deps = depfinder.notebook_path_to_dependencies(nb_path)
for dep in deps["required"]:
if importlib.find_loader(dep) is None:
_install(dep)
_colab_install_missing_deps()
The annoying thing is that ipyname is useless on GoogleColab, the main aim of such a hack :-/
I can review later. Merge and release as you see fit.
We are still tweaking the GoogleColab situation, so we can wait. No rush!