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

Revise Documentation #10

Merged
merged 2 commits into from
Aug 12, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,5 @@ cython_debug/
#.idea/


.DS_store
# MacOS
*.DS_store*
Binary file removed docs/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/Contributing.md → docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ We welcome any geometric representation of trees in airborne imagery. Points, po

The working document describing technical details of evaluation is still in its infancy is [here](https://docs.google.com/document/d/1K6G1tcdTuAv3FgGiDWq5QhO-kSoBrxzTiic5jH1CZF4/edit?usp=sharing)

## Code
## Code
4 changes: 3 additions & 1 deletion docs/Dataset_Structure.md → docs/dataset_structure.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
The organization of this dataset was inspired by the WILDS benchmark
# Dataset structure
The organization of this dataset was inspired by the WILDS benchmark

1 change: 1 addition & 0 deletions docs/Datasets.md → docs/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
## Boxes

## Polygons

78 changes: 78 additions & 0 deletions docs/developer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Developer's Guide

1. Start by forking the main repository: [https://github.com/weecology/MillionTrees](https://github.com/weecology/MillionTrees).
2. Clone your fork of the repository:

- Using HTTPS: `git clone https://github.com/myUserName/MillionTrees.git`
- Using SSH: `git clone git@github.com:myUserName/MillionTrees.git`

3. Link your cloned repository to the main repository (typically named `upstream`):

- `git remote add upstream https://github.com/weecology/MillionTrees.git`

5. Verify your remote settings with:

```bash
git remote -v
```

You should see output similar to:

```
origin git@github.com:myUserName/MillionTrees.git (fetch)
origin git@github.com:myUserName/MillionTrees.git (push)
upstream https://github.com/weecology/MillionTrees.git (fetch)
upstream https://github.com/weecology/MillionTrees.git (push)
```

6. Install the package from the main directory. Use the `-U` or `--upgrade` flag to update or overwrite any previously installed versions:

```bash
pip install . -U
```

## Running Tests Locally

[Add specific instructions for running tests if necessary.]

## Create Release

[Add specific instructions for creating a release if necessary.]

## Documentation

We use [Sphinx](http://www.sphinx-doc.org/en/stable/) and [Read the Docs](https://readthedocs.org/) for our documentation. Sphinx supports both reStructuredText and markdown as markup languages.

Source code documentation is automatically included after committing to the main repository. To add additional supporting documentation, create new reStructuredText or markdown files in the `docs` folder.

If you need to reorganize the documentation, refer to the [Sphinx documentation](http://www.sphinx-doc.org/en/stable/).

### Update Documentation

The documentation is automatically updated for changes within modules. **However, it is essential to update the documentation after adding new modules** in the `engines` or `lib` directories.

1. Navigate to the `docs` directory and create a temporary directory, e.g., `source`.
2. Run the following command to generate documentation:

```bash
cd docs
mkdir source
sphinx-apidoc -f -o ./source /Users/..../MillionTrees/milliontrees/
```

In this example, `source` is the destination folder for the generated `.rst` files, and `/Users/..../MillionTrees/milliontrees/` is the path to the `milliontrees` source code.

3. Review the generated files, make necessary edits to ensure accuracy, and then commit and push the changes.

### Test Documentation Locally

To test the documentation locally:

```bash
cd docs # Navigate to the docs directory
make html && python3 -m http.server --directory _build/html
```

This command generates the HTML files and hosts a local HTTP server on `localhost:8000`, allowing you to view the documentation in your browser.

> **Note:** Do not commit the `_build` directory after generating HTML.
1 change: 1 addition & 0 deletions docs/Getting_Started.md → docs/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Getting Started

MillionTrees
11 changes: 7 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ Forests underlie many ecosystem services, agricultural systems and urban plannin
:maxdepth: 2
:caption: User Guide:

Getting_Started
Datasets
Leaderboard
Contributing
getting_started
datasets
dataset_structure
leaderboard
contributing
developer
source/modules.rst

1 change: 1 addition & 0 deletions docs/Leaderboard.md → docs/leaderboard.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Leaderboard


| Name | Citation | Official Split | Random Split |
|------|----------|----------------|--------------|
| | | | |
Expand Down
37 changes: 37 additions & 0 deletions docs/source/milliontrees.common.metrics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
milliontrees.common.metrics package
===================================

Submodules
----------

milliontrees.common.metrics.all\_metrics module
-----------------------------------------------

.. automodule:: milliontrees.common.metrics.all_metrics
:members:
:undoc-members:
:show-inheritance:

milliontrees.common.metrics.loss module
---------------------------------------

.. automodule:: milliontrees.common.metrics.loss
:members:
:undoc-members:
:show-inheritance:

milliontrees.common.metrics.metric module
-----------------------------------------

.. automodule:: milliontrees.common.metrics.metric
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: milliontrees.common.metrics
:members:
:undoc-members:
:show-inheritance:
45 changes: 45 additions & 0 deletions docs/source/milliontrees.common.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
milliontrees.common package
===========================

Subpackages
-----------

.. toctree::
:maxdepth: 4

milliontrees.common.metrics

Submodules
----------

milliontrees.common.data\_loaders module
----------------------------------------

.. automodule:: milliontrees.common.data_loaders
:members:
:undoc-members:
:show-inheritance:

milliontrees.common.grouper module
----------------------------------

.. automodule:: milliontrees.common.grouper
:members:
:undoc-members:
:show-inheritance:

milliontrees.common.utils module
--------------------------------

.. automodule:: milliontrees.common.utils
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: milliontrees.common
:members:
:undoc-members:
:show-inheritance:
61 changes: 61 additions & 0 deletions docs/source/milliontrees.datasets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
milliontrees.datasets package
=============================

Subpackages
-----------

.. toctree::
:maxdepth: 4

milliontrees.datasets.unlabeled

Submodules
----------

milliontrees.datasets.TreeBoxes module
--------------------------------------

.. automodule:: milliontrees.datasets.TreeBoxes
:members:
:undoc-members:
:show-inheritance:

milliontrees.datasets.TreePoints module
---------------------------------------

.. automodule:: milliontrees.datasets.TreePoints
:members:
:undoc-members:
:show-inheritance:

milliontrees.datasets.TreePolygons module
-----------------------------------------

.. automodule:: milliontrees.datasets.TreePolygons
:members:
:undoc-members:
:show-inheritance:

milliontrees.datasets.download\_utils module
--------------------------------------------

.. automodule:: milliontrees.datasets.download_utils
:members:
:undoc-members:
:show-inheritance:

milliontrees.datasets.milliontrees\_dataset module
--------------------------------------------------

.. automodule:: milliontrees.datasets.milliontrees_dataset
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: milliontrees.datasets
:members:
:undoc-members:
:show-inheritance:
37 changes: 37 additions & 0 deletions docs/source/milliontrees.datasets.unlabeled.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
milliontrees.datasets.unlabeled package
=======================================

Submodules
----------

milliontrees.datasets.unlabeled.TreeBoxesUnlabeled module
---------------------------------------------------------

.. automodule:: milliontrees.datasets.unlabeled.TreeBoxesUnlabeled
:members:
:undoc-members:
:show-inheritance:

milliontrees.datasets.unlabeled.TreePointsUnlabeled module
----------------------------------------------------------

.. automodule:: milliontrees.datasets.unlabeled.TreePointsUnlabeled
:members:
:undoc-members:
:show-inheritance:

milliontrees.datasets.unlabeled.TreePolygonsUnlabeled module
------------------------------------------------------------

.. automodule:: milliontrees.datasets.unlabeled.TreePolygonsUnlabeled
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: milliontrees.datasets.unlabeled
:members:
:undoc-members:
:show-inheritance:
46 changes: 46 additions & 0 deletions docs/source/milliontrees.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
milliontrees package
====================

Subpackages
-----------

.. toctree::
:maxdepth: 4

milliontrees.common
milliontrees.datasets

Submodules
----------

milliontrees.download\_datasets module
--------------------------------------

.. automodule:: milliontrees.download_datasets
:members:
:undoc-members:
:show-inheritance:

milliontrees.get\_dataset module
--------------------------------

.. automodule:: milliontrees.get_dataset
:members:
:undoc-members:
:show-inheritance:

milliontrees.version module
---------------------------

.. automodule:: milliontrees.version
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: milliontrees
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
milliontrees
============

.. toctree::
:maxdepth: 4

milliontrees
Loading