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

Implement import extraction for notebooks in Rust #606

Merged
merged 13 commits into from Mar 18, 2024

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.

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 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
29 checks passed
@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
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.

None yet

2 participants