8000 New environment terminal language by jeromefv · Pull Request #18435 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

New environment terminal language #18435

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

Merged
merged 1 commit into from
Sep 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/devel/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ use on a preexisting environment!

A new environment can be set up with ::

python3 -mvenv /path/to/devel/env
python3 -mvenv <file folder location>
Copy link
Member

Choose a reason for hiding this comment

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

I think /path/to/devel/env is pretty clearly a place holder?

Copy link
Member
@story645 story645 Sep 8, 2020

Choose a reason for hiding this comment

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

I don't think so since it's linux specific & I've seen it trip up enough users that I switched to in all my tutorials and the like.

Copy link
Member

Choose a reason for hiding this comment

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

What is linux-specific? The forward slashes?

Copy link
Member

Choose a reason for hiding this comment

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

to be clearer, I've seen folks not recognize it as a placeholder and literally type in /path/to/dev/env

Copy link
Member

Choose a reason for hiding this comment

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

ok? And then it doesn't work because /path doesn't exist (any more than <file folder location> does) and they realize their mistake, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm pretty sure path completion works on both kinds of slashes in both cmd.exe and powershell.

Copy link
Member
@story645 story645 Sep 8, 2020

Choose a reason for hiding this comment

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

I'm pretty sure path completion works on both kinds of slashes in both cmd.exe and powershell.

I just tested it...
ezgif-7-a965b63e1dd2

Copy link
Contributor

Choose a reason for hiding this comment

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

Turns out my memory failed me :/

Copy link
Member
@timhoffm timhoffm Sep 10, 2020

Choose a reason for hiding this comment

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

I agree with @jeromefv and @story645 that we should not unnecessarily assume user knowledge here. IMHO a battle of /path/to/devel/env vs. <file folder location> is somewhat futile. It's an improvement, but marginal compared to the overall issue. The whole section (probably page) assumes too much and lacks motivation, context and explanation.

IMHO it should be something like

Installing Matplotlib for development
-------------------------------------

To decouple Matplotlib development from your working python environment, we
strongly recommend using a dedicated `virtual environment`_ (or alternatively
conda environment).

The virtual environment information is stored in a folder of your choice,
called `<dev env folder>` in the following`. A new environment can be set up
with ::

   python3 -mvenv <dev env folder>

Copy link
Member

Choose a reason for hiding this comment

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

You didn't actually follow @timhoffm 's suggestion to explain what <file folder location> is supposed to mean.


and activated with one of the following::

source /path/to/devel/env/bin/activate # Linux/macOS
/path/to/devel/env/Scripts/activate.bat # Windows cmd.exe
/path/to/devel/env/Scripts/Activate.ps1 # Windows PowerShell
source <file folder location>/bin/activate # Linux/macOS
<file folder location>\Scripts\activate.bat # Windows cmd.exe
<file folder location>\Scripts\Activate.ps1 # Windows PowerShell

Whenever you plan to work on Matplotlib, remember to activate the development
environment in your shell!
Expand Down
0