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
build: switch from setup.py to pyproject.toml #1978
base: master
Are you sure you want to change the base?
Conversation
@@ -14,8 +14,7 @@ docs: | |||
mkdocs serve | |||
|
|||
pypi: | |||
python setup.py sdist | |||
python setup.py bdist_wheel --universal | |||
python -m build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have overseen this command in the Makefile before.
The pypi command used the deleted setup.py file, which lead to an error.
I added python -m build
instead, which uses the new recommended build tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaken, using build
would require a new pipeline which complicates my process to push it to pypi. Instead, I would suggest following the scikit-lego approach such that the original pipeline would remain intact.
What do you think? |
Thanks for the PR and the ping! There are several PRs/issues/discussions open that require my attention so it might take a while before I can explore this PR. |
Of course, sorry. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of questions/suggestions that we can go over to make sure the general flow of installation remains the same.
requires = ["hatchling"] | ||
build-backend = "hatchling.build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be setuptools if we are indeed going back to the original approach of pushing to pypi.
|
||
[project] | ||
name = "bertopic" | ||
dynamic = ["version"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer an explicit version akin to:
version = "0.16.2"
dynamic = ["version"] | ||
description = "BERTopic performs topic Modeling with state-of-the-art transformer models." | ||
readme = "README.md" | ||
license = {text = "MIT"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license = {text = "MIT"} | |
license = {file = "LICENSE"} |
[project.urls] | ||
Documentation = "https://maartengr.github.io/BERTopic/" | ||
Homepage = "https://github.com/MaartenGr/BERTopic" | ||
"Issue Tracker" = "https://github.com/MaartenGr/BERTopic/issues" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Issue Tracker" = "https://github.com/MaartenGr/BERTopic/issues" | |
Issues = "https://github.com/MaartenGr/BERTopic/issues" |
Documentation = "https://maartengr.github.io/BERTopic/" | ||
Homepage = "https://github.com/MaartenGr/BERTopic" | ||
"Issue Tracker" = "https://github.com/MaartenGr/BERTopic/issues" | ||
"Source Code" = "https://github.com/MaartenGr/BERTopic/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Source Code" = "https://github.com/MaartenGr/BERTopic/" | |
Repository = "https://github.com/MaartenGr/BERTopic.git" |
[tool.hatch.build.targets.sdist] | ||
include = [ | ||
"/bertopic", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If setuptools, something like this:
[tool.setuptools.packages.find]
include = ["bertopic*"]
exclude = [
"docs",
"images",
"notebooks",
"tests",
]
I will adapt soon. |
See #1969