Skip to content

Commit

Permalink
Merge pull request #4 from zkurtz/setup-docs
Browse files Browse the repository at this point in the history
Setup docs
  • Loading branch information
zkurtz authored Nov 17, 2024
2 parents 24ec8cd + a64801c commit dc36df5
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 1,247 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ __pycache__/
# Build artifacts
dist/
build/
*.egg-info/
.DS_Store
docs/doctrees/
docs/html/
docs/_build/
docs/_source/
docs/_templates/

# IDE-specific files
.idea/
Expand Down
29 changes: 29 additions & 0 deletions docs/.github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy Docs

on:
push:
branches:
- main # or your main branch name
pull_request:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4

- name: Install dependencies
run: |
pip install uv
- name: Build HTML
run: uv run sphinx-build -b html -c docs docs docs/_build/html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
publish_branch: gh-pages
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
23 changes: 23 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'packio'
copyright = '2024, Zach Kurtz'
author = 'Zach Kurtz'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".venv", "dev.py"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_static_path = ['_static']
html_theme = "alabaster"
html_baseurl = 'https://zkurtz.github.io/packio/docs/'
7 changes: 7 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
packio documentation
====================

.. automodule:: packio
:members:
:undoc-members:
:show-inheritance:
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
96 changes: 0 additions & 96 deletions packio.egg-info/PKG-INFO

This file was deleted.

10 changes: 0 additions & 10 deletions packio.egg-info/SOURCES.txt

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion packio.egg-info/top_level.txt

This file was deleted.

1 change: 1 addition & 0 deletions packio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
from packio.io import Writer as Writer

__version__ = version("packio")
__all__ = ["Reader", "Writer"]
Loading

0 comments on commit dc36df5

Please sign in to comment.