Skip to content

Commit

Permalink
Add instructions for building docs using Readthedocs Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed Mar 3, 2021
1 parent 3931f39 commit 8f07ecc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
16 changes: 15 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,22 @@ $ open docs/_build/index.html
$ xdg-open docs/_build/index.html
```

Documentation is automatically built by ReadTheDocs whenever code is merged into the `main` branch.
### Readthedocs
Documentation is automatically built by Readthedocs whenever code is merged into the `main` branch.

Sometimes, there are differences in the Readthedocs build environment that can cause builds to
succeed locally but fail remotely. To help debug this, you can use the Readthedocs Docker container
(`readthedocs/build`) to perform the build. Example:
```bash
docker pull readthedocs/build
docker run --rm -ti \
-v (pwd):/home/docs/project \
readthedocs/build \
/bin/bash -c \
"cd /home/docs/project \
&& pip3 install '.[dev]' \
&& make -C docs html"
```

## Releases
Releases are built and published to pypi based on **git tags.**
Expand Down
8 changes: 4 additions & 4 deletions aiohttp_client_cache/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ class CacheBackend:
Args:
cache_name: Cache prefix or namespace, depending on backend; see notes below
expire_after: Number of hours after which a cache entry will expire; se ``None`` to
expire_after: Number of hours after which a cache entry will expire; set to ``None`` to
never expire
allowed_codes: Limit caching only for response with this codes
allowed_methods: Cache only requests of this methods
allowed_codes: Only cache responses with one of these codes
allowed_methods: Cache only responses for one of these HTTP methods
include_headers: Make request headers part of the cache key
ignored_params: List of request parameters to be excluded from the cache key.
filter_fn: function that takes a :py:class:`aiohttp.ClientResponse` object and
Expand All @@ -54,7 +54,7 @@ class CacheBackend:
def __init__(
self,
cache_name: str = 'aiohttp-cache',
expire_after: Union[int, timedelta] = None,
expire_after: Union[int, float, timedelta] = None,
allowed_codes: tuple = (200,),
allowed_methods: tuple = ('GET', 'HEAD'),
include_headers: bool = False,
Expand Down

0 comments on commit 8f07ecc

Please sign in to comment.