sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.51k stars 65 forks source link

Package name changes #322

Closed PierreSnell closed 1 year ago

PierreSnell commented 1 year ago

Checklist

Description

Changing the name of the package broke my poetry install :

pyproject.toml

[tool.poetry.group.dev.dependencies]
...
sourcery = {git = "https://github.com/sourcery-ai/sourcery.git"}
...

But now the package name is sourcery-precommit which forced me to change to : (error from poetry is : The dependency name for sourcery does not match the actual package's name: sourcery-precommit)

[tool.poetry.group.dev.dependencies]
...
sourcery-precommit = {git = "https://github.com/sourcery-ai/sourcery.git"}
...

Thanks in advance for any info, Have a great day

ruancomelli commented 1 year ago

Hello, @PierreSnell, thank you for reporting this issue!

Does Sourcery work correctly if you install it from the PyPI package? You can achieve that by adding Sourcery to your development dependencies using:

poetry add --dev sourcery

so that your pyproject.toml file would look like

[tool.poetry.group.dev.dependencies]
...
sourcery = "^1.0.3"
...

The sourcery-precommit package is not expected to be installed directly by users, only by pre-commit.

PierreSnell commented 1 year ago

Hello @ruancomelli, It indeed works with the PyPI way.

I think I wanted something from GitHub last time (or maybe a nightly fix) but PyPI is fine now :) (my bad that I searched and installed the GitHub one)

Thanks for the fast reply! Have a great day.

ruancomelli commented 1 year ago

I'm happy to know that it worked for you! Feel free to reach out in case you have any other issues in the future :smile: