Skip to content

Commit aa1aa4a

Browse files
mmckyagoose77
authored andcommitted
MAINT: review of docs and minor maintenance
1 parent 761a106 commit aa1aa4a

File tree

8 files changed

+30
-14
lines changed

8 files changed

+30
-14
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 ExecutableBookProject
3+
Copyright (c) 2024 ExecutableBookProject
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ We welcome all contributions! See the [EBP Contributing Guide](https://executabl
4242

4343
[rtd-badge]: https://readthedocs.org/projects/sphinx-proof/badge/?version=latest
4444
[rtd-link]: https://sphinx-proof.readthedocs.io/en/latest/?badge=latest
45-
[github-ci]: https://github.com/executablebooks/sphinx-proof/workflows/continuous-integration/badge.svg?branch=main
45+
[github-ci]: https://github.com/executablebooks/sphinx-proof/workflows/ci.yml/badge.svg?branch=main
4646
[github-link]: https://github.com/executablebooks/sphinx-proof
4747
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinx-proof/branch/main/graph/badge.svg
4848
[codecov-link]: https://codecov.io/gh/executablebooks/sphinx-proof

TODO.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -- Project information -----------------------------------------------------
22

33
project = "sphinx-proof"
4-
copyright = "2020, QuantEcon Developers"
4+
copyright = "2024, QuantEcon Developers"
55
author = "QuantEcon Developers"
66
master_doc = "index"
77

docs/source/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ zreferences
1616
**A proof extension for Sphinx**.
1717

1818
This package contains a [Sphinx](http://www.sphinx-doc.org/) extension
19-
for producing proof, theorem, axiom, lemma, definition, criterion, remark, conjecture,
20-
corollary, algorithm, example, property, observation, proposition and assumption directives.
19+
for producing [proof](syntax:proof), [theorem](syntax:theorem), [axiom](syntax:axiom), [lemma](syntax:lemma),
20+
[definition](syntax:definition), [criterion](syntax:criterion), [remark](syntax:remark),
21+
[conjecture](syntax:conjecture),[corollary](syntax:corollary), [algorithm](syntax:algorithm),
22+
[example](syntax:example), [property](syntax:property), [observation](syntax:observation),
23+
[proposition](syntax:proposition) and [assumption](syntax:assumption) directives.
2124

2225
**Features**:
2326

2427
1. directives are automatically numbered
2528
2. supports directive options such as `class`, `label`, and `nonumber`
26-
3. can easily be referenced through `prf:ref` role
29+
3. can be referenced through the `prf:ref` role
2730

2831
(getting-started)=
2932
## Getting Started

docs/source/syntax.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
This documentation utilized the [Markedly Structured Text (MyST)](https://myst-parser.readthedocs.io/en/latest/index.html) syntax.
55
```
66

7-
This package utilizes a [Sphinx domain](https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html) - named "proof" - to describe and link typeset markup objects (theorems, proofs, corollaries, etc.) which we think belong together. All directives follow the pattern `{<domain_name>:<typeset>}` while all the roles follow the pattern `{<domain_name>:ref}`. To utilize any directive in the `proof` domain follow the pattern `{prf:<typeset>}`. To reference any directive follow the pattern `{prf:ref}`.
7+
This package utilizes a [Sphinx domain](https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html) - named "prf" - to describe and link typeset markup objects (theorems, proofs, corollaries, etc.) which we think belong together. All directives follow the pattern `{<domain_name>:<typeset>}` while all the roles follow the pattern `{<domain_name>:ref}`. To utilize any directive in the `proof` domain follow the pattern `{prf:<typeset>}`. To reference any directive follow the pattern `{prf:ref}`.
88

99
## Collection of Directives
1010

11+
(syntax:proof)=
1112
### Proofs
1213

1314
A proof directive can be included using the `prf:proof` pattern. Unlike the other directives provided through this extension, a proof directive does not include any parameters nor does it require any arguments. A proof directive can easily be referenced through [targets](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing).
@@ -68,6 +69,7 @@ Hence $\| y - z \| \geq \| y - \hat y \|$, which completes the proof.
6869
_Source:_ [QuantEcon](https://python-advanced.quantecon.org/orth_proj.html#The-Orthogonal-Projection-Theorem)
6970

7071

72+
(syntax:theorem)=
7173
### Theorems
7274

7375
A theorem directive can be included using the `prf:theorem` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -139,6 +141,7 @@ _Source:_ [QuantEcon](https://python-advanced.quantecon.org/orth_proj.html#The-O
139141

140142
You can refer to a theorem using the `{prf:ref}` role like: ```{prf:ref}`my-theorem` ```, which will replace the reference with the theorem number like so: {prf:ref}`my-theorem`. When an explicit text is provided, this caption will serve as the title of the reference. For example, ```{prf:ref}`Orthogonal-Projection-Theorem <my-theorem>` ``` will produce: {prf:ref}`Orthogonal-Projection-Theorem <my-theorem>`.
141143

144+
(syntax:axiom)=
142145
### Axioms
143146

144147
An axiom directive can be included using the `prf:axiom` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -178,6 +181,7 @@ _Source:_ {cite}`economic-dynamics-book`
178181
You can refer to an axiom using the `{prf:ref}` role like: ```{prf:ref}`my-axiom` ```, which will replace the reference with the axiom number like so: {prf:ref}`my-axiom`. When an explicit text is provided, this caption will serve as the title of the reference.
179182

180183

184+
(syntax:lemma)=
181185
### Lemmas
182186

183187
A lemma directive can be included using the `prf:lemma` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -229,6 +233,7 @@ _Source:_ [QuantEcon](https://python-advanced.quantecon.org/robustness.html#Appe
229233
You can refer to a lemma using the `{prf:ref}` role like: ```{prf:ref}`my-lemma` ```, which will replace the reference with the lemma number like so: {prf:ref}`my-lemma`. When an explicit text is provided, this caption will serve as the title of the reference.
230234

231235

236+
(syntax:definition)=
232237
### Definitions
233238

234239
A definition directive can be included using the `prf:definition` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -282,6 +287,7 @@ _Source:_ [QuantEcon](https://python-advanced.quantecon.org/von_neumann_model.ht
282287

283288
You can refer to a definition using the `{prf:ref}` role like: ```{prf:ref}`my-definition` ```, which will replace the reference with the definition number like so: {prf:ref}`my-definition`. When an explicit text is provided, this caption will serve as the title of the reference.
284289

290+
(syntax:criterion)=
285291
### Criteria
286292

287293
A criterion directive can be included using the `prf:criterion` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -331,6 +337,7 @@ _Source:_ [Wikipedia](https://en.wikipedia.org/wiki/Equidistributed_sequence#Wey
331337
You can refer to a criterion using the `{prf:ref}` role like: ```{prf:ref}`weyls-criterion` ```, which will replace the reference with the criterion number like so: {prf:ref}`weyls-criterion`. When an explicit text is provided, this caption will serve as the title of the reference.
332338

333339

340+
(syntax:remark)=
334341
### Remarks
335342

336343
A remark directive can be included using the `prf:remark` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -391,6 +398,7 @@ _Source:_ [QuantEcon](https://python-advanced.quantecon.org/black_litterman.html
391398
You can refer to a remark using the `{prf:ref}` role like: ```{prf:ref}`my-remark` ```, which will replace the reference with the remark number like so: {prf:ref}`my-remark`. When an explicit text is provided, this caption will serve as the title of the reference.
392399

393400

401+
(syntax:conjecture)=
394402
### Conjectures
395403

396404
**Example**
@@ -415,6 +423,7 @@ This is a dummy conjecture to illustrate that one can use math in titles.
415423

416424
You can refer to a conjecture using the `{prf:ref}` role like: ```{prf:ref}`my-conjecture` ```, which will replace the reference with the conjecture number like so: {prf:ref}`my-conjecture`. When an explicit text is provided, this caption will serve as the title of the reference.
417425

426+
(syntax:corollary)=
418427
### Corollaries
419428

420429
A corollary directive can be included using the `prf:corollary` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -456,6 +465,7 @@ _Source:_ [QuantEcon](https://python-intro.quantecon.org/_static/lecture_specifi
456465
You can refer to a corollary using the `{prf:ref}` role like: ```{prf:ref}`my-corollary` ```, which will replace the reference with the corollary number like so: {prf:ref}`my-corollary`. When an explicit text is provided, this caption will serve as the title of the reference.
457466

458467

468+
(syntax:algorithm)=
459469
### Algorithms
460470

461471

@@ -519,6 +529,7 @@ _Source:_ [Wikipedia](https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algor
519529
You can refer to a algorithms using the `{prf:ref}` role like: ```{prf:ref}`my-algorithm` ```, which will replace the reference with the algorithm number like so: {prf:ref}`my-algorithm`. When an explicit text is provided, this caption will serve as the title of the reference.
520530

521531

532+
(syntax:example)=
522533
### Examples
523534

524535
An example directive can be included using the `prf:example` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -588,6 +599,7 @@ _Source:_ [QuantEcon](https://python.quantecon.org/lq_inventories.html#Example-2
588599
You can refer to an example using the `{prf:ref}` role like: ```{prf:ref}`my-example` ```, which will replace the reference with the example number like so: {prf:ref}`my-example`. When an explicit text is provided, this caption will serve as the title of the reference.
589600

590601

602+
(syntax:property)=
591603
### Properties
592604

593605
A property directive can be included using the `prf:property` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -624,6 +636,8 @@ This is a dummy property to illustrate the directive.
624636

625637
You can refer to a property using the `{prf:ref}` role like: ```{prf:ref}`my-property` ```, which will replace the reference with the property number like so: {prf:ref}`my-property`. When an explicit text is provided, this caption will serve as the title of the reference.
626638

639+
640+
(syntax:observation)=
627641
### Observations
628642

629643
An observation directive can be included using the `prf:observation` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -660,6 +674,7 @@ This is a dummy observation directive.
660674

661675
You can refer to an observation using the `{prf:ref}` role like: ```{prf:ref}`my-observation` ```, which will replace the reference with the observation number like so: {prf:ref}`my-observation`. When an explicit text is provided, this caption will serve as the title of the reference.
662676

677+
(syntax:proposition)=
663678
### Propositions
664679

665680
A proposition directive can be included using the `prf:proposition` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:
@@ -697,6 +712,7 @@ This is a dummy proposition directive.
697712
You can refer to a proposition using the `{prf:ref}` role like: ```{prf:ref}`my-proposition` ```, which will replace the reference with the proposition number like so: {prf:ref}`my-proposition`. When an explicit text is provided, this caption will serve as the title of the reference.
698713

699714

715+
(syntax:assumption)=
700716
### Assumptions
701717

702718
An assumption directive can be included using the `prf:assumption` pattern. The directive is enumerated by default and can take in an optional title argument. The following options are also supported:

sphinx_proof/domain.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ def __init__(self, env: "BuildEnvironment") -> None:
9292
for node, settings in env.app.registry.enumerable_nodes.items():
9393
self.enumerable_nodes[node] = settings
9494

95+
def resolve_any_xref(self, *args, **kwargs):
96+
return []
97+
9598
def resolve_xref(
9699
self,
97100
env: BuildEnvironment,

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ commands = pytest {posargs}
2424

2525
[testenv:docs-{update,clean}]
2626
extras = rtd
27-
whitelist_externals = rm
27+
allowlist_externals = rm
2828
commands =
2929
clean: rm -rf docs/build
3030
sphinx-build {posargs} -b html docs/source docs/build/html

0 commit comments

Comments
 (0)