Skip to content

Commit

Permalink
docs(tutorial): port the ASGI tutorial (#1737)
Browse files Browse the repository at this point in the history
* docs(tutorial): start porting the ASGI tutorial (work-in-progress)

* chore(tools): fix a PEP8 import order violation in check_copy_paste.py

* docs(tutorial): make further progress porting the ASGI tutorial

* docs(ASGI tutorial): copy-paste the testing part

WiP: replace `birdisle` (it is getting stale/abandoned wrt new CPython versions)
w/ smth else.
Add "copy-paste under" directives `for setup.py` and `tox.ini`.

* WiP: port tests and set up running them in our CI

* WiP: kindly ask Git not to ignore asgilook coverage config

* Move Redis configuration to a more fitting place in the text.

* docs(asgilook): swap out the sadly unmaintained `birdisle` to `fakeredis`

* docs(asgilook): rework the storage path fixture injection

* docs(tutorial): get ready for review...

* docs(ASGI tutorial): address a portion of review comments

* docs(asgilook): embrace pathlib.Path as per review suggestion

* test(asgilook): assert that thumbnails are not corrupted by caching

* docs(tutorial): address a batch of kgriffs' comments

* docs(tutorial): write a couple of paragraphs on field converters

* docs(tutorial): add a paragraph on 404 & 405

* docs(tutorial): misc improvements

* docs(ASGI tutorial): clean up and flesh out the testing section

* docs(ASGI tutorial): clarify the possibility of matching a sink prefix
  • Loading branch information
vytas7 committed Dec 22, 2020
1 parent ba78a52 commit 9205f9c
Show file tree
Hide file tree
Showing 22 changed files with 1,386 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- "docs"
- "towncrier"
- "look"
- "asgilook"
- "check_vendored"
- "twine_check"
- "daphne"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ pip-log.txt
htmlcov
nosetests.xml

# ASGI tutorial
!examples/asgilook/.coveragerc

# Docs
docs/_build
dash
Expand Down
4 changes: 4 additions & 0 deletions docs/api/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ specifications in the URI template:
some_resource
)
.. _routing_builtin_converters:

Built-in Converters
-------------------

Expand All @@ -283,6 +285,8 @@ Built-in Converters
.. autoclass:: falcon.routing.DateTimeConverter
:members:

.. _routing_custom_converters:

Custom Converters
-----------------

Expand Down
6 changes: 6 additions & 0 deletions docs/user/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ same resource class:
app.add_route('/resources/{id}', resource)
app.add_route('/resources', resource, suffix='collection')
.. _recommended-route-layout:

What is the recommended way to map related routes to resource classes?
----------------------------------------------------------------------

Expand Down Expand Up @@ -904,6 +906,8 @@ Furthermore, the HTTP2 standard also mandates that header field names MUST be
converted to lowercase (see `RFC 7540, Section 8.1.2
<https://httpwg.org/specs/rfc7540.html#rfc.section.8.1.2>`_).

.. _faq_static_files:

Can Falcon serve static files?
------------------------------

Expand Down Expand Up @@ -967,6 +971,8 @@ use cases that may not be supported by your client library, simply encapsulate
the client library within a management class that handles all the tricky bits,
and pass that around instead.

.. _configuration-approaches:

What is the recommended approach for making configuration variables available to multiple resource classes?
-----------------------------------------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ User Guide
install
quickstart
tutorial
tutorial-asgi
recipes/index
faq
Loading

0 comments on commit 9205f9c

Please sign in to comment.