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

Add numpy, polars and pandas as extra dependencies #97

Merged
merged 2 commits into from
Oct 1, 2024
Merged

Conversation

dalonsoa
Copy link
Collaborator

@dalonsoa dalonsoa commented Oct 1, 2024

Such that, eventually, the chosen engine can be installed with pip install pycsvy[pandas], for example.

It also removes the optional dependencies for the groups since using poetry directly is meant for developers and they will want, normally, all the dependencies.

Close #90

@@ -32,7 +32,7 @@ jobs:
poetry-version: 1.8.3

- name: Install dependencies
run: poetry install --with dev
run: poetry install
Copy link
Contributor

@dc2917 dc2917 Oct 1, 2024

Choose a reason for hiding this comment

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

So poetry will install optional dependencies ("extras") by default, but if pip-installing, you'd have to specify them explicitly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep. Now, if you do NOT want them, you do, for example, poetry install --without dev, but the default position is install all dependencies. As mentioned above, poetry is for developers, not for end users, and they will typically want all the pedendencies.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not exactly. Poetry installs all groups by default except for extras and those marked as optional. Previously, the dev and docs groups were marked as optional, but this PR changes that

Copy link
Contributor

@AdrianDAlessandro AdrianDAlessandro left a comment

Choose a reason for hiding this comment

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

LGTM! I assume this works with the pip install pycsvy[pandas] notation because it follows the docs. Hard to work out how to test it though.

@dalonsoa
Copy link
Collaborator Author

dalonsoa commented Oct 1, 2024

I guess you can create a wheel with poetry build, then, in a clear, brand new environment - can be a venv one - run pip install path_to_wheel[pandas]. Maybe, haven't tried.

@dalonsoa
Copy link
Collaborator Author

dalonsoa commented Oct 1, 2024

Just checked what I said and it works as planned: python -m pip install .\dist\pycsvy-0.2.2-py3-none-any.whl[pandas] installs pycsvy with pandas.

# Conflicts:
#	poetry.lock
@dalonsoa dalonsoa merged commit 493a282 into develop Oct 1, 2024
5 checks passed
@dalonsoa dalonsoa deleted the extras branch October 1, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable extras for installation
3 participants