Skip to content
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
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,34 @@ jobs:

- name: Push Docker image
run: docker push iosefa/pyforestscan:latest

docs:
runs-on: ubuntu-latest
needs: docker
steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install MkDocs and plugins
run: |
pip install \
mkdocs \
mkdocs-material \
mkdocstrings \
git-revision-date \
mkdocs-jupyter \
pymdown-extensions

- name: Build MkDocs site
run: mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_PAGES_TOKEN }}
publish_dir: ./site
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,46 @@ plot_metric('Plant Area Index', pai, extent, metric_name='PAI', cmap='viridis',

For detailed instructions and examples, visit our [documentation](https://pyforestscan.sefa.ai/).

### Editing and Publishing Documentation

If you want to add new documentation or update existing docs for PyForestScan, follow these steps:

#### 1. Editing Documentation

- Documentation sources are typically found in the `docs/` directory.
- You can add new Markdown (`.md`) files or update existing ones as needed.
- To add a new doc page, simply create a new file in the `docs/` folder and link to it from the relevant index or summary page if needed.

#### 2. Building and Viewing Docs Locally

PyForestScan uses a static site generator like MkDocs (or similar) for documentation.

- Make sure you have the required dependencies listed in `requirements-doc.txt`.
- Install dependencies if needed:
```bash
pip install -r requirements-doc.txt
```
- Build and serve the documentation locally:
```bash
mkdocs serve
```
- Visit `http://127.0.0.1:8000` in your browser to preview your changes.

#### 3. Publishing/Updating the Documentation

- Once you are satisfied with your changes, commit and push them to your fork or branch:
```bash
git add docs/
git commit -m "Update documentation"
git push
```
- Open a Pull Request (PR) if contributing to the main repository.

- On merge to the `main` branch, documentation deployment is usually handled automatically (for example, via GitHub Actions or Read the Docs). Check the repository’s specific instructions or workflows if manual steps are required.

**Tip:** If you encounter issues with the docs build or deployment, refer to any [Contributing Guidelines](docs/contributing.md), `mkdocs.yml` configuration, or open an issue for help.


## Developer Guides

To build locally and contribute to PyForestScan, you will need the following dependencies:
Expand Down
34 changes: 17 additions & 17 deletions docs/examples/calculate-forest-metrics.ipynb

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions docs/examples/getting-started-importing-preprocessing-dtm-chm.ipynb

Large diffs are not rendered by default.

249 changes: 20 additions & 229 deletions docs/examples/working-with-large-point-clouds.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ PyForestScan is a Python library designed for analyzing and visualizing forest s

The examples below are jupyter notebooks and can help you get started!

- [Getting Started: DTM and CHM](examples/getting-started.ipynb)
- [Getting Started: DTM and CHM](examples/getting-started-importing-preprocessing-dtm-chm.ipynb)
- [Calculating Forest Metrics](examples/calculate-forest-metrics.ipynb)
- [Working with Large Point Clouds](examples/working-with-large-point-clouds.ipynb)

To install jupyter, you can use conda or pip, with either:

```python
```bash
conda install jupyter
```
or

```python
```bash
pip install jupyter
```

Expand Down
Loading
Loading