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 support for project-specific "default"/"self" configuration #8083

Closed
2 tasks done
BEllis opened this issue Jun 9, 2023 · 5 comments
Closed
2 tasks done

Add support for project-specific "default"/"self" configuration #8083

BEllis opened this issue Jun 9, 2023 · 5 comments
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@BEllis
Copy link

BEllis commented Jun 9, 2023

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

As a developer, I am wanting to have some poetry plugins loaded only for certain projects I have on my development machine and may also want to change other poetry settings between projects (i.e. do or don't create virtual environments).

I propose that poetry will look for a .poetry directory in the current working directory, if present, it will use this over the default system config location. I'd expect POETRY_CONFIG_PATH env var to take precedence over the .poetry

It could be initialized by running a new init self command, something like

poetry self init

Running this command would create a .poetry directory in the current working directory and generate the necessary default files (config.toml, pyproject.toml, poetry.lock)

This would enable me as a developer to do the following,

poetry self init
poetry self add my-poetry-plugin

and by including the .poetry directory in git, it would mean the dependency/usage of a poetry plugin would be automatically picked up by other developers (though they would probably still need to run poetry self install, not sure if this can happen implicitly elsewhere TBD)

@BEllis BEllis added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Jun 9, 2023
BEllis added a commit to BEllis/poetry that referenced this issue Jun 9, 2023
…d in a project .poetry directory and added the 'self init' command.
BEllis added a commit to BEllis/poetry that referenced this issue Jun 9, 2023
…d in a project .poetry directory and added the 'self init' command.
@Secrus
Copy link
Member

Secrus commented Jun 9, 2023

You can have per-project config just by using poetry.toml file. As to per-project plugins (and dev tools), we have #5740, which I am going to be working on after finishing #5509.

BEllis added a commit to BEllis/poetry that referenced this issue Jun 9, 2023
…d in a project .poetry directory and added the 'self init' command.
@BEllis
Copy link
Author

BEllis commented Jun 10, 2023

@Secrus

The project-level pyproject.toml / poetry.toml isn't currently used by self commands as far as I can see?

This feature request is slightly more generalised than #5740

Although the main benefit I want is fulfilled by #5740 this feature feels useful also?

I've raised a draft PR which appears to be working and doing what I've described above.

@Secrus
Copy link
Member

Secrus commented Jun 10, 2023

The PR you prepared is not viable. self namespace is meant as a way to manage the installation of Poetry on your system, not for any kind of per-project commands.

@Secrus
Copy link
Member

Secrus commented Jul 7, 2023

After discussion, core maintainers decided that this request will be rejected.

@Secrus Secrus closed this as not planned Won't fix, can't repro, duplicate, stale Jul 7, 2023
Copy link

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants