Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lenarother committed Mar 8, 2022
1 parent bff8185 commit b5e74fa
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
43 changes: 41 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ santa-helpers
:target: https://santa-helpers.readthedocs.io/en/latest/?version=latest
:alt: Documentation Status


.. image:: https://pyup.io/repos/github/lenarother/santa_helpers/shield.svg
:target: https://pyup.io/repos/github/lenarother/santa_helpers/
:alt: Updates
Expand All @@ -30,7 +29,47 @@ Helpers for Advent of Codee
Features
--------

* TODO
* Calculate manhattan distance

.. code-block:: python
>>> distances.manhattan((-3, 1), (0, 0))
4
* Generate neighbors

.. code-block:: python
>>> list(neighbors.neighbors((1, 1)))
[(1, 0), (0, 1), (2, 1), (1, 2)]
>>> list(neighbors.neighbors((1, 1), 8))
[
(0, 0),
(1, 0),
(2, 0),
(0, 1),
(2, 1),
(0, 2),
(1, 2),
(2, 2)
]
>>> list(neighbors.neighbors((1, 1), p_min=(1, 1)))
[(2, 1), (1, 2)]
* Generate points in path

.. code-block:: python
>>> list(paths.path_points((0, 0), 'R2'))
[(1, 0), (2, 0)]
Credits
-------
Expand Down
16 changes: 16 additions & 0 deletions docs/santa_helpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ santa\_helpers package
Submodules
----------

santa\_helpers.distances module
-------------------------------

.. automodule:: santa_helpers.distances
:members:
:undoc-members:
:show-inheritance:

santa\_helpers.neighbors module
-------------------------------

Expand All @@ -20,6 +28,14 @@ santa\_helpers.parse module
:undoc-members:
:show-inheritance:

santa\_helpers.paths module
---------------------------

.. automodule:: santa_helpers.paths
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------
Expand Down

0 comments on commit b5e74fa

Please sign in to comment.