Skip to content

Installation: Create a setup.py file #319

@2320sharon

Description

@2320sharon

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 simple setup.py file with the non-GDAL dependencies so that CoastSat can be installed with pip from GitHub pip install git+git:https://github.com/kvos/CoastSat.git. Once the setup.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

  • The initial development phase would include only the setup.py file that includes the non-GDAL dependencies (eg.NumPy, pandas, etc) so that coastsat would be installable via
    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 using git 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

  1. Older version of a CoastSat setup.py file for reference.
  2. Rasterio
  3. GDAL binaries
  4. How to create a setup.py file guide

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    installationIssue with the installation of the coastsat package

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions