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

Add configurable python target to check-python #238

Merged
merged 6 commits into from
Jan 11, 2022

Conversation

fcollonval
Copy link
Member

@fcollonval fcollonval commented Jan 10, 2022

Fixes #237 by allowing to define a Python target to be checked through python -c "import <target>" instead of using the package name.

This can be done through a new cli option --check-imports or the env variable RH_CHECK_IMPORTS.

@fcollonval
Copy link
Member Author

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2022

Codecov Report

Merging #238 (8cfbd40) into main (642d724) will decrease coverage by 0.03%.
The diff coverage is 85.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #238      +/-   ##
==========================================
- Coverage   85.13%   85.09%   -0.04%     
==========================================
  Files          19       19              
  Lines        2307     2335      +28     
  Branches      298      302       +4     
==========================================
+ Hits         1964     1987      +23     
- Misses        246      251       +5     
  Partials       97       97              
Impacted Files Coverage Δ
jupyter_releaser/python.py 79.48% <60.00%> (-4.10%) ⬇️
jupyter_releaser/cli.py 91.36% <100.00%> (+0.06%) ⬆️
jupyter_releaser/tests/conftest.py 98.57% <100.00%> (+0.03%) ⬆️
jupyter_releaser/tests/test_cli.py 99.04% <100.00%> (+0.01%) ⬆️
jupyter_releaser/tests/util.py 99.24% <100.00%> (+0.02%) ⬆️

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 642d724...8cfbd40. Read the comment docs.

@jtpio jtpio added the bug Something isn't working label Jan 10, 2022
@blink1073
Copy link
Contributor

Perhaps instead we should offer an array of imports, similar to conda-forge recipes?

@fcollonval
Copy link
Member Author

I change the PR to be able to pass a list of --check-imports.

@blink1073 blink1073 added the enhancement New feature or request label Jan 11, 2022
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@blink1073 blink1073 merged commit 86dc7d7 into jupyter-server:main Jan 11, 2022
@fcollonval fcollonval deleted the fix/python-target branch January 12, 2022 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

check-python does not support package name not being importable
4 participants