PolicyEngine / policyengine-us-data

A package to create representative microdata for PolicyEngine US.
https://policyengine.github.io/policyengine-us-data/
1 stars 2 forks source link

Alter check version action to better mirror behavior under `setup.py` #51

Closed nikhilwoodruff closed 1 month ago

nikhilwoodruff commented 1 month ago

Doesn't seem like there's an obvious solution, but after adding the versioning commit, the check version action fails every time, meaning we can't get all-tick PRs.

anth-volk commented 1 month ago

Here's the problem: The script to generate the changelog consumes the changelog_entry.yaml file, such that on subsequent action runs, it's missing and no longer possible to generate the log. This is because, unlike setup.py, pyproject.toml provides no method of quickly and easily pulling the version number. We'll have to determine a way to easily pull the version without installing the package and/or installing a TOML parser.

MaxGhenis commented 1 month ago

Would it help to go back to setup.py for the time being?

anth-volk commented 1 month ago

Nikhil implemented a workaround for the time being. I think the best thing would be to see if there is a way we can get versioning working, since:

  1. We're going to have to shift everything to pyproject.toml in the future, anyway, as setup.py has become increasingly deprecated. Starting with pip v25, we won't even be able to install editable without extra configuration, if I'm reading the deprecation warnings correctly
  2. Doing so would help inform an existing PR open on core to shift to pyproject.toml
  3. It appears to be the only thing we haven't gotten fully configured when shifting over to pyproject.toml, and I think it'd be a shame to throw out the other 90%
anth-volk commented 1 month ago

That said, I don't think we should move anything else over until this is fixed

nikhilwoodruff commented 1 month ago

Well why don't we just force users to run make changelog in PRs themselves in the time being- seems OK to me.