microbiomedata / docs

User-facing, web-based documentation about the NMDC
https://microbiomedata.github.io/docs/
0 stars 0 forks source link
documentation sphinx

Docs

[!NOTE]
This repository is in early development. We are currently in the process of reviewing, pruning, and consolidating our documentation.

Introduction

This repository contains the content that we compile into our documentation website.

Table of contents

Repository structure

This repository has the following sections:

  1. ./content: Current, high-level content about NMDC
  2. ./legacy: Legacy content we include in the website to support legacy references/publications
  3. ./src: Code we use to compile local and remote content into a website
  4. ./: Repository-level configuration files and documentation

Content

[!NOTE]
TODO

Legacy content

NMDC documentation

Most of the files in the legacy/nmdc-documentation directory are files that we copied from commit 8786ff5a in the NMDC_documentation repository. That was the latest commit on the main branch as of August 28, 2024. This documentation is implemented within the Sphinx documentation framework.

In addition to the files we copied, the directory also contains some files that are exclusive to this repository; e.g., Dockerfile and .gitignore.

Omissions

When copying the aforementioned files from the NMDC_documentation repository, we omitted the following files:

Instead of maintaining a local copy of that documentation here, we redirect visitors to the standalone schema documentation.

Example: When someone visits /reference/metadata/xylene.html on this documentation website, they'll be automatically redirected to https://microbiomedata.github.io/nmdc-schema/xylene/. This redirection is configured in legacy/nmdc-documentation/src/conf.py.

You can compare the legacy/nmdc-documentation/src directory with the corresponding directory in the upstream repository, by following these steps:

# Clone the upstream repository onto your computer.
git clone https://github.com/microbiomedata/NMDC_documentation.git /tmp/NMDC_documentation

# Use Git to compare the corresponding directories. 
git diff --stat /tmp/NMDC_documentation/docs ./legacy/nmdc-documentation/src

Workflow documentation

Most of the files in the legacy/workflow-documentation directory are files that we copied from commit 40b5a313 in the workflow_documentation repository. That was the latest commit on the main branch as of August 28, 2024. This documentation is implemented within the Sphinx documentation framework.

In addition to the files we copied, the directory also contains some files that are exclusive to this repository; e.g., Dockerfile and .gitignore.

Omissions

When copying the aforementioned files from the workflow_documentation repository, we omitted files that were used to fetch content from even higher upstream; i.e. from individual workflow repositories.

You can compare the legacy/workflow-documentation/src directory with the corresponding directory in the upstream repository, by following these steps:

# Clone the upstream repository onto your computer.
git clone https://github.com/microbiomedata/workflow_documentation.git /tmp/workflow_documentation

# Use Git to compare the corresponding directories. 
git diff --stat /tmp/workflow_documentation/docs ./legacy/workflow-documentation/src

Code

[!NOTE]
TODO

Repository-level configuration files and documentation

GitHub Actions

The .github/workflows directory contains YAML files that we use to configure GitHub Actions. We use GitHub Actions to (a) compile local and remote content into a website, and to (b) publish that website to the Internet.

Development

Spin up the development environment

Assuming you have Docker installed, you can spin up the development environment by running:

docker compose up

That will run a web server, serving the legacy section of the website at the following URL:

In addition, whenever you make changes to content, the associated sections of the website will automatically be rebuilt (at which point, you can refresh your web browser to see the newly-rebuilt sections).

TODO