feat: Generate API docs
This commit is contained in:
parent
8dd59bb891
commit
d39f501d4b
|
@ -68,3 +68,4 @@ sphinx:
|
||||||
|
|
||||||
extra_extensions:
|
extra_extensions:
|
||||||
- sphinx.ext.intersphinx
|
- sphinx.ext.intersphinx
|
||||||
|
- sphinx.ext.autodoc
|
||||||
|
|
|
@ -5,3 +5,7 @@ parts:
|
||||||
chapters:
|
chapters:
|
||||||
- file: goal
|
- file: goal
|
||||||
- file: proof_search
|
- file: proof_search
|
||||||
|
- caption: API Documentation
|
||||||
|
chapters:
|
||||||
|
- file: api-server
|
||||||
|
- file: api-search
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Search
|
||||||
|
=============
|
||||||
|
|
||||||
|
.. automodule:: pantograph.search
|
||||||
|
:members:
|
|
@ -0,0 +1,5 @@
|
||||||
|
Server
|
||||||
|
=============
|
||||||
|
|
||||||
|
.. automodule:: pantograph.server
|
||||||
|
:members:
|
|
@ -31,7 +31,11 @@ class ServerError(Exception):
|
||||||
|
|
||||||
DEFAULT_CORE_OPTIONS=["maxHeartbeats=0", "maxRecDepth=100000"]
|
DEFAULT_CORE_OPTIONS=["maxHeartbeats=0", "maxRecDepth=100000"]
|
||||||
|
|
||||||
|
|
||||||
class Server:
|
class Server:
|
||||||
|
"""
|
||||||
|
Main interaction instance with Pantograph
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
imports=["Init"],
|
imports=["Init"],
|
||||||
|
@ -222,7 +226,7 @@ class Server:
|
||||||
def load_sorry(self, command: str) -> list[GoalState | list[str]]:
|
def load_sorry(self, command: str) -> list[GoalState | list[str]]:
|
||||||
"""
|
"""
|
||||||
Executes the compiler on a Lean file. For each compilation unit, either
|
Executes the compiler on a Lean file. For each compilation unit, either
|
||||||
return the gathered `sorry`s, or a list of messages indicating error.
|
return the gathered `sorry` s, or a list of messages indicating error.
|
||||||
"""
|
"""
|
||||||
result = self.run('frontend.process', {
|
result = self.run('frontend.process', {
|
||||||
'file': command,
|
'file': command,
|
||||||
|
|
Loading…
Reference in New Issue