Skip to content

Commit cc80c04

Browse files
authored
Merge pull request #2 from Deric-W/docs
add Documentation
2 parents b1e10a0 + 86546e9 commit cc80c04

35 files changed

+990
-101
lines changed

.readthedocs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-22.04"
5+
tools:
6+
python: "3.10"
7+
8+
formats:
9+
- pdf
10+
- epub
11+
12+
sphinx:
13+
configuration: docs/conf.py
14+
fail_on_warning: true
15+
16+
python:
17+
install:
18+
- requirements: docs/requirements.txt
19+
- method: pip
20+
path: .

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22

33
![Tests](https://github.com/Deric-W/lambda_calculus/actions/workflows/Tests.yaml/badge.svg)
44
[![codecov](https://codecov.io/gh/Deric-W/lambda_calculus/branch/main/graph/badge.svg?token=SU3982mC17)](https://codecov.io/gh/Deric-W/lambda_calculus)
5+
[![Documentation Status](https://readthedocs.org/projects/lambda-calculus/badge/?version=stable)](https://lambda-calculus.readthedocs.io/en/stable/?badge=stable)
56

6-
The `lambda_calculus` package contains classes which implement basic operations of the lambda calculus.
7+
The [`lambda_calculus`](https://pypi.org/project/lambda-calculus/) package contains classes which implement basic operations of the lambda calculus.
78

89
To use it, simply import the classes `Variable`, `Abstraction` and `Application` from this package
910
and nest them to create more complex lambda terms.
1011

1112
You can also use the `visitors` subpackage to define your own operations on terms or
1213
use predefined ones from the `terms` subpackage.
1314

15+
More information is available on [Read the Docs](https://lambda-calculus.readthedocs.io/).
16+
1417
## Notice
1518

1619
This package is intended to be used for educational purposes and is not optimized for speed.

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 = .
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/api.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Package API
2+
===========
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
api/terms
8+
api/visitors
9+
api/errors
10+
11+
.. automodule:: lambda_calculus
12+
13+
.. autoclass:: Variable
14+
15+
Reference to :class:`.terms.Variable` for convenience
16+
17+
.. autoclass:: Abstraction
18+
19+
Reference to :class:`.terms.Abstraction` for convenience
20+
21+
.. autoclass:: Application
22+
23+
Reference to :class:`.terms.Application` for convenience

docs/api/errors.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Module errors
2+
=============
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
.. automodule:: lambda_calculus.errors
8+
:members:

docs/api/terms.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Package terms
2+
=============
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
terms/logic
8+
terms/arithmetic
9+
terms/pairs
10+
terms/combinators
11+
12+
.. automodule:: lambda_calculus.terms
13+
:members:
14+
:special-members: __iter__, __str__

docs/api/terms/arithmetic.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Module arithmetic
2+
=================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
.. automodule:: lambda_calculus.terms.arithmetic
8+
:members:

docs/api/terms/combinators.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Module combinators
2+
==================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
.. automodule:: lambda_calculus.terms.combinators
8+
:members:

docs/api/terms/logic.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Module logic
2+
============
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
.. automodule:: lambda_calculus.terms.logic
8+
:members:

docs/api/terms/pairs.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Module pairs
2+
============
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
.. automodule:: lambda_calculus.terms.pairs
8+
:members:

0 commit comments

Comments
 (0)