Skip to content

Commit 44315da

Browse files
committed
Setting up the initial documentation website
1 parent 7cbeb28 commit 44315da

13 files changed

Lines changed: 210 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# github pages
2+
docs/build

CONTRIBUTING.md

Whitespace-only changes.

LICENSE.md

Whitespace-only changes.

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
# huggingface_datasets
2-
A repository to house and host the documentation and infrastructure for the datasets hosted on HuggingFace.
2+
This is a repository that houses the files and infrastructure for the website that documents the Rosetta Commons datasets that are hosted on HuggingFace.
3+
4+
You can find the Rosetta Commons organization on HuggingFace [here](https://huggingface.co/RosettaCommons).
5+
6+
The documentation will be hosted at [rosettacommons.github.io/huggingface_datasets](https://rosettacommons.github.io/RFdiffusion2/).
7+
8+
For more information about how to contribute to this documentation, see the [README in the docs folder](docs/README.md).
9+
10+
For any questions, comments, or concerns please reach out to Rachel Clune (@rclune), Hope Woods, or Matt O'Meara on Slack.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: documentation
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions:
6+
contents: write
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
- name: Install dependencies
15+
run: |
16+
pip install sphinx myst_parser furo sphinx-copybutton
17+
- name: Sphinx build
18+
run: |
19+
sphinx-build -M html docs/source/ docs/build/
20+
- name: Disable Jekyll
21+
run: touch docs/build/html/.nojekyll
22+
- name: Deploy to GitHub Pages
23+
uses: peaceiris/actions-gh-pages@v3
24+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/production' }}
25+
with:
26+
publish_branch: gh-pages
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: docs/build/html
29+
force_orphan: true

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Documentation for HuggingFace Datasets
2+
3+
The documentation pages are static HTML pages generated by Sphinx and hosted on GitHub pages. The workflow that automatically creates the GitHub pages site when any pull request is accepted can be found in `.github/workflows/documentation.yaml`. The Markdown, ReStructuredText, etc. files that are used to generate the static HTML pages are in `docs/source` and the built pages are in `docs/build`.
4+
5+
To build the documentation you will need to have a few dependencies installed, which can easily be done by running
6+
```bash
7+
pip install -r docs_requirements.txt
8+
```
9+
from within the `docs` folder.
10+
11+
Once this is installed you can build the documentation by running
12+
```bash
13+
make html
14+
```
15+
from inside the `docs` folder.
16+
17+
The static HTML pages can be found in `build/html`.
18+
19+
20+
## Adding to the documentation
21+
If you need more information than what is described here, please see the [Sphinx documentation](https://www.sphinx-doc.org/en/master/index.html).
22+
23+
Anything you want to add to the documentation needs to go into the `docs/source` folder. If you add a new page, it will not be built until you add it to an `index.rst` file. You will find one in the `source` directory, and one in the `category1` subfolder for an example of how this documentation could be organized. See the `category1/index.rst` file for how you can either show a Markdown file that is hosted in this repository or directly link out to a file that is hosted on HuggingFace.
24+
25+
Once you make changes you will need to rebuild the documentation to have the changes reflected in the built documents.

docs/docs_requirements.txt

Whitespace-only changes.

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Dataset 1
2+
This file could link out to the [README](README.md) on HuggingFace, but then provide more details.

0 commit comments

Comments
 (0)