dbt-core
dbt-core copied to clipboard
[CT-1067] [Spike] Impact/feasibility checks for `pyproject.toml`
Describe the spike
In order to switch to using pyproject.toml
we need to spike a few impact/feasibility things:
- Will this break things in
dbt-cloud
? I'm specifically concerned about our docker images since I know they're a bit fragile install wise. - Are all of the features we use in
setup.py
supported inpyproject.toml
? Our setuptools setup isn't terribly complex, but there's some uncertainty here (esp in adapter repos re the version checking regex stuff :grimace:)
esp in adapter repos re the version checking regex stuff :grimace:
I'm incredibly open to simplifying this logic, or moving it into bumpversion
logic!
There is this kind of pre-processing going:
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md")) as f:
long_description = f.read()
I don't think this is possible with toml
so this would require some "templating" and moving this to the Makefile stage.
It seems such pre-processing is not needed as the readme
field of the [project]
table support relative file paths. See https://peps.python.org/pep-0621/#readme
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.
I would be happy to help with migrating to poetry if there is interest. Migrating to poetry is pretty easy because it is so structured. Poetry seems to be the winner among all the build tools lately. It is a back compatible change because the build output still meets the PEP standards.
There is this kind of pre-processing going:
this_directory = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_directory, "README.md")) as f: long_description = f.read()
I don't think this is possible with
toml
so this would require some "templating" and moving this to the Makefile stage.
That use case isn't needed if you use poetry. You just specify the README.md. All that manual stuff we used to do ad-hoc in setup.py is structured and standardized.
Bumpversion is not needed either if we use poetry. That functionality is part of the cli. For single sourcing the 'version' in the 'init.py' importlib.metadata can be used.
@DustinMoriarty If you'd be interested in putting together a draft PR of what this could look like — so long as it wouldn't take too much time on your end (knowing this is a spike to prove out feasibility, not a guarantee we'd move forward with it) — I'd definitely be interested in seeing it
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.