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

Update docs build #68

Merged
merged 8 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 0.8.4 (unreleased)

- Set minimum python>=3.10 (#67)
- Link to project contributing and code of conduct docs (#65)


Expand Down
1 change: 1 addition & 0 deletions docs/source/requirements.txt → docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx
recommonmark
pandoc
146 changes: 146 additions & 0 deletions docs/source/CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
Changes for bmi-topography
==========================

0.8.4 (unreleased)
------------------

- Set minimum python>=3.10 (#67)
- Link to project contributing and code of conduct docs (#65)

0.8.3 (2023-12-18)
------------------

- Build and test with Python 3.12 (#60)
- Remove setuptools files in favor of pyproject.toml (#59)
- Fix failing docs build (#58)
- Use nox in CI testing (#54)

.. _section-1:

0.8.2 (2023-02-06)
------------------

- Fix problem getting CRS info for AAIGrid type (#53)

.. _section-2:

0.8.1 (2023-01-27)
------------------

- Run test CI on Windows with Python 3.10 (#52)
- Use nox instead of make for building and testing project (#51)
- Update project metadata files (#50)
- Use rio accessor for geospatial information (#47)
- Update contents of source and binary distributions (#46)

.. _section-3:

0.8 (2022-07-05)
----------------

- Switch from xarray to rioxarray (#45)
- Move metadata from setup.cfg to pyproject.toml (#44)

.. _section-4:

0.7.1 (2022-06-03)
------------------

- Provide a better reason for 401 errors (#41)

.. _section-5:

0.7 (2022-03-24)
----------------

- Support all OpenTopography global datasets (#39)
- Create test matrix of datasets and file types (#38)

.. _section-6:

0.6 (2022-02-17)
----------------

- Use dashes in command line options (#36)
- Use a demo API key if a user key can’t be found (#34)

.. _section-7:

0.5.1 (2022-02-15)
------------------

- Document use of OpenTopography API key (#33)
- Add text to exception raised when API key is missing (#32)
- Use new black syntax (#31)

.. _section-8:

0.5 (2022-01-25)
----------------

- Use an API key when requesting OpenTopography data (#25)
- Add python 3.10 to tests (#24)
- Address technical debt (#22)

.. _section-9:

0.4 (2021-09-03)
----------------

- Support ALOS World 3D 30m products (#13)
- Support .asc and .img files (#14)
- Add format job to CI
- Use CITATION.cff file

.. _section-10:

0.3.2 (2021-04-23)
------------------

- Add citation recommendation with DOI
- Fix typos, update text in example notebooks
- Create CREDITS.md and rearrange docs

.. _section-11:

0.3.1 (2021-03-04)
------------------

- Install with conda
- Include shell script demonstrating CLI

.. _section-12:

0.3 (2021-02-25)
----------------

- Update README with overview and install instructions
- Write documentation

.. _section-13:

0.2 (2021-02-24)
----------------

- Implement BMI for Topography class from template generated by
``bmipy-render``
- Include sample config file and Jupyter Notebook to demo BMI
- Add CI with GitHub Actions

.. _section-14:

0.1.1 (2021-02-22)
------------------

- Add Makefile rule to test upload to TestPyPI
- Test upload to TestPyPI

.. _section-15:

0.1 (2021-02-22)
----------------

- Create base library that calls OpenTopography API
- Create CLI for library
- Write tests for library and CLI
- Include demo Jupyter Notebook for library
6 changes: 6 additions & 0 deletions docs/source/CODE-OF-CONDUCT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Code of Conduct
===============

Everyone participating in this project is governed by the CSDMS `Code of
Conduct <https://github.com/csdms/project/blob/main/CODE-OF-CONDUCT.md>`__.
By participating, you are expected to uphold this code.
8 changes: 8 additions & 0 deletions docs/source/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Contributing
============

We welcome, and greatly appreciate, contributions to `CSDMS
Workbench <https://csdms.colorado.edu/wiki/Workbench>`__ tools. For
recommendations on how you can contribute, please see the CSDMS project
`CONTRIBUTING <https://github.com/csdms/project/blob/main/CONTRIBUTING.md>`__
document.
23 changes: 23 additions & 0 deletions docs/source/LICENSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
MIT License
===========

Copyright (c) 2021 Community Surface Dynamics Modeling System

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 4 additions & 4 deletions docs/source/README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
|Basic Model Interface| |Conda Version| |PyPI| |Build/Test CI| |Coverage
Status| |Documentation Status|
|DOI| |Conda Version| |PyPI| |Build/Test CI| |Coverage Status|
|Documentation Status|

bmi-topography
==============
Expand Down Expand Up @@ -220,8 +220,8 @@ https://bmi-topography.readthedocs.io.

<!-- Links (by alpha) -->

.. |Basic Model Interface| image:: https://img.shields.io/badge/CSDMS-Basic%20Model%20Interface-green.svg
:target: https://bmi.readthedocs.io/
.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8327417.svg
:target: https://doi.org/10.5281/zenodo.8327417
.. |Conda Version| image:: https://img.shields.io/conda/vn/conda-forge/bmi-topography.svg
:target: https://anaconda.org/conda-forge/bmi-topography
.. |PyPI| image:: https://img.shields.io/pypi/v/bmi-topography
Expand Down
1 change: 0 additions & 1 deletion docs/source/changelog.rst

This file was deleted.

34 changes: 22 additions & 12 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

.. include:: README.rst

Additional Information
----------------------

API Reference
=============
.............

Looking for information on a particular function, class, or method?
This part of the documentation is for you.
Expand All @@ -14,15 +16,30 @@ This part of the documentation is for you.

api/index

Changelog
.........

Additional Information
======================
.. toctree::
:maxdepth: 2

CHANGES

Project documents
.................

.. toctree::
:maxdepth: 2

changelog
license
LICENSE
CODE-OF-CONDUCT
CONTRIBUTING

Indices and tables
..................

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

Help
----
Expand All @@ -36,10 +53,3 @@ Acknowledgments
This work is supported by the National Science Foundation under Award No.
`2026951 <https://www.nsf.gov/awardsearch/showAward?AWD_ID=2026951>`_,
*EarthCube Capabilities: Cloud-Based Accessible and Reproducible Modeling for Water and Sediment Research*.

Indices and tables
------------------

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
1 change: 0 additions & 1 deletion docs/source/license.rst

This file was deleted.

19 changes: 11 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,24 @@ def format(session: nox.Session) -> None:
@nox.session(name="prepare-docs")
def prepare_docs(session: nox.Session) -> None:
"""Update docs source before building."""
session.install(".[docs]")
session.run("sphinx-apidoc", "-f", "-o", "docs/source/api", PACKAGE)
session.run(
"pandoc", "--to", "rst", "README.md", "--output", "docs/source/README.rst"
)
for file in ["README", "CHANGES", "CONTRIBUTING", "CODE-OF-CONDUCT", "LICENSE"]:
session.run(
"pandoc", "--to", "rst", f"{file}.md", "--output", f"docs/source/{file}.rst"
)


@nox.session(name="build-docs")
@nox.session(name="build-docs", venv_backend="conda")
def build_docs(session: nox.Session) -> None:
"""Build the docs."""
session.install(".[docs]")
session.chdir("docs")
session.conda_install("--file", "docs/requirements.txt")
session.install("-e", ".")

prepare_docs(session)

if os.path.exists("build"):
shutil.rmtree("build")
session.run("sphinx-build", "-b", "html", "-W", "source", "build/html")
session.run("sphinx-build", "-b", "html", "-W", "docs/source", "build/html")


@nox.session
Expand Down