GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 401 - Add venv command by zymergen-luke · Pull Request #610 · python-poetry/poetry

Conversation

@zymergen-luke

@zymergen-luke zymergen-luke commented Nov 8, 2018

Copy link
Copy Markdown

This makes it easier to programmatically access paths relative to the
virtualenv. A common use case is to activate the virtualenv

source ${poetry venv}/bin/activate

This programmatic access can be used to automate virtualenvs upon cd-ing
into a project or as an alias, for example

#401

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

I'm basing this change on the master branch, as the develop branch appears to be behind master. For example, the MockEnv class does not exist yet on develop, despite existing in master.

I'm just throwing this up here to get this ticket started, but I'm up to alternative ideas about implementation.

A few other thoughts:

  1. Maybe we should have an info command which is like debug:info but returns a single field. e.g. poetry info:venv would return the venv while poetry info:python_version would return the python version.
  2. Or perhaps we merge this with debug:info so that it's something like debug:info:venv (although given that it would become api, I wouldn't like the debug prefix), while debug:info gives you all the info
  3. I could also imagine a command to directly get the activate script. Either returning the path to the script:
    source ${poetry activate}
    or the contents of the activate script:
    eval ${poetry activate}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cs01, seansfkelley, and jgelens reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
zymergen-luke added 2 commits November 8, 2018 09:58
@zymergen-luke
401 - Add venv command
a9881c7
This makes it easier to programmatically access paths relative to the
virtualenv.  A common use case is to activate the virtualenv

    source ${poetry venv}/bin/activate

This programmatic access can be used to automate virtualenvs upon cd-ing
into a project or as an alias, for example
@zymergen-luke
black formatting
9dd481f
@zymergen-luke

zymergen-luke commented Nov 14, 2018

Copy link
Copy Markdown
Author

@sdispater - Can I get your thoughts on this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdispater

sdispater commented Dec 12, 2018

Copy link
Copy Markdown
Member

Thanks for taking the time to make this PR and sorry for not getting back to you sooner.

However, I will close this PR since it is superseded by #731.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdispater sdispater closed this Dec 12, 2018
@zymergen-luke

zymergen-luke commented Dec 13, 2018

Copy link
Copy Markdown
Author

Thanks for getting that feature in!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Mar 1, 2024

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@zymergen-luke @sdispater
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.