Skip to content

Commit

Permalink
Use Sphinx and ReadTheDocs for the documentation (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio committed Nov 21, 2023
1 parent 8b7979f commit 6690025
Show file tree
Hide file tree
Showing 33 changed files with 1,534 additions and 981 deletions.
2 changes: 2 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ commit = True
tag = True
tag_name = {new_version}

[bumpversion:file:docs/conf.py]

[bumpversion:file:scrapy_zyte_api/__version__.py]
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.11"]
tox-job: ["mypy", "linters", "twine-check"]
tox-job: ["mypy", "linters", "twine-check", "docs"]

steps:
- uses: actions/checkout@v3
Expand Down
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
formats: all
sphinx:
configuration: docs/conf.py
build:
os: ubuntu-22.04
tools:
python: "3.11" # Keep in sync with .github/workflows/test.yml
python:
install:
- requirements: docs/requirements.txt
- path: .
8 changes: 4 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ TBR
cookiejar of the request.

* A new boolean setting, ``ZYTE_API_EXPERIMENTAL_COOKIES_ENABLED``, can be
set to ``True`` to enable automated mapping of cookies from a request
set to ``True`` to enable automatic mapping of cookies from a request
cookiejar into the ``experimental.requestCookies`` Zyte API parameter.

* ``ZyteAPITextResponse`` is now a subclass of ``HtmlResponse``, so that the
Expand Down Expand Up @@ -239,10 +239,10 @@ When upgrading, you should set the following in your Scrapy settings:
be set to ``True`` to make all requests use Zyte API by default, with request
parameters being automatically mapped to Zyte API parameters.
* Add a Request meta key, ``zyte_api_automap``, that can be used to enable
automated request parameter mapping for specific requests, or to modify the
outcome of automated request parameter mapping for specific requests.
automatic request parameter mapping for specific requests, or to modify the
outcome of automatic request parameter mapping for specific requests.
* Add a ``ZYTE_API_AUTOMAP_PARAMS`` setting, which is a counterpart for
``ZYTE_API_DEFAULT_PARAMS`` that applies to requests where automated request
``ZYTE_API_DEFAULT_PARAMS`` that applies to requests where automatic request
parameter mapping is enabled.
* Add the ``ZYTE_API_SKIP_HEADERS`` and ``ZYTE_API_BROWSER_HEADERS`` settings
to control the automatic mapping of request headers.
Expand Down
Loading

0 comments on commit 6690025

Please sign in to comment.