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

[infrastructure] Improve Python build process #496

Merged
merged 94 commits into from May 13, 2024

Conversation

akotlar
Copy link
Collaborator

@akotlar akotlar commented May 11, 2024

  • 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.

@akotlar akotlar changed the title [infrastructure] Improve build process [infrastructure] Improve Python build process May 11, 2024
Comment on lines 222 to 224

# If there is more than 1 column found, our "columns_to_keep" function will not work
if not isinstance(column_to_drop_index, int):
Copy link
Collaborator Author

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!

Copy link
Collaborator

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

Copy link
Collaborator Author

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"
Copy link
Collaborator Author

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.

README.md Outdated Show resolved Hide resolved
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
version = "1.0.0"
version = "1.0.3"
dependencies = [
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah

Copy link
Collaborator

@cristinaetrv cristinaetrv left a 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.

akotlar and others added 2 commits May 13, 2024 17:18
Co-authored-by: cristinaetrv <24943967+cristinaetrv@users.noreply.github.com>
@akotlar akotlar merged commit 8c78f23 into bystrogenomics:master May 13, 2024
9 checks passed
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.

None yet

2 participants