Repository navigation
Add the remaining pre-commit hooks, adopt sphinx-scrapy #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
a6cc28f
17ba3f2
d3ed932
d29d9ab
568c9f8
7359fdf
702e878
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,20 +3,25 @@ on: | |
| push: | ||
| tags: | ||
| - "[0-9]+.[0-9]+.[0-9]+" | ||
| permissions: {} | ||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: '3.13' | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install --upgrade build twine | ||
| python -m build | ||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@v1.10.2 | ||
| uses: pypa/gh-action-pypi-publish@897895f1e160c830e369f9779632ebc134688e1b # v1.10.2 # zizmor: ignore[use-trusted-publishing] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let’s switch to trusted publishing. (I’ll handle the PyPI setup) |
||
| with: | ||
| password: ${{ secrets.PYPI_TOKEN }} | ||
|
wRAR marked this conversation as resolved.
Resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,8 @@ | ||
| version: 2 | ||
| formats: all | ||
| sphinx: | ||
| configuration: docs/conf.py | ||
| build: | ||
| os: ubuntu-24.04 | ||
| tools: | ||
| python: "3.13" # Keep in sync with .github/workflows/tests.yml | ||
| python: | ||
| install: | ||
| - requirements: docs/requirements.txt | ||
| - path: . | ||
| python: "3.13" | ||
| commands: | ||
| - pip install tox | ||
| - tox -e docs -- $READTHEDOCS_OUTPUT/html |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| recursive-include tests * | ||
| recursive-include tests * |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /_build/ |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,10 @@ | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| project = "scrapy-spider-metadata" | ||
| copyright = "2023, Zyte Group Ltd" | ||
| author = "Zyte Group Ltd" | ||
| release = "0.0.0" | ||
|
|
||
| sys.path.insert(0, str(Path(__file__).parent.absolute())) # _ext | ||
| extensions = [ | ||
| "_ext", | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.intersphinx", | ||
| "sphinx.ext.viewcode", | ||
| "sphinx_scrapy", | ||
| ] | ||
|
|
||
| exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
|
||
| html_theme = "sphinx_rtd_theme" | ||
|
|
||
| intersphinx_mapping = { | ||
| "python": ( | ||
| "https://docs.python.org/3", | ||
| None, | ||
| ), | ||
| "scrapy": ( | ||
| "https://docs.scrapy.org/en/latest", | ||
| None, | ||
| ), | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| Sphinx==7.2.4 # https://github.com/sphinx-doc/sphinx/issues/11662#issuecomment-1699989128 | ||
| sphinx-rtd-theme==1.3.0 | ||
| sphinx-scrapy==0.13.0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you switch the project to use requirements.in / requirements.txt? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line seems unnecessary. I also wonder why the permissions line is nested under jobs instead of here.