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

sphinx website for the documentation #16

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
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
37 changes: 37 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: GCBM Belize Docs

on:
push:
branches: [ sphinx-website ]
pull_request:
branches: [ sphinx-website ]

jobs:
build-deploy-belize-docs:
runs-on: ubuntu-latest
name: Build & Deploy Belize docs
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies
run: |
pip install -U sphinx
cd docs
pip install -r requirements.txt

- name: Build Belize docs
uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"

- name: Set-up Node
uses: actions/setup-node@v1
with:
node-version: "10.x"

- name: Deploy Belize docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Postprocessing/.Rhistory
Postprocessing/.RData
Postprocessing/.Ruserdata
Postprocessing/renv/library
docs/_build
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
22 changes: 22 additions & 0 deletions docs/about_belize/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
About Belize
============

Belize is the only English-speaking country in Central America and as a feature of its geographical location
and historical background, is a part of both Central America and the Caribbean. Bordered on the east by
the Caribbean Sea, on the north and north-west by Mexico, and on the west and south by Guatemala, Belize
lies between 15°45’ and 18°30’ north latitude, and 87°30’ and 89°15’ west longitude. The
country’s national territory comprises 46,620 sq. km (18,000 sq. miles).

Belize is highly forested, with more than 50% of the mainland covered with forests and the remaining land consisting mainly of agriculture, arable
land, and human settlements.

.. figure:: ../assets/belize.gif
:alt: Map of Belize
:align: center
:width: 600px

Image source https://geology.com/world/belize-satellite-image.shtml

Two main ecosystems encompass Belize’s territory, the marine and the terrestrial ecosystem.
The marine ecosystem consists of open ocean, coral reefs and seagrass beds. In contrast, the terrestrial ecosystem is made up of both broadleaf and pine forests, along with several lakes and rivers in the country.
ecosystem is made up of both broadleaf and pine forests along with several lakes and rivers in country.
Binary file added docs/assets/belize.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/install_tools.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'GCBM Belize'
copyright = '2022, moja global'
author = 'moja global'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "furo"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
19 changes: 19 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. GCBM Belize documentation master file, created by
sphinx-quickstart on Sun Jul 10 16:37:19 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

GCBM Belize
===========

This is the official documentation of the GCBM Belize project.
This project is based on the `Standalone Template for the GCBM <https://carbon.nfis.org/cbm>`_

**Disclaimer : The calculations performed in this repository are not official and do not represent the Government of Belize in any way.**

.. toctree::
:hidden:

about_belize/index.rst
run_simulation/index.rst
postprocessing/index.rst
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
42 changes: 42 additions & 0 deletions docs/moja_global_docs/.github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Bug Report🐛
description: Create a report to help us improve
title: "Bug🐛: "
labels: [bug]

body:
- type: markdown
attributes:
value: Thank you for taking the time to file a Bug report.
- type: textarea
attributes:
label: Describe the bug.
description: "A clear and concise description of what the bug is."
validations:
required: true
- type: textarea
attributes:
label: Describe the steps to reproduce the behavior.
description: "Be clear and concise while describing the steps to ensure that it can be reproduced and potentially fixed"
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
- type: textarea
attributes:
label: Expected behavior.
description: "A clear and concise description of what you expected to happen."
- type: textarea
attributes:
label: Screenshots.
description: "If applicable, add screenshots to help explain your problem."
- type: input
attributes:
label: Operating Environment
description: "What operating system and version are you using? If you are running it on Cloud/Cluster do mention about that."
validations:
required: true
- type: textarea
attributes:
label: Additional context.
description: "Add any other context or screenshots to clarify your suggestion here."
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Communication Suggestion
description: Propose a way to better communicate a feature
title: "Communication Suggestion: "
labels: [communication]

body:
- type: markdown
attributes:
value: Thank you for taking the time to file a Communication Suggestion report.
- type: textarea
attributes:
label: Describe how we are communicating and why it is not optimal.
description: "A clear and concise description of what the problem is. Ex. When I reach this point, I cannot [...]."
- type: textarea
attributes:
label: Describe the solution you'd like.
description: "A clear and concise description of what you want to happen."
- type: textarea
attributes:
label: Describe alternatives you've considered.
description: "A clear and concise description of any alternative solutions or features you have considered."
- type: textarea
attributes:
label: Additional context.
description: "Add any other context or screenshots to clarify your suggestion here."
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Documentation Update📄
description: Suggest how we can improve our documentation
title: "Documentation📄: "
labels: [documentation]

body:
- type: markdown
attributes:
value: Thank you for taking the time to file a Documentation update report.
- type: textarea
attributes:
label: What is the current documentation state?
description: "Copy and paste the text currently in the documentation. If you want to improve graphs or photos, please provide a screenshot of the original."
- type: textarea
attributes:
label: Where is this stated?
description: "Provide additional information about the location where you have copied the above statement from."
- type: textarea
attributes:
label: Why do you want to improve the statement?
description: "Please explain why the statement needs to be updated. This can be because it is confusing, incorrect, spelling/grammatical errors, etc."
- type: textarea
attributes:
label: Proposed Statement
description: "Please propose how you would rewrite the statement. If you have a precise proposal, please make the changes and open a pull request."
- type: textarea
attributes:
label: Additional context.
description: "Add any other context or useful information about the documentation update here."
27 changes: 27 additions & 0 deletions docs/moja_global_docs/.github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Feature Request
description: Suggest an idea for this project
title: "Feature Request: "
labels: [enhancement]

body:
- type: markdown
attributes:
value: Thank you for taking the time to file a Feature Request report.
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: "A clear and concise description of what the problem is. Ex. I am always frustrated when [...]"
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: "A clear and concise description of what you want to happen."
- type: textarea
attributes:
label: Describe alternatives you've considered
description: "A clear and concise description of any alternative solutions or features you have considered."
- type: textarea
attributes:
label: Additional context.
description: "Add any other context or screenshots about the feature request here."
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Science Contribution and Review
description: Suggest how the science behind the code can be improved
title: "Science Contribution and Review: "
labels: [science-review]

body:
- type: markdown
attributes:
value: Thank you for taking the time to file a Science Contribution and Review report.
- type: textarea
attributes:
label: Please describe the problem.
description: "A clear and concise description of what the problem is."
validations:
required: true
- type: textarea
attributes:
label: Describe the correct or improved scientific approach.
description: "A clear and concise description of what you want to happen."
- type: textarea
attributes:
label: Describe alternatives that could be considered
description: "A clear and concise description of any alternative solutions that would be scientifically correct."
- type: textarea
attributes:
label: Additional context.
description: "Add any other context or screenshots about the feature request here."
27 changes: 27 additions & 0 deletions docs/moja_global_docs/.github/ISSUE_TEMPLATE/user-feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: User Feedback
description: Describe how we can improve your experience
title: "User Feedback: "
labels: [user-feedback]

body:
- type: markdown
attributes:
value: Thank you for taking the time to file a User Feedback report.
- type: textarea
attributes:
label: Describe what you are trying to do and why it is not optimal.
description: "A clear and concise description of what the problem is. Ex. When I reach this point, I cannot [...]"
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: "A clear and concise description of what you want to happen."
- type: textarea
attributes:
label: Describe alternatives you've considered.
description: "A clear and concise description of any alternative solutions or features you have considered."
- type: textarea
attributes:
label: Additional context.
description: "Add any other context or screenshots about the feature request here."
14 changes: 14 additions & 0 deletions docs/moja_global_docs/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- [ ] Issue reference: <!-- Refer the issue that you have picked up link it to the Pull Request -->
- [ ] Subject Matter Expert (SME) reviewer: <!-- Refer the SME who can provide the technical feedback. Add NA if not known -->
- [ ] Peer reviewer: <!-- Refer the Peer reviewer who can provide the docs feedback. Add NA if not known -->
- [ ] Preview Links: <!-- Once the ReadTheDocs CI passes, navigate to the built docs and find where your documentation is being referenced. Add the link over here for easy reviews -->
- [ ] Explain the changes: <!-- Briefly explain the changes and purpose of your PR -->
- [ ] Dependency changes: <!-- Y/N; Explain if there are any dependency changes -->

Thanks for opening the Pull Request for moja global. Happy contributing ✨

<!--- Thanks for opening this pull request! If the tests fail, please feel free to reach out to us by leaving a comment down below and we will be happy to take a look --->
Loading