dbt-core icon indicating copy to clipboard operation
dbt-core copied to clipboard

[CT-1067] [Spike] Impact/feasibility checks for `pyproject.toml`

Open iknox-fa opened this issue 2 years ago • 8 comments

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 in pyproject.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:)

iknox-fa avatar Aug 22 '22 16:08 iknox-fa

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!

jtcohen6 avatar Aug 22 '22 16:08 jtcohen6

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.

bbroeksema avatar Sep 06 '22 10:09 bbroeksema

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

babaMar avatar Sep 06 '22 13:09 babaMar

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.

github-actions[bot] avatar Mar 06 '23 02:03 github-actions[bot]

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.

DustinMoriarty avatar Jun 30 '23 00:06 DustinMoriarty

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 avatar Jun 30 '23 01:06 DustinMoriarty

@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

jtcohen6 avatar Jun 30 '23 12:06 jtcohen6

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.

github-actions[bot] avatar Feb 23 '24 01:02 github-actions[bot]