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

Implement the component #2

Closed
20 tasks done
mdpiper opened this issue Mar 31, 2021 · 4 comments
Closed
20 tasks done

Implement the component #2

mdpiper opened this issue Mar 31, 2021 · 4 comments

Comments

@mdpiper
Copy link
Member

mdpiper commented Mar 31, 2021

I'd like to make the planning and development of this project as open and as public as possible. GitHub provides a good place for this.

Project planning is described in #1. This is a record of what I actually did.

Tasks

  • Create GitHub repository (csdms/bmi-geotiff) with README and license
  • Make directories: bmi_geotiff, tests, examples, docs
  • Collect build files (copy from bmi-topography and tailor, using PyPA guidelines)
    • pyproject.toml
    • setup.cfg (include flake8 and zest.releaser config because they don't yet work in pyproject.toml)
    • Makefile
    • environment.yaml
    • autogenerate a setup.py file through my Makefile
  • Set up package definition file and iteratively write library (io.py) and tests (test_io.py)
    • make test
    • make pretty
  • Make example for library
  • BMI the library (bmi.py)
    • generate skeleton with bmipy-render
    • fill in the methods of BmiGeoTiff
    • make a config file (place in examples and link in tests/data)
    • test iteratively with bmi-tester (make bmi-test)
  • Make example for BMI
  • Add content to README
    • overview -- uses experimental xarray.open_rasterio
    • install instructions
    • example(s)
    • acknowledgment
  • Add package metadata files (copy from bmi-topography and modify)
    • CHANGES.md
    • CONTRIBUTING.md
    • use setuptools-scm to include files in the sdist instead of using a MANIFEST.in file
  • Generate distribution archives (make build)
    • check content in the dist directory
    • test upload to test.pypi.org (make testpypi)
  • Create v0.1 release with zest.releaser (make fullrelease)
    • upload to PyPI
  • Write documentation
    • run sphinx-quickstart from the docs directory
    • include README
    • build API docs
    • automate versioning for docs
    • deploy to Read the Docs
      • use .readthedocs.yaml
  • Format and lint (make pretty and make lint)
  • CI with GitHub Actions
    • build and test
    • format
    • lint
    • build docs
  • Create v0.2 release and upload to PyPI
  • Make a conda-forge package
    • use PyPI for source tarball instead of GitHub
  • Add a DOI through Zenodo
    • turn repo "on" in Zenodo
    • make a release from a tag on GitHub
    • edit title and license on Zenodo
    • make a CITATION document
  • Babelize
  • Make a pymt package (pymt_geotiff)
    • add component metadata
    • include script and notebook examples
    • create brief documentation (including notebook)
    • deploy docs to Read the Docs (use .readthedocs.yaml)
    • make a conda-forge package
  • Add to CSDMS Model Repository (this will populate Data Components page)
@mdpiper
Copy link
Member Author

mdpiper commented Apr 2, 2021

It's tricky to get the crs using get_value:

>>> var_name = "coordinate_reference_system__string"
>>> nbytes = bmi.get_var_nbytes(var_name)
>>> dest = np.ndarray((1,), dtype="U{}".format(nbytes))
>>> r = bmi.get_value(var_name, dest)

>>> print(r)
['+init=epsg:32618']

>>> print(dest)
['+init=epsg:32618']

@mdpiper
Copy link
Member Author

mdpiper commented Apr 16, 2021

matplotlib,pyplot.imshow can display an RGB image, but it needs band sequential ordering:

rasterBSQ = np.transpose(rasterRGB, axes=[1, 2, 0])
plt.imshow(rasterBSQ)

@mdpiper
Copy link
Member Author

mdpiper commented Apr 22, 2021

I'm using setuptools-scm to include repository files outside the package, like Makefile, CHANGES.md, etc. It conflicts slightly with zest.releaser, which shows a dirty repository when running fullrelease:

INFO: Starting release.
Tag needed to proceed, you can use the following command:
git tag v0.2.dev5+ged6292c -m 'Tagging 0.2.dev5+ged6292c'
Run this command (Y/n)? n

The workaround is to tag the repo before running fullrelease:

$ git tag v0.2 -m 'Tagging 0.2'

@mdpiper
Copy link
Member Author

mdpiper commented Apr 26, 2021

Release text (using v0.2 tag):

CSDMS GeoTIFF data component

The public release of the GeoTIFF data component, with examples, CI, docs, and installation through pip and conda.

@mdpiper mdpiper pinned this issue Nov 1, 2021
@mdpiper mdpiper changed the title Implementing the component Implement the component Nov 1, 2021
@mdpiper mdpiper closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant