-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Installation: Create a setup.py file #319
Comments
hi @2320sharon , thanks for putting time to think about this problem. This sounds like a good way to tackle this problem of packaging coastsat.
If you want to push a setup.py file similar to #55 without dependencies, I can test it out from my already-installed |
So I've been working on a prototype coastsat package for a little over a week now and I've got it working and up on PyPi. This package includes the classification models, training_data, and all the coastsat code. The only caveat is that due to the dependency on I ended up choosing to create a pypi package for CoastSat instead of simply creating a If you look at the code on the pypi you will see I changed a few things to have coastsat work in package form. I placed all the code in a directory called |
@kvos what do you think about the idea of a pypi package for coastsat? |
hi @2320sharon (sorry for my late reply), sounds great to make it a pypi package, I will test your coastsat_package repo to see how it works. Thanks! |
No worries @kvos. I know you're very busy and thank you for trying it out. Let me know how it goes. |
hi @2320sharon , I followed the instructions in your
|
@kvos thank you for testing the coastsat package. I'm happy it ran smoothly for you. It does appear that the users still need to install the example notebooks from the GitHub repo since it contains both the notebook and the example data. It might be useful to consider creating a new branch called |
@2320sharon , yes that makes sense. Otherwise if they download the full repo, we risk having multiple copies of the coastsat folder on disk... I'll try creating a new branch with the downloads (excluding coastsat package) and see how it all works out. |
I have to manually update the pypi package for now. But it is possible to use GitHub actions to automatically integrate changes from CoastSat. However, if there are conflicts between coastsat and the coastsat package it will require a manual update to resolve conflicts. |
Hey @2320sharon how close is https://pypi.org/project/coastsat-package/ to primetime? @kvos I'm wondering about the roadmap towards integrating this into coastsat, and also if it would help solve individual installation errors such as #347? (Mostly, I'm just trying to catch up with all the new packages that @2320sharon has made. I'll be testing the new coastseg package today!) I'm happy to be a beta-tester! |
it was working really well when I tested it, great work by @2320sharon. |
@dbuscombe-usgs thank you for reminding me about the coastsat package timeline. I apologize for the late response. Currently, the coastsat package mirrors the structure and content of coastsat very closely. I think the only things that block it from being released for real are:
|
Description
Having a
setup.py file
would make it easier for users to install and update to the latest version of CoastSat. I propose creating a simplesetup.py
file with the non-GDAL dependencies so that CoastSat can be installed with pip from GitHubpip install git+git:https://github.com/kvos/CoastSat.git
. Once thesetup.py
is complete the further work of developing CoastSat into a package with the GDAL dependencies can be worked on.Related Issues
#55 issue: made progress in determining what it would take to create a coastsat package but the biggest obstacle is clearly installing the GDAL binaries on the user's preferred OS. I think we could mirror the approach taken by rasterio where the user has the choice to install the GDAL binaries with pip or install them manually on their OS. We should make it clear this will require users to create a virtual environment with Conda or venv. Creating only the ``setup.py` would not impose a rigid structure on CoastSat while making it much easier for users to install the latest version of CoastSat.
Possible Approach
Divide the development of a package into two phases
pip install git+git:https://github.com/kvos/CoastSat.git
. This first phase would leave the installation of GDAL up to the user and retain the primary way of installing CoastSat usinggit clone
and a conda environment. The second phase would be to create an official PyPi package for CoastSat similar to rasterio that installs the bare minimum GDAL dependencies and leaves any GDAL customization up to the user. rasterio does this.Relevant Resources
I'm open to any feedback or suggestions that would help with the creation of a CoastSat package. If anyone has any experience with creating packages that have GDAL as a dependency any advice would be appreciated.
The text was updated successfully, but these errors were encountered: