Skip to content

Commit e1961bc

Browse files
committed
📝 Add links to the agentic software engineering tutorial
1 parent 105e419 commit e1961bc

11 files changed

Lines changed: 134 additions & 1 deletion

File tree

docs/appendix/glossary.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,20 @@ Glossary
653653
:doc:`Python4DataScience:productive/qa/pysa` and
654654
:doc:`Python4DataScience:productive/qa/wily`.
655655

656+
.. note::
657+
We also use static code analysis and linting for the generated code
658+
in agent-based software development:
659+
660+
.. code-block:: md
661+
:caption: AGENTS.md
662+
663+
# Code quality and linting
664+
- Use ruff, ty, prek, wily for code quality and linting.
665+
- Run appropriate tooling after making changes to your code to ensure it meets quality standards.
666+
667+
.. seealso::
668+
* :ref:`agentic-software-engineering:code-quality`
669+
656670
Dynamic test procedures
657671
are used to find errors when executing the source code. A distinction is
658672
made between :term:`whitebox <Whitebox test>` and :term:`blackbox

docs/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15+
import os
16+
1517
# If extensions (or modules to document with autodoc) are in another
1618
# directory, add these directories to sys.path here. If the directory is
1719
# relative to the documentation root, use os.path.abspath to make it
1820
# absolute, like shown here.
1921
#
2022
# import sys
2123
# sys.path.insert(0, os.path.abspath("."))
22-
import os
2324
import re
2425

2526
# Set canonical URL from the Read the Docs Domain
@@ -62,6 +63,10 @@
6263
"python3.14": ("https://docs.python.org/3.14/", None),
6364
"jupyter-tutorial": ("https://jupyter-tutorial.readthedocs.io/en/latest/", None),
6465
"Python4DataScience": ("https://www.python4data.science/en/latest/", None),
66+
"agentic-software-engineering": (
67+
"https://agentic-software-engineering.readthedocs.io/en/latest/",
68+
None,
69+
),
6570
"pytest": ("https://docs.pytest.org/en/latest/", None),
6671
"Sybil": ("https://sybil.readthedocs.io/en/latest/", None),
6772
}

docs/document/doctest.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,17 @@ in a docstring or in another text file are fulfilled.
115115
:lines: 38-
116116
:lineno-start: 38
117117

118+
.. note::
119+
We also have doctests written for agent-based software development:
120+
121+
.. code-block:: md
122+
:caption: AGENTS.md
123+
124+
- Include doctests in the docstrings of your functions to provide examples
125+
126+
.. seealso::
127+
* :ref:`agentic-software-engineering:documentation`
128+
118129
.. seealso::
119130
:doc:`doctest <python3:library/doctest>` can also be used to continuous test
120131
the documentation: :ref:`ci-docs`.

docs/document/sphinx/docstrings.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,18 @@ NumPy Style Guide:
141141
"""
142142
return True
143143
144+
.. note::
145+
We also frequently use the NumPy Style Guide in agent-based software
146+
development:
147+
148+
.. code-block:: md
149+
:caption: AGENTS.md
150+
151+
- Use numpy-style docstrings for all functions and classes you create.
152+
153+
.. seealso::
154+
* :ref:`agentic-software-engineering:documentation`
155+
144156
.. _napoleon:
145157

146158
``sphinx.ext.napoleon``

docs/libs/install.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,20 @@ different environment using:
262262
:term:`uv` simplifies the creation of an initial project structure and the
263263
management of your dependencies.
264264

265+
.. note::
266+
Many coding agents typically use ``pip`` when installing packages or running
267+
scripts. We therefore need to configure them first to use ``uv``:
268+
269+
.. code-block:: md
270+
:caption: AGENTS.md
271+
272+
- Use `uv` to manage Python environments and dependencies.
273+
- Use `uv run` to execute Python scripts and commands.
274+
- Don't edit `pyproject.toml` directly. Instead, use `uv add` and `uv add --dev` to manage dependencies.
275+
276+
.. seealso::
277+
* :ref:`agentic-software-engineering:uv`
278+
265279
Installation
266280
~~~~~~~~~~~~
267281

docs/logging/index.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ What are the advantages of ``logging`` over ``print``?
3737
`logging.disabled
3838
<https://docs.python.org/3/library/logging.html#logging.disable>`_.
3939

40+
41+
.. note::
42+
We also use logging in agent-based software development to gain a more
43+
detailed insight into errors:
44+
45+
.. code-block:: md
46+
:caption: AGENTS.md
47+
48+
# Logging
49+
- Use logging to provide insight into failures. Don’t use print for debugging. Don’t use logging to hide stack traces if you are going to fail anyway.
50+
- Don't hide exceptions. Let them propagate up to the caller. If you need to catch an exception, log it and re-raise it.
51+
52+
.. seealso::
53+
* :ref:`agentic-software-engineering:logging`
54+
4055
.. seealso::
4156

4257
* `loguru <https://github.com/Delgan/loguru>`_, which makes logging almost as

docs/test/hypothesis.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ find errors in your tests.
1515
The :doc:`Jupyter Tutorial <jupyter-tutorial:notebook/testing/hypothesis>`
1616
describes how Hypothesis can also be used in Jupyter Notebooks.
1717

18+
.. note::
19+
We also use Hypothesis in agent-based software development:
20+
21+
.. code-block:: md
22+
:caption: AGENTS.md
23+
24+
- Use the `hypothesis` library for property-based testing when you have complex input spaces or need to test edge cases.
25+
26+
.. seealso::
27+
* :ref:`agentic-software-engineering:testing`
28+
1829
Installation
1930
------------
2031

docs/test/mock.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,18 @@ parameters.
385385
* `“Don’t Mock What You Don’t Own”
386386
<https://hynek.me/articles/what-to-mock-in-5-mins/>`_ by Hynek Schlawack
387387

388+
.. note::
389+
Even in agent-based software development, we try to avoid mocking as much as
390+
possible:
391+
392+
.. code-block:: md
393+
:caption: AGENTS.md
394+
395+
- Prefer testing real code where possible. Use mocks and `monkeypatch` when absolute necessary. Try to avoid mocking as much as possible.
396+
397+
.. seealso::
398+
* :ref:`agentic-software-engineering:testing`
399+
388400
Avoiding mocks with multi-level testing
389401
---------------------------------------
390402

docs/test/pytest/builtin-fixtures.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,18 @@ The ``monkeypatch`` fixture offers the following functions:
314314
it is set, the value of the environment variable is changed to
315315
:samp:`{VALUE} + prepend + {OLD_VALUE}`
316316
317+
.. note::
318+
In agent-based software development, we try to avoid monkey patching as much
319+
as possible:
320+
321+
.. code-block:: md
322+
:caption: AGENTS.md
323+
324+
- Prefer testing real code where possible. Use mocks and `monkeypatch` when absolute necessary. Try to avoid mocking as much as possible.
325+
326+
.. seealso::
327+
* :ref:`agentic-software-engineering:testing`
328+
317329
RMonkey patching of environment variables
318330
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
319331

docs/test/pytest/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ module that simplifies testing even further.
2424
* pytest has an extensive ecosystem with over 800 :doc:`plugins` for advanced
2525
testing requirements; unittest is more limited in its extensibility.
2626

27+
.. note::
28+
We also use pytest for agent-based software development:
29+
30+
.. code-block:: md
31+
:caption: AGENTS.md
32+
33+
# Testing
34+
- Use `pytest` for testing your code.
35+
- Collect pytest fixtures in a `conftest.py` file to avoid duplication.
36+
- When a test fails, run the last failed test first using `uv run pytest --last-failed`.
37+
38+
.. seealso::
39+
* :ref:`agentic-software-engineering:testing`
40+
2741
.. seealso::
2842
The :doc:`Jupyter tutorial <jupyter-tutorial:notebook/testing/ipytest>`
2943
explains how pytest can also be used in Jupyter Notebooks.

0 commit comments

Comments
 (0)