-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from aboutcircles/20240607-readthedocs
(docs): blind attempt at readthedocs for solidity
- Loading branch information
Showing
5 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
nodejs: "19" | ||
rust: "1.64" | ||
apt_packages: | ||
- solc | ||
|
||
|
||
# Build documentation in the "docs/" directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
# Declare the Python requirements required to build your documentation | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
|
||
# Additional commands to set up the environment for Foundry | ||
commands: | ||
- curl -L https://foundry.paradigm.xyz | bash # Install Foundry | ||
- foundryup # Update Foundry | ||
- forge install # Install dependencies for Foundry project | ||
- ./generate_solidity_docs.sh # Generate Solidity documentation | ||
- sphinx-build -b html docs/source docs/build/html # Build Sphinx documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# Run solidity-docgen | ||
npx solidity-docgen --output docs/source/solidity --solc-module solc | ||
|
||
# Ensure the output directory exists | ||
mkdir -p docs/source/solidity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Defining the exact version will make sure things don't break | ||
sphinx==5.3.0 | ||
sphinx_rtd_theme==1.1.1 | ||
sphinx-autobuild==2024.4.16 | ||
readthedocs-sphinx-search==0.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# conf.py | ||
|
||
import os | ||
import sys | ||
sys.path.insert(0, os.path.abspath('.')) | ||
|
||
# Project information | ||
project = 'Circles' | ||
author = 'AboutCircles' | ||
release = '0.3.4' | ||
|
||
# General configuration | ||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.napoleon', | ||
'sphinx.ext.viewcode', | ||
] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = [] | ||
|
||
# Options for HTML output | ||
html_theme = 'alabaster' | ||
html_static_path = ['_static'] | ||
|
||
# Add Solidity docgen output path | ||
solidity_docgen_output = os.path.abspath('solidity') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Welcome to Circles documentation! | ||
================================================= | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
solidity/index | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |