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

Import annotations #132

Merged
merged 20 commits into from
Dec 6, 2021
Merged

Import annotations #132

merged 20 commits into from
Dec 6, 2021

Conversation

chrispyles
Copy link
Contributor

Closes #123

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2021

Codecov Report

Merging #132 (b37b468) into main (af7b80b) will increase coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
+ Coverage   95.29%   95.55%   +0.26%     
==========================================
  Files          30       33       +3     
  Lines        1720     1821     +101     
==========================================
+ Hits         1639     1740     +101     
  Misses         81       81              
Impacted Files Coverage Δ
pybryt/annotations/__init__.py 100.00% <100.00%> (ø)
pybryt/annotations/import_.py 100.00% <100.00%> (ø)
pybryt/execution/__init__.py 100.00% <100.00%> (ø)
pybryt/execution/tracing.py 100.00% <100.00%> (ø)
pybryt/preprocessors/__init__.py 100.00% <100.00%> (ø)
pybryt/preprocessors/abstract_preprocessor.py 100.00% <100.00%> (ø)
pybryt/preprocessors/imports.py 100.00% <100.00%> (ø)
pybryt/preprocessors/intermediate_variables.py 100.00% <100.00%> (ø)

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 af7b80b...b37b468. Read the comment docs.

@chrispyles chrispyles marked this pull request as ready for review December 5, 2021 00:32
leestott
leestott previously approved these changes Dec 6, 2021
Copy link
Contributor

@leestott leestott left a comment

Choose a reason for hiding this comment

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

Import Annotations

Import annotations can be used to either require or forbid the use of specific libraries. When PyBryt executes a notebook, it parses the AST of each code cell to determine any libraries imported in the code. It also captures the modules that any functions or classes it finds belong to when it is tracing through the notebook's code. These are collected into a set of library names, which are included in the memory footprint.

@leestott leestott merged commit 7f810f0 into microsoft:main Dec 6, 2021
@chrispyles chrispyles deleted the import branch January 6, 2022 21:41
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.

Import annotation
3 participants