Skip to content

Updating the Published Package

Rose Pearson edited this page Jan 13, 2023 · 19 revisions

geoapis is distributed on PyPI and conda-forge. This page details how to update the published packages.

PyPI

1. Create a conda environment to build for uploading wheels

conda create -n pypi python=3.9 pip
conda activate pypi
python -m pip install build twine

2. Create wheels (in the geoapis root folder)

python -m build
twine check dist/*
  • It can be a good idea to unzip and check the contents are as expected

3. Upload to PyPI test

twine upload -r testpypi dist/*
  • Username and password from Chrome settings passwords
  • View at the listed URL

4. Optional - try install from PyPI test - will likely give a Geopandas error

python -m pip install -i https://test.pypi.org/geoapis

5. Upload to PyPI

twine upload dist/*
  • Username and password from Chrome settings passwords
  • View at the listed URL

These instructions are based off the tutorial

conda-forge

There is already a conda-forge feedstock for geoapis at conda-forge/geoapis-feedstock. See the readme for detailed instructions - some of which are copied below:

  1. Update PyPI geoapis package

  2. Fork feedstock

  3. Update recipe (meta.yml):

    a. Package version

    b. Reset build number to 0

    c. Update SHA256 with latest has from PyPI - go to history

     - click on latest version
    
     - click on options for the tar.gz
    
  4. Push changes to GitHub and open PR

  5. Merge PR when all tests pass

Or read this detailed Conda-Forge maintainers page.

conda-forge first time setup

1. Create a conda environment for creating a recipe from

		conda create -n conda python=3.10
		conda install -c conda-forge grayskull
		conda activate conda

2. Fork staged-recipe (in repository folder) and move into the recipe subfolder

		git clone [email protected]:conda-forge/staged-recipes.git
		cd ..\staged-recipes\recipes

3. Create recipes (in the staged-recipes recipes folder)

		grayskull pypi your_package_name

a. Or b. Release on Github - https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository

grayskull pypi https://github.com/path/to/repository

c. Edit the generated meta.ymal file in the package_name folder based on the example d. Commit and push the meta.ymal file to the fork

4. Create a new pull request & wait for review