Skip to content

Commit 1457d4d

Browse files
authored
docs: fix readthedocs (#299)
1 parent 3245d28 commit 1457d4d

File tree

11 files changed

+67
-21
lines changed

11 files changed

+67
-21
lines changed

.bumpversion.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ search = version: {current_version}
2828
replace = version: {new_version}
2929

3030
[bumpversion:file:HISTORY.rst]
31-
search = .. comment:: bumpversion marker
32-
replace = .. comment:: bumpversion marker
31+
search = .. bumpversion marker
32+
replace = .. bumpversion marker
3333

3434
{new_version} ({now:%Y-%m-%d})
3535
------------------

.github/workflows/docs.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This is GitHub Action for cross platform building
2+
name: docs
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
builds:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.12"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Build docs
26+
env:
27+
TOXENV: docs
28+
run: |
29+
pip install -r requirements-tests.txt
30+
tox

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ __pycache__/
88

99
# Distribution / packaging
1010
.Python
11+
.venv/
1112
env/
1213
build/
1314
develop-eggs/
@@ -63,4 +64,4 @@ target/
6364

6465
# Extra
6566
.DS_Store
66-
.vscode
67+
.vscode

.readthedocs.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ sphinx:
55
fail_on_warning: true
66

77
build:
8-
os: ubuntu-20.04
8+
os: ubuntu-22.04
99
tools:
1010
# For available versions, see:
1111
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python
12-
python: "3.7" # Keep in sync with .github/workflows/checks.yml
13-
scrapy: "2.6.1"
14-
12+
python: "3.12"
13+
1514
python:
1615
install:
1716
- requirements: docs/requirements.txt
18-
- path: .
17+
- path: .

CONTRIBUTING.rst

+6-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ New to here
1818
Any issue with good first issue tag on it is a great place to start! Feel free to ask any questions here.
1919

2020
Don't know how to start
21-
~~~~~~~~~~~
21+
~~~~~~~~~~~~~~~~~~~~~~~
2222

2323
Review codebases and PRs can give you quite a knowledge to know what's going on here!
2424

@@ -39,8 +39,8 @@ Fix Bugs
3939
Look through the GitHub issues for bugs. Anything tagged with "bug"
4040
is open to whoever wants to implement it.
4141

42-
Implement Features & imporvments
43-
~~~~~~~~~~~~~~~~~~
42+
Implement Features & improvments
43+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4444

4545
Look through the GitHub issues for features. Anything tagged with "feature" or "improvments"
4646
is open to whoever wants to implement it.
@@ -70,7 +70,7 @@ Get Started!
7070
Ready to contribute? Here's how to set up `scrapy-redis` for local development.
7171

7272
Setup environment
73-
~~~~~~~~~~~~~~~
73+
~~~~~~~~~~~~~~~~~
7474

7575
1. Fork the `scrapy-redis` repo on GitHub.
7676
2. Clone your fork locally::
@@ -93,7 +93,7 @@ Setup environment
9393
Now you can make your changes locally.
9494

9595
Setup testing environment
96-
~~~~~~~~~~~~~~~
96+
~~~~~~~~~~~~~~~~~~~~~~~~~
9797

9898
1. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
9999

@@ -128,9 +128,7 @@ Before you submit a pull request, check that it meets these guidelines:
128128
2. If the pull request adds functionality, the docs should be updated. Put
129129
your new functionality into a function with a docstring, and add the
130130
feature to the list in README.rst.
131-
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
132-
https://travis-ci.org/rolando/scrapy-redis/pull_requests
133-
and make sure that the tests pass for all supported Python versions.
131+
3. Make sure that the tests pass for all supported Python versions.
134132

135133
Tips
136134
----

HISTORY.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
History
33
=======
44

5-
.. comment:: bumpversion marker
5+
.. bumpversion marker
66
77
0.9.0 (2024-07-06)
88
------------------

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
# here, relative to this directory. They are copied after the builtin
138138
# static files, so a file named "default.css" will overwrite the builtin
139139
# "default.css".
140-
html_static_path = ["_static"]
140+
# html_static_path = ["_static"]
141141

142142
# If not '', a 'Last updated on:' timestamp is inserted at every page
143143
# bottom, using the given strftime format.

docs/index.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
contain the root `toctree` directive.
55
66
Welcome to Scrapy-Redis's documentation!
7-
======================================
7+
========================================
88

99
Contents:
1010

@@ -13,7 +13,10 @@ Contents:
1313

1414
readme
1515
installation
16+
modules
17+
contributing
1618
history
19+
authors
1720

1821
Indices and tables
1922
==================

docs/modules.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
scrapy_redis
2-
============
1+
API Reference
2+
=============
33

44
.. toctree::
55
:maxdepth: 4

src/scrapy_redis/spiders.py

+2
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ def make_request_from_data(self, data):
155155
156156
For example:
157157
158+
.. code:: json
159+
158160
{
159161
"url": "https://example.com",
160162
"meta": {

tox.ini

+13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
requires =
33
tox>=4
44
envlist =
5+
docs
56
security
67
flake8
78
py{38,39,310,311,312}-scrapy{26,27,28,29,210,211}-redis{42,43,44,45,46,50}
@@ -75,3 +76,15 @@ deps =
7576
build
7677
commands =
7778
python -m build
79+
80+
[testenv:docs]
81+
basepython =
82+
python3.12
83+
deps =
84+
{[base]deps}
85+
-r docs/requirements.txt
86+
allowlist_externals =
87+
make
88+
commands =
89+
# Same command as readthedocs
90+
make -C docs html SPHINXOPTS="-T -W --keep-going -D language=en"

0 commit comments

Comments
 (0)