Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanf committed Nov 11, 2024
1 parent 0f689b0 commit 095641f
Show file tree
Hide file tree
Showing 12 changed files with 120 additions and 33 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
sphinx-build doc _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
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)
4 changes: 0 additions & 4 deletions docs/_config.yml

This file was deleted.

4 changes: 0 additions & 4 deletions docs/boxstacks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
---
title: BoxStacks solver
---

# BoxStacks solver
28 changes: 28 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 = 'Example'
copyright = 'workshop participant'
author = 'workshop participant'
release = '0.1'


# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['myst_parser']

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
13 changes: 9 additions & 4 deletions docs/index.md → docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# PackingSolver's documentation
PackingSolver's documentation
=============================

PackingSolver is a library that solves cutting and packing problems.
.. toctree::
:maxdepth: 2
:caption: Contents:

PackingSolver takes as input:
`PackingSolver` is a software package dedicated to the practical resolution of cutting and packing problems.

`PackingSolver` takes as input:
* A set of pieces to cut/pack called **items**.
* A set of containers from which to cut / in which to pack these items, called **bins**.
* A set of parameters for the optimization

Then PackingSolver outputs the cutting/loading plans.
Then `PackingSolver` outputs the cutting/loading plans.

PackingSolver solves multiple problem types:

Expand Down
4 changes: 0 additions & 4 deletions docs/irregular.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
---
title: Irregular solver
---

# Irregular solver
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
6 changes: 1 addition & 5 deletions docs/objectives.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
---
title: Objectives
---

# objectives
# Objectives
4 changes: 0 additions & 4 deletions docs/onedimensional.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
---
title: OneDimensional solver
---

# OneDimensional solver
4 changes: 0 additions & 4 deletions docs/rectangle.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
---
title: Rectangle solver
---

# Rectangle solver
4 changes: 0 additions & 4 deletions docs/rectangleguillotine.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
---
title: RectangleGuillotine solver
---

# RectangleGuillotine solver

0 comments on commit 095641f

Please sign in to comment.