Skip to content

Implement import extraction for notebooks in Rust#606

Merged
fpgmaas merged 13 commits intomainfrom
feature/imports-ipynb-rust
Mar 18, 2024
Merged

Implement import extraction for notebooks in Rust#606
fpgmaas merged 13 commits intomainfrom
feature/imports-ipynb-rust

Conversation

@fpgmaas
Copy link
Owner

@fpgmaas fpgmaas commented Mar 16, 2024

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

  • Currently, we extract imports from .py files in Rust, and .ipynb files in Python. This moves the functionality for ipynb files to Rust too.
  • It introduces a src/imports directory, with shared functionality in shared.rs
  • Introduces the use of type aliasses:
    pub type FileToImportsMap = HashMap<String, Vec<Location>>;
    pub type ErrorList = Vec<(String, PyErr)>;
  • Removes the functions get_imports_from_py_file since it was not used.

@codecov
Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.6%. Comparing base (6c73675) to head (818722e).

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #606     +/-   ##
=======================================
- Coverage   90.7%   90.6%   -0.2%     
=======================================
  Files         38      35      -3     
  Lines       1086    1011     -75     
  Branches     224     205     -19     
=======================================
- Hits         986     916     -70     
+ Misses        85      81      -4     
+ Partials      15      14      -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fpgmaas fpgmaas requested a review from mkniewallner March 16, 2024 16:45
@fpgmaas fpgmaas marked this pull request as draft March 18, 2024 15:31
@fpgmaas fpgmaas marked this pull request as ready for review March 18, 2024 16:33
@fpgmaas fpgmaas merged commit b3b1e8e into main Mar 18, 2024
@fpgmaas fpgmaas deleted the feature/imports-ipynb-rust branch March 18, 2024 19:51
mkniewallner added a commit to mkniewallner/deptry that referenced this pull request Mar 24, 2024
mkniewallner added a commit that referenced this pull request Mar 24, 2024
KopalPardasani pushed a commit to KopalPardasani/deptry that referenced this pull request Jan 9, 2026
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.

2 participants