Skip to content

Comments

Enhance verbosity env info#104

Open
mariam851 wants to merge 2 commits intorasbt:masterfrom
mariam851:enhance-verbosity-env-info
Open

Enhance verbosity env info#104
mariam851 wants to merge 2 commits intorasbt:masterfrom
mariam851:enhance-verbosity-env-info

Conversation

@mariam851
Copy link
Contributor

This pull request builds upon the original discussion in Issue #6 by extending
the existing -v / --python flag to support multiple verbosity levels for
reporting Python environment information.

Rather than introducing additional single-letter flags, this approach preserves
the simplicity of the interface while allowing users to progressively inspect
their execution environment — from basic interpreter information to package
managers (pip/conda) and the full Python executable path.

This enhancement is particularly useful for:

  • Ensuring experiment reproducibility in research notebooks
  • Documenting execution environments in academic and industrial workflows
  • Providing transparent system context in shared or archived notebooks

The implementation is fully backward-compatible: existing usage of -v behaves
as before, while higher verbosity levels enable richer diagnostics when needed.

Thank you for maintaining such a widely used and thoughtfully designed project.
I appreciate the clarity of the original discussion and hope this contribution
aligns well with the project’s long-term direction.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@rasbt
Copy link
Owner

rasbt commented Dec 14, 2025

Thanks for the PR. Could you show with a before/after a simple example of what it changes? Also I see there are lots of Untitled.ipynb files in this PR. I don't think they should be there.

@mariam851
Copy link
Contributor Author

Thanks for the PR. Could you show with a before/after a simple example of what it changes? Also I see there are lots of Untitled.ipynb files in this PR. I don't think they should be there.

Hi @rasbt,

Thank you for your patience. I have updated the PR to address your feedback:

Code Cleanup: I have removed the Untitled.ipynb files. They were accidentally included during local testing in Jupyter, and I've now cleaned the branch to include only the necessary changes in watermark.py and magic.py.

Implementation Change: I've updated the logic to use action='count' for the -v/--python flag, allowing for progressive verbosity levels as we discussed.

Before/After Example:

Current (-v): Shows basic Python and IPython versions.

Enhanced (-vv): Now adds the full Python executable path, which is very helpful for identifying the active environment.

Screenshot (13)

@rasbt
Copy link
Owner

rasbt commented Dec 20, 2025

Thanks! I think the notebook files are still there though 😅

@mariam851 mariam851 force-pushed the enhance-verbosity-env-info branch from 8c85498 to 7d679a6 Compare December 21, 2025 01:10
@mariam851 mariam851 force-pushed the enhance-verbosity-env-info branch from 7d679a6 to 659fab5 Compare December 21, 2025 01:50
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