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

Move from poetry and just to pixi #595

Merged
merged 112 commits into from
Sep 27, 2024
Merged

Move from poetry and just to pixi #595

merged 112 commits into from
Sep 27, 2024

Conversation

s3alfisc
Copy link
Member

@s3alfisc s3alfisc commented Aug 29, 2024

My fingers itched a bit so I played around with pixi=)

This PR is really just a "proof of concept". It does two things:

  1. Transitions pyfixest from using poetry to using pixi for package management.
  2. Moves several tasks from the just file to pixi tasks.

For me, the environment currently works "as is", but:

  • all packages are installed from conda, which means we will not be able to host on PyPi. We need to explicitly tell pixi to install from PyPi
  • I currently cannot install wildboottest because of a version conflict (?, not sure where this stems from), so the tests fail.
  • In principle, I think that you should be able to type pixi run tests-regular and all dev dependencies will be installed in a "test" env + the unit tests will run.
  • Some other minor things I couldn't figure out, e.g. how I add more than one package author?

@s3alfisc s3alfisc marked this pull request as draft August 29, 2024 20:45
@juanitorduz
Copy link
Contributor

Cool! I'll take a look tomorrow 🚀

Copy link
Contributor

@juanitorduz juanitorduz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some questions

pyproject.toml Outdated
version = "0.24.1"
dependencies = ["lets-plot>=4.0.1"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need the runtime dependencies here? See https://github.com/ericmjl/llamabot/blob/main/pyproject.toml (from the author of https://ericmjl.github.io/blog/2024/8/16/its-time-to-try-out-pixi/). I am not 100% sure about it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets-plot cannot be installed from conda, so I added it via pixi add lets_plot --pypi, which placed it there in the toml. I think (but am not sure) that this is where pixi places all non-conda deps?

.pre-commit-config.yaml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@juanitorduz
Copy link
Contributor

juanitorduz commented Aug 30, 2024

I currently cannot install wildboottes because of a version conflict

Could it be the poetry dependency in https://github.com/py-econometrics/wildboottest/blob/fd72d390f441c9093b9fbb587edb747c17e97953/pyproject.toml#L24-L32 ?

@s3alfisc s3alfisc marked this pull request as ready for review September 1, 2024 07:27
@s3alfisc
Copy link
Member Author

s3alfisc commented Sep 1, 2024

@juanitorduz, I think this is ready now, minus the wildboottest dependency:

pixi add --pypi --feature dev wildboottest==0.3.1

leads to a memory error

@s3alfisc s3alfisc changed the title move to pixi, first commit Move from poetry and just to pixi Sep 1, 2024
pyproject.toml Outdated Show resolved Hide resolved
@juanitorduz
Copy link
Contributor

juanitorduz commented Sep 1, 2024

leads to a memory error

weird 🤔 Does it also happen with a fresh env with Poetry?

Copy link
Contributor

@juanitorduz juanitorduz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just left some small comments and suggestions

.gitattributes Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@juanitorduz
Copy link
Contributor

juanitorduz commented Sep 27, 2024

@s3alfisc I can not install it in my Mac

> pixi shell
  × The current platform does not satisfy the minimal virtual package requirements
  ╰─▶ the project does not support 'osx-arm64'

I think we need to add both mac platforms as in https://github.com/ericmjl/llamabot/blob/main/pyproject.toml#L118

we currently have

platforms = ["linux-64", "win-64"]

We need

platforms = ["osx-arm64", "linux-64", "osx-64", "win-64"]

@s3alfisc
Copy link
Member Author

Thanks @juanitorduz, just added mac support in the last commit

Copy link
Contributor

@juanitorduz juanitorduz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested locally and it the installation works! I also ran pixi run lint and pixi run test and both work as expected!

@s3alfisc
Copy link
Member Author

Perfect, thank you!

@s3alfisc s3alfisc merged commit ea12dd2 into master Sep 27, 2024
9 checks passed
@s3alfisc s3alfisc deleted the pixi branch September 27, 2024 19:46
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.

2 participants