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
[infrastructure] Improve Python build process #496
Conversation
akotlar
commented
May 11, 2024
•
edited
edited
- Rely on pyproject.toml instead of requirements.txt
- Update dependencies to ensure that we are compatible with M1+ Macs
- Create CI workflow to build and publish wheels to PyPI on Mac, Linux, and Windows (Windows support is limited and experimental, as noted in INSTALL.md). Mac supports aarch64 and x86_64. Linux is currently x86_64, as is Windows.
|
||
# If there is more than 1 column found, our "columns_to_keep" function will not work | ||
if not isinstance(column_to_drop_index, int): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was needed because get_loc doesn't actually return an int unless the column value being searched is unique. When I updated the pandas stubs, mypy began to complain about this, which is pretty neat, statically preventing errors!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this exists in the prs code anymore, but that is pretty neat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's still there, you renamed it though format_col_index
build-backend = "maturin" | ||
|
||
[project] | ||
name = "bystro" | ||
requires-python = ">=3.10" | ||
requires-python = ">=3.11.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could lower this back to 3.10, but I would argue we shouldn't unless there is a user need: python 3.11 is notably faster than python 3.10, introduces some useful syntax, and is now a year old. Additionally all of our CI is against 3.11, so we haven't actually been testing 3.10.
classifiers = [ | ||
"Programming Language :: Rust", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
version = "1.0.0" | ||
version = "1.0.3" | ||
dependencies = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does moving the dependencies here fix the error where requirements.txt wasn't being automatically installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! The instructions seem more clear and the process more straightforward. I just had one small suggestion for the README but otherwise looks good to go.
Co-authored-by: cristinaetrv <24943967+cristinaetrv@users.noreply.github.com>