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

potential for uv or pixi/conda support? #142

Open
1 of 2 tasks
gregorywaynepower opened this issue Aug 21, 2024 · 7 comments
Open
1 of 2 tasks

potential for uv or pixi/conda support? #142

gregorywaynepower opened this issue Aug 21, 2024 · 7 comments
Labels
QoL Quality of Life

Comments

@gregorywaynepower
Copy link

gregorywaynepower commented Aug 21, 2024

I've really enjoyed working with your package and it really is fantastic.

Do you think you'll be able to support uv or adding this to conda-forge's feedstock so conda or pixi users could install your package in a more isolated manner?

  • Support for uv: Just use uv tool install QuackOSM[cli] --prerelease=allow
  • Support for conda-forge through conda-forge's feedstock
@RaczeQ
Copy link
Collaborator

RaczeQ commented Aug 24, 2024

Hi @gregorywaynepower, thank you for this suggestion!
I have to admit that I have never tried publishing any library outside of PyPI, so I'm not familiar with the process, but I might take a shot and try publishing them there.

@RaczeQ RaczeQ added the QoL Quality of Life label Aug 24, 2024
@RaczeQ
Copy link
Collaborator

RaczeQ commented Aug 26, 2024

I've checked the uv support and it looks like it pulls the data from the PyPI repository, so it works out of the box:

/mnt/c/Development/Python/uv-test$ uv add QuackOSM
Using Python 3.10.13 interpreter at: /usr/bin/python3.10
Removed virtual environment at: .venv
Creating virtualenv at: .venv
Resolved 42 packages in 2.67s
   Built uv-test @ file:///mnt/c/Development/Python/uv-test
   Built pyarrow-ops==0.0.8
Prepared 39 packages in 24.84s
░░░░░░░░░░░░░░░░░░░░ [0/39] Installing wheels...                                                                                                warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 39 packages in 13.79s
 + beautifulsoup4==4.12.3
 + certifi==2024.7.4
 + charset-normalizer==3.3.2
 + duckdb==1.0.0
 + geoarrow-c==0.1.2
 + geoarrow-pandas==0.1.1
 + geoarrow-pyarrow==0.1.2
 + geoarrow-rust-core==0.2.0
 + geopandas==1.0.1
 + idna==3.8
 + markdown-it-py==3.0.0
 + mdurl==0.1.2
 + numpy==2.0.1
 + packaging==24.1
 + pandas==2.2.2
 + platformdirs==4.2.2
 + polars==1.5.0
 + pooch==1.8.2
 + psutil==6.0.0
 + pyarrow==17.0.0
 + pyarrow-hotfix==0.6
 + pyarrow-ops==0.0.8
 + pygments==2.18.0
 + pyogrio==0.9.0
 + pyproj==3.6.1
 + python-dateutil==2.9.0.post0
 + pytz==2024.1
 + quackosm==0.9.0
 + requests==2.32.3
 + rich==13.7.1
 + shapely==2.0.6
 + six==1.16.0
 + soupsieve==2.6
 + tqdm==4.66.5
 + typeguard==4.3.0
 + typing-extensions==4.12.2
 + tzdata==2024.1
 + urllib3==2.2.2
 + uv-test==0.1.0 (from file:///mnt/c/Development/Python/uv-test)

@gregorywaynepower
Copy link
Author

gregorywaynepower commented Aug 26, 2024

Good to see that quackosm itself installs on Windows via uv tool install quackosm! I haven't the same amount of luck with uv tool install quackosm[cli]

I've also tried the methods of adding this to an initialized project and I got similar results. uv add quackosm succeeds while uv add quackosm[cli] produces the following error:

uv_error_log.txt

@RaczeQ
Copy link
Collaborator

RaczeQ commented Aug 26, 2024

It seems like an error with the DuckDB wheels. I can also see that it's probably trying to install an older version of QuackOSM, because now minimal DuckDB version is 0.10.2 (since 0.6.1). Maybe trying to install a newer version will work?

I tried to run uv with the cli extras on Ubuntu WSL machine (have to use --prerelease=allow, because of h3 dependency):

/mnt/c/Development/Python/uv-test$ uv add QuackOSM[cli] --prerelease=allow
Ignoring existing lockfile due to change in pre-release mode: `if-necessary-or-explicit` vs. `allow`
Resolved 52 packages in 1.49s
warning: The package `typer==0.12.5` does not have an extra named `all`
   Built uv-test @ file:///mnt/c/Development/Python/uv-test
   Built python-geohash==0.8.5
Prepared 16 packages in 7.88s
Uninstalled 6 packages in 3.92s
░░░░░░░░░░░░░░░░░░░░ [0/16] Installing wheels...                                                                                                                                            warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 16 packages in 6.19s
 - beautifulsoup4==4.12.3
 + beautifulsoup4==4.13.0b2
 + click==8.1.7
 - duckdb==1.0.0
 + duckdb==1.0.1.dev4693
 + future==1.0.0
 - geoarrow-rust-core==0.2.0
 + geoarrow-rust-core==0.3.0a1
 + geographiclib==2.0
 + geopy==2.4.1
 + h3==4.0.0b5
 - numpy==2.0.1
 + numpy==2.0.2
 + python-geohash==0.8.5
 - rich==13.7.1
 + rich==13.8.0
 + s2==0.1.9
 + s2sphere==0.2.5
 + shellingham==1.5.4
 + typer==0.12.5
 ~ uv-test==0.1.0 (from file:///mnt/c/Development/Python/uv-test)

@gregorywaynepower
Copy link
Author

Fantastic! I'm able to install this on natively Windows with uv tool install QuackOSM[cli] --prerelease=allow on Windows too!

Want me to keep this open for the conda-forge portion?

@RaczeQ
Copy link
Collaborator

RaczeQ commented Aug 27, 2024

Yeah, let's leave it open for the conda-forge part. I'm happy that uv works on your end. And thanks again for raising this issue, since I'm not the conda user myself 😉

@gregorywaynepower
Copy link
Author

No worries! A lot of ESRI users are conda users since that's how they manage Python environments--that's my main reason for seeking conda support for folks.

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

No branches or pull requests

2 participants