Skip to content
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

Poetry+Hatch Monorepo #1002

Merged
merged 26 commits into from
Jun 3, 2023
Merged

Poetry+Hatch Monorepo #1002

merged 26 commits into from
Jun 3, 2023

Conversation

rmorshea
Copy link
Collaborator

@rmorshea rmorshea commented May 29, 2023

This will set up the project so it can host multiple Python packages. This is in preparation for a future reactpy-build package.

Also will introduce Hatch and Poetry for managing Python projects

Closes: #964
Closes: #1002

@rmorshea rmorshea changed the title re-organize dirs + start using hatch Poetry+Hatch Monorepo May 29, 2023
@rmorshea rmorshea force-pushed the hatch-poetry branch 2 times, most recently from a50eb4f to 09ca3b0 Compare May 31, 2023 06:09
@rmorshea rmorshea force-pushed the hatch-poetry branch 2 times, most recently from 4c4b6ca to b153430 Compare June 1, 2023 08:16
@rmorshea
Copy link
Collaborator Author

rmorshea commented Jun 1, 2023

@Archmonger I need help debugging hatch-build-scripts on windows. I can't seem to figure out what's going wrong just from CI in this PR or this one in.

@Archmonger
Copy link
Contributor

I hopefully can look at this tomorrow. Motherboard just died, my new board arrived today.

Will be installing it tomorrow 🤞

@Archmonger
Copy link
Contributor

Archmonger commented Jun 1, 2023

I just looked at the exception stack in that other PR.

This is actually a very common gotcha. Windows uses backslashes for directory paths, while Linux uses forward slashes.

To fix this, you'll need to remove any hard coded paths in the tests and use the OS-aware pathlib.Path instead. If you need string representations then call str on the Path instance.

@rmorshea
Copy link
Collaborator Author

rmorshea commented Jun 1, 2023

Clearly I'm doing something wrong there, but I don't see where in hatch-build-scripts since I'm using pathlib. I kind of just want to see where the files end up when you try and install on windows.

@rmorshea rmorshea force-pushed the hatch-poetry branch 5 times, most recently from fb08570 to 531f0c4 Compare June 3, 2023 18:18
@rmorshea rmorshea force-pushed the hatch-poetry branch 2 times, most recently from e967806 to 8c6b022 Compare June 3, 2023 18:31
@rmorshea
Copy link
Collaborator Author

rmorshea commented Jun 3, 2023

Ok, turns out it wasn't an issue with hatch-build-scripts (though the fact it wasn't raising is a problem). Somehow, by setting registry-url in the setup-node GH action it expects there to be a NODE_AUTH_TOKEN env var available. The env var is set when running hatch, but for some reason hatch seems to scrub all the environment variables when running build hooks (at least that's what it seems like).

@rmorshea rmorshea marked this pull request as ready for review June 3, 2023 21:29
@rmorshea rmorshea merged commit ac58266 into reactive-python:main Jun 3, 2023
17 checks passed
@ofek
Copy link

ofek commented Jun 3, 2023

but for some reason hatch seems to scrub all the environment variables when running build hooks (at least that's what it seems like)

It does not actually

@rmorshea
Copy link
Collaborator Author

rmorshea commented Jun 3, 2023

This could very well be some interaction between hatch / invoke / GH actions. Now that I'm thinking about it, if invoke doesn't pass on environment variables, that may actually be the culprit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use poetry to pin docs dependencies
3 participants