Skip to content

Commit 7ab7834

Browse files
committed
Docs Test
1 parent bf0cb87 commit 7ab7834

File tree

11 files changed

+730
-1
lines changed

11 files changed

+730
-1
lines changed

.github/workflows/docs.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
paths:
7+
- "docs/**"
8+
- "code_execution/**"
9+
- ".github/workflows/docs.yml"
10+
pull_request:
11+
branches: [main, master]
12+
paths:
13+
- "docs/**"
14+
- "code_execution/**"
15+
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
23+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
24+
concurrency:
25+
group: "pages"
26+
cancel-in-progress: false
27+
28+
jobs:
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: "3.10"
39+
40+
- name: Cache pip dependencies
41+
uses: actions/cache@v3
42+
with:
43+
path: ~/.cache/pip
44+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', 'docs/requirements.txt') }}
45+
restore-keys: |
46+
${{ runner.os }}-pip-
47+
48+
- name: Install dependencies
49+
run: |
50+
python -m pip install --upgrade pip
51+
pip install -r docs/requirements.txt
52+
pip install -e .
53+
54+
- name: Setup Pages
55+
id: pages
56+
uses: actions/configure-pages@v3
57+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
58+
59+
- name: Build documentation
60+
run: |
61+
cd docs
62+
make clean || true
63+
sphinx-build -b html . _build/html
64+
# Create .nojekyll file to serve files with underscores
65+
touch _build/html/.nojekyll
66+
67+
- name: Upload documentation artifacts
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: documentation
71+
path: docs/_build/html/
72+
73+
- name: Upload to GitHub Pages
74+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
75+
uses: actions/upload-pages-artifact@v2
76+
with:
77+
path: docs/_build/html/
78+
79+
deploy:
80+
# Deploy to GitHub Pages
81+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
82+
environment:
83+
name: github-pages
84+
url: ${{ steps.deployment.outputs.page_url }}
85+
runs-on: ubuntu-latest
86+
needs: build
87+
steps:
88+
- name: Deploy to GitHub Pages
89+
id: deployment
90+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,5 @@ cython_debug/
161161
.DS_Store
162162

163163
.vscode/*
164-
scratch/*
164+
scratch/*
165+
.cursor/*

docs/Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 = .
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)
21+
22+
# Custom targets for common tasks
23+
.PHONY: clean-all install-deps serve
24+
25+
clean-all:
26+
rm -rf $(BUILDDIR)/*
27+
28+
install-deps:
29+
pip install -r requirements.txt
30+
31+
serve: html
32+
@echo "Starting development server..."
33+
@echo "Documentation will be available at http://localhost:8000"
34+
@cd $(BUILDDIR)/html && python -m http.server 8000
35+
36+
live:
37+
@echo "Starting live reload server..."
38+
@sphinx-autobuild $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS)

docs/_static/.gitkeep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file ensures the _static directory exists for Sphinx
2+
# You can add custom CSS, JavaScript, or other static files here

docs/api/code_execution.rst

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
code_execution package
2+
======================
3+
4+
.. automodule:: code_execution
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
Submodules
10+
----------
11+
12+
code_execution.code_trees module
13+
--------------------------------
14+
15+
.. automodule:: code_execution.code_trees
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:
19+
20+
code_execution.configs module
21+
-----------------------------
22+
23+
.. automodule:: code_execution.configs
24+
:members:
25+
:undoc-members:
26+
:show-inheritance:
27+
28+
code_execution.data_structures module
29+
-------------------------------------
30+
31+
.. automodule:: code_execution.data_structures
32+
:members:
33+
:undoc-members:
34+
:show-inheritance:
35+
36+
code_execution.entrypoints module
37+
---------------------------------
38+
39+
.. automodule:: code_execution.entrypoints
40+
:members:
41+
:undoc-members:
42+
:show-inheritance:
43+
44+
code_execution.execution module
45+
-------------------------------
46+
47+
.. automodule:: code_execution.execution
48+
:members:
49+
:undoc-members:
50+
:show-inheritance:
51+
52+
code_execution.file_writing module
53+
----------------------------------
54+
55+
.. automodule:: code_execution.file_writing
56+
:members:
57+
:undoc-members:
58+
:show-inheritance:
59+
60+
code_execution.metrics module
61+
-----------------------------
62+
63+
.. automodule:: code_execution.metrics
64+
:members:
65+
:undoc-members:
66+
:show-inheritance:
67+
68+
code_execution.processing module
69+
--------------------------------
70+
71+
.. automodule:: code_execution.processing
72+
:members:
73+
:undoc-members:
74+
:show-inheritance:
75+
76+
code_execution.utils module
77+
---------------------------
78+
79+
.. automodule:: code_execution.utils
80+
:members:
81+
:undoc-members:
82+
:show-inheritance:

docs/api/modules.rst

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
API Reference
2+
=============
3+
4+
This section contains the complete API reference for the simple-code-execution library.
5+
6+
Core Modules
7+
------------
8+
9+
.. toctree::
10+
:maxdepth: 4
11+
12+
code_execution
13+
14+
Main Package
15+
~~~~~~~~~~~~
16+
17+
.. automodule:: code_execution
18+
:members:
19+
:undoc-members:
20+
:show-inheritance:
21+
22+
Execution Engine
23+
~~~~~~~~~~~~~~~~
24+
25+
.. automodule:: code_execution.execution
26+
:members:
27+
:undoc-members:
28+
:show-inheritance:
29+
30+
Entry Points
31+
~~~~~~~~~~~~
32+
33+
.. automodule:: code_execution.entrypoints
34+
:members:
35+
:undoc-members:
36+
:show-inheritance:
37+
38+
Data Structures
39+
~~~~~~~~~~~~~~~
40+
41+
.. automodule:: code_execution.data_structures
42+
:members:
43+
:undoc-members:
44+
:show-inheritance:
45+
46+
Configuration
47+
~~~~~~~~~~~~~
48+
49+
.. automodule:: code_execution.configs
50+
:members:
51+
:undoc-members:
52+
:show-inheritance:
53+
54+
Processing
55+
~~~~~~~~~~
56+
57+
.. automodule:: code_execution.processing
58+
:members:
59+
:undoc-members:
60+
:show-inheritance:
61+
62+
File Writing
63+
~~~~~~~~~~~~
64+
65+
.. automodule:: code_execution.file_writing
66+
:members:
67+
:undoc-members:
68+
:show-inheritance:
69+
70+
Code Trees
71+
~~~~~~~~~~
72+
73+
.. automodule:: code_execution.code_trees
74+
:members:
75+
:undoc-members:
76+
:show-inheritance:
77+
78+
Utilities
79+
~~~~~~~~~
80+
81+
.. automodule:: code_execution.utils
82+
:members:
83+
:undoc-members:
84+
:show-inheritance:
85+
86+
Metrics
87+
~~~~~~~
88+
89+
.. automodule:: code_execution.metrics
90+
:members:
91+
:undoc-members:
92+
:show-inheritance:

0 commit comments

Comments
 (0)