GithubHelp home page GithubHelp logo

Make coastsat into a package about coastsat HOT 16 OPEN

kvos avatar kvos commented on June 11, 2024 4
Make coastsat into a package

from coastsat.

Comments (16)

borgstad avatar borgstad commented on June 11, 2024 2

GDAL cannot be installed via pip on either Windows or Linux, as it needs a precompiled binary.
As things are right now, coastsat can only be installed after the user has setup a conda environment containing gdal and co.

I have nonetheless created a pull request, adding a little bit to the Readme, and a setup.py file.. Atleast it takes the burden away of messing with PYTHONPATH and the location of the coastsat library

from coastsat.

cosstas avatar cosstas commented on June 11, 2024 1

I too believe that coastsat should (additionally) be available via pip. Pre-requisite GDAL binaries can be installed separately from wheels (GDAL) created and maintained by Christoph Gohlke.
For example, rasterio is using a similar installation approach using Binary Distributions.

from coastsat.

cosstas avatar cosstas commented on June 11, 2024 1

Today I found some time to install CoastSat and have a go at it. I copied the sources in my site-packages folder. Earth engine and google api were installed using pypi. The rest were already already installed manually as described before. And that was all, I was able to run the example.
It has been almost a year and there was no update regarding the pypi package. Why is it so important to make CoastSat 100% install-able with pypi? Why can't we let pip install all the pre-requisites by itself and let the user manually install GDAL?

from coastsat.

cosstas avatar cosstas commented on June 11, 2024 1

Haven't published a package myself, but since @borgstad committed #60, I think the maintainer (you:-)) must create an account with PyPI, create a package and upload it. The instructions in this link (https://packaging.python.org/tutorials/packaging-projects/) are straightforward and don't look that demanding. I suppose maintaining both a conda repository and a PyPI package adds some effort to publishing a version.

from coastsat.

ocefpaf avatar ocefpaf commented on June 11, 2024 1

sounds great! will test it out. What happens with the GDAL library though for new users?

It would be nice to re-write the gdal calls with rasterio instead of gdal calls. It would make it more modern, easier to maintain, and there are rasterio wheels available.

from coastsat.

kvos avatar kvos commented on June 11, 2024

that would be great @borgstad and highly appreciated by new users!

I rememeber having some issues when installing the packages with pip, especially the gdal package (which still causes issues #54 ). Are you thinking about something like pip install coastsat?

from coastsat.

borgstad avatar borgstad commented on June 11, 2024

Yes exactly, pip install coastsat.

About the gdal issue: I will look into that and report back my findings. I have previously had problems with gdal and conda/pip.

from coastsat.

kvos avatar kvos commented on June 11, 2024

thanks @borgstad for looking this up and making a PR #60, much appreciated. The only minor change is that I wouldn't call the package CoastSatDHI (or with the name of any organisation, includng mine) as we don't want to do any branding here but just open-source community development.

Since there are still issues with the GDAL package, it's worth having a discussion on what are the possible options to make the installation of coastsat as simple as possible. About half of the issues opened by users are on the installation!

From @cosstas suggestion above we could also run a command to download the GDAL wheels separately and then install with pip.
What about making a package on conda-forge, is that an option as well?

One thing to keep in mind is that structure of coastsat is still evolving and we want to keep it flexible so that users can just pull the changes from github without having to re-install the package each time.

Keen to have current users opinion on this

from coastsat.

borgstad avatar borgstad commented on June 11, 2024

thanks @borgstad for looking this up and making a PR #60, much appreciated. The only minor change is that I wouldn't call the package CoastSatDHI (or with the name of any organisation, includng mine) as we don't want to do any branding here but just open-source community development.

This is definitely an error on my part, I pushed a wrong version, sorry about the confusion, I will updated it as soon as I have time.

Since there are still issues with the GDAL package, it's worth having a discussion on what are the possible options to make the installation of coastsat as simple as possible. About half of the issues opened by users are on the installation!

From @cosstas suggestion above we could also run a command to download the GDAL wheels separately and then install with pip.

Nice suggestion!

from coastsat.

cosstas avatar cosstas commented on June 11, 2024

From @cosstas suggestion above we could also run a command to download the GDAL wheels separately and then install with pip.

I am in favor of recommending to the user of the most favorable way to install GDAL manually on each platform. In my experience, this is the common practice for pypi packages that require GDAL. At least to begin with.

One thing to keep in mind is that structure of coastsat is still evolving and we want to keep it flexible so that users can just pull the changes from github without having to re-install the package each time.

If coastsat is following a release schedule in pypi, (at least for major updates) a simple
pip install --upgrade coastsat
would do. Advanced users can always clone from git for current development.

from coastsat.

vighneshrajendrans avatar vighneshrajendrans commented on June 11, 2024

@kvos coastSat is applicable for island?;downloading images is possible but further steps end with an error

from coastsat.

kvos avatar kvos commented on June 11, 2024

there have been so many issues open because of the installation process that any update that could make the installation easier is more than welcome. What is required to make a pypi package?

from coastsat.

cosstas avatar cosstas commented on June 11, 2024

I am working towards creating a PyPi package. First of all setup.py needs be defined so that pip install can work. @kvos (or anyone else interested) Can you try installing CoastSat from my branch using the following command:
pip install https://github.com/cosstas/CoastSat/archive/v1.1.1-alpha.8.tar.gz
This release is just the current master with setup.py added. Requirements are something to be tweaked by @kvos should the rest of installation procedure works out. GDAL still needs to be already installed.
Any comments or suggestions are welcome.

from coastsat.

kvos avatar kvos commented on June 11, 2024

sounds great! will test it out. What happens with the GDAL library though for new users?

from coastsat.

cosstas avatar cosstas commented on June 11, 2024

I haven't come across an automated solution yet. I guess the user should be directed to take the following steps:

  1. Download an appropriate wheel from Christoph Gohlke's repository: (https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal)
  2. Change directory to where the wheel is downloaded.
  3. pip install <wheel_filename> e.g. pip install GDAL‑3.2.1‑cp37‑cp37m‑win_amd64.whl for Python 3.7 x64 system.

As mentioned before, rasterio is taking a similar approach: (https://github.com/mapbox/rasterio#dependencies). This is meant to be an alternative anyway. The user can always be recommended to take the easiest path through anaconda.

from coastsat.

2320sharon avatar 2320sharon commented on June 11, 2024

Hey all, have there been any updates in the creation of a coastsat package? I'm interested in helping out in any way I can. I see the installation of GDAL seems to be the biggest obstacle.

from coastsat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.