Skip to content

Commit

Permalink
Sphinx Error on Warnings (#478)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
  • Loading branch information
ahangsu and michaeldiamant committed Aug 3, 2022
1 parent 5a80296 commit ba4642d
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ build:
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
fail_on_warning: true

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Unreleased
## Added
* Add the ability to pass foreign reference arrays directly into inner transactions ([#384](https://github.com/algorand/pyteal/pull/384))
* NamedTuple Implementation ([#473](https://github.com/algorand/pyteal/pull/473))

## Fixed

* CI: Fail readthedocs build on warning ([#478](https://github.com/algorand/pyteal/pull/478))

## Changed

# 0.15.0
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ setup-development:
pip install -e .
pip install -r requirements.txt

setup-docs: setup-development
setup-docs:
pip install -r docs/requirements.txt
pip install doc2dash

Expand All @@ -24,7 +24,7 @@ bundle-docs-clean:

bundle-docs: bundle-docs-clean
cd docs && \
make html && \
make html SPHINXOPTS="-W --keep-going" && \
doc2dash --name pyteal --index-page index.html --online-redirect-url https://pyteal.readthedocs.io/en/ _build/html && \
tar -czvf pyteal.docset.tar.gz pyteal.docset

Expand Down Expand Up @@ -63,7 +63,7 @@ sandbox-dev-up:

sandbox-dev-stop:
docker-compose stop algod

integration-run:
pytest -n $(NUM_PROCS) --durations=10 -sv tests/integration

Expand Down
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PyTeal Package
:annotation: = <pyteal.TxnObject object>

The current transaction being evaluated. This is an instance of :any:`TxnObject`.

.. data:: Gtxn
:annotation: = <pyteal.TxnGroup object>

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx==4.2.0
sphinx==5.1.1
sphinx-rtd-theme==1.0.0
# dependencies from setup.py
py-algorand-sdk>=1.9.0,<2.0.0
Expand Down
4 changes: 2 additions & 2 deletions pyteal/ast/abi/tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def set(self, values: ComputedValue["Tuple"]) -> Expr:

def set(self, *values):
"""
set(*values: BaseType) -> Expr
set(values: ComputedValue[Tuple]) -> Expr
set(*values: BaseType) -> pyteal.Expr
set(values: ComputedValue[Tuple]) -> pyteal.Expr
Set the elements of this Tuple to the input values.
Expand Down
2 changes: 1 addition & 1 deletion pyteal/ast/abi/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def type_spec_from_annotation(annotation: Any) -> TypeSpec:
return `abi.StaticArrayTypeSpec(abi.BoolTypeSpec(), 5)`.
Args:
annotation. An annotation representing an ABI type instance.
annotation: An annotation representing an ABI type instance.
Raises:
TypeError: if the input annotation does not represent a valid ABI type instance or its
Expand Down
6 changes: 3 additions & 3 deletions pyteal/ast/gaid.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def __init__(self, txnIndex: Union[int, Expr]) -> None:
Args:
txnIndex: The index of the transaction from which the created ID should be obtained.
This index may be a Python int, or it may be a PyTeal expression that evaluates at
runtime. If it's an expression, it must evaluate to a uint64. In all cases, the index
must be less than the index of the current transaction.
This index may be a Python int, or it may be a PyTeal expression that evaluates at runtime.
If it's an expression, it must evaluate to a uint64.
In all cases, the index must be less than the index of the current transaction.
"""
super().__init__()
if type(txnIndex) is int:
Expand Down
9 changes: 5 additions & 4 deletions pyteal/ast/scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, requestedSlotId: int = None):
Args:
requestedSlotId (optional): A scratch slot id that the compiler must store the value.
This id may be a Python int in the range [0-256).
This id may be a Python int in the range [0-256).
"""
if requestedSlotId is None:
self.id = ScratchSlot.nextSlotId
Expand All @@ -42,9 +42,10 @@ def store(self, value: Expr = None) -> Expr:
"""Get an expression to store a value in this slot.
Args:
value (optional): The value to store in this slot. If not included, the last value on
the stack will be stored. NOTE: storing the last value on the stack breaks the typical
semantics of PyTeal, only use if you know what you're doing.
value (optional): The value to store in this slot.
If not included, the last value on the stack will be stored.
NOTE: storing the last value on the stack breaks the typical
semantics of PyTeal, only use if you know what you're doing.
"""
if value is not None:
return ScratchStore(self, value)
Expand Down

0 comments on commit ba4642d

Please sign in to comment.