Skip to content

Commit f50bb00

Browse files
authored
docs: tidy up website tooling and repo config (#1181)
Website tooling and repo config cleanup, same as crawlee-python#2327 and apify-client-python#1126. - Website code is linted with type-aware oxlint (new `website/tsconfig.json`), and warnings fail CI. Fixed the few issues it found. - Removed unused website deps and aligned version ranges with the lockfile. - YAML: 2-space indent, no quotes unless needed, double quotes when they are. - markdownlint: default 2-space list indent (as in apify-docs) and fenced code blocks only. - Fixed the `.editorconfig` YAML glob. *✍️ Drafted by Claude Code*
1 parent 3ed1a48 commit f50bb00

17 files changed

Lines changed: 149 additions & 124 deletions

‎.editorconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ quote_type = single
1212
[Makefile]
1313
indent_style = tab
1414

15-
[{*.yaml, *.yml}]
15+
[{*.yaml,*.yml}]
1616
indent_size = 2
17+
quote_type = double

‎.github/workflows/_checks.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
156156
strategy:
157157
matrix:
158-
os: ["ubuntu-latest"]
158+
os: [ubuntu-latest]
159159
python-version: ["3.11", "3.14"]
160160

161161
runs-on: ${{ matrix.os }}
@@ -215,7 +215,7 @@ jobs:
215215
216216
strategy:
217217
matrix:
218-
os: ["ubuntu-latest"]
218+
os: [ubuntu-latest]
219219
python-version: ["3.11", "3.14"]
220220

221221
runs-on: ${{ matrix.os }}

‎.github/workflows/manual_release_beta.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: apify/actions/wait-for-checks@v1.6.2
2828
with:
2929
ref: ${{ github.sha }}
30-
check-regexp: '^Checks'
30+
check-regexp: ^Checks
3131

3232
release_prepare:
3333
name: Release prepare

‎.github/workflows/manual_release_docs.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: apify/actions/wait-for-checks@v1.6.2
4747
with:
4848
ref: ${{ github.sha }}
49-
check-regexp: '^Checks'
49+
check-regexp: ^Checks
5050

5151
- name: Checkout repository
5252
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -84,8 +84,8 @@ jobs:
8484
uses: apify/actions/signed-commit@v1.6.2
8585
with:
8686
message: "chore: Automatic docs theme update [skip ci]"
87-
add: 'website/package.json website/pnpm-lock.yaml'
88-
pull: '--rebase --autostash'
87+
add: website/package.json website/pnpm-lock.yaml
88+
pull: --rebase --autostash
8989
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
9090

9191
- name: Build docs

‎.github/workflows/manual_release_stable.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: apify/actions/wait-for-checks@v1.6.2
4141
with:
4242
ref: ${{ github.sha }}
43-
check-regexp: '^Checks'
43+
check-regexp: ^Checks
4444

4545
release_prepare:
4646
name: Release prepare

‎.github/workflows/manual_version_docs.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: apify/actions/wait-for-checks@v1.6.2
5151
with:
5252
ref: ${{ github.sha }}
53-
check-regexp: '^Checks'
53+
check-regexp: ^Checks
5454

5555
- name: Checkout repository
5656
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -131,6 +131,6 @@ jobs:
131131
uses: apify/actions/signed-commit@v1.6.2
132132
with:
133133
message: "docs: Version docs for v${{ steps.snapshot.outputs.version }} [skip ci]"
134-
add: 'website/versioned_docs website/versioned_sidebars website/versions.json'
135-
pull: '--rebase --autostash'
134+
add: website/versioned_docs website/versioned_sidebars website/versions.json
135+
pull: --rebase --autostash
136136
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

‎.markdownlint.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ line-length: false
88
ul-style:
99
style: dash
1010

11-
# Nested unordered lists use 4-space indentation.
12-
ul-indent:
13-
indent: 4
11+
# Code blocks are fenced, never indented.
12+
code-block-style:
13+
style: fenced
1414

1515
# Docs are MDX and embed JSX components.
1616
no-inline-html: false

‎.rules.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ uv run poe e2e-tests
5252
- Unused imports are allowed in `__init__.py` files (re-exports)
5353
- **Pre-commit hooks**: lint check + type check run automatically on commit
5454
- **Commits**: [Conventional Commits](https://www.conventionalcommits.org/) format. Choose the type based on *what* changed, not just *why*:
55-
- `feat:` / `fix:` / `perf:` / `refactor:` / `style:` — **source code only**; these trigger a release and appear in the changelog
56-
- `test:` — test additions or changes (no release triggered)
57-
- `docs:` — documentation changes; also triggers a doc release on master
58-
- `ci:` — CI/workflow changes
59-
- `chore:` — dependency bumps, tooling, and other housekeeping
60-
- `build:` — build system changes
55+
- `feat:` / `fix:` / `perf:` / `refactor:` / `style:` — **source code only**; these trigger a release and appear in the changelog
56+
- `test:` — test additions or changes (no release triggered)
57+
- `docs:` — documentation changes; also triggers a doc release on master
58+
- `ci:` — CI/workflow changes
59+
- `chore:` — dependency bumps, tooling, and other housekeeping
60+
- `build:` — build system changes
6161

6262
### Pydantic aliases
6363

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ uv run poe run-docs
122122

123123
Markdown content (this guide, `README.md`, and the `docs/` folder) is checked with
124124
[markdownlint](https://github.com/DavidAnson/markdownlint). The Docusaurus website code is linted
125-
with [oxlint](https://oxc.rs/) and formatted with [oxfmt](https://oxc.rs/). All of them run in CI.
125+
with [oxlint](https://oxc.rs/) in type-aware mode (types come from `website/tsconfig.json`) and
126+
formatted with [oxfmt](https://oxc.rs/). All of them run in CI.
126127
To run them locally (requires Node.js 22.12 or newer and pnpm), from the `website/` directory:
127128

128129
```sh

‎docs/04_upgrading/upgrading_to_v2.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Support for Python 3.8 has been dropped. The Apify Python SDK v2.x now requires
1414

1515
- The SDK now uses [crawlee](https://github.com/apify/crawlee-python) for local storage emulation. This change should not affect intended usage (working with `Dataset`, `KeyValueStore` and `RequestQueue` classes from the `apify.storages` module or using the shortcuts exposed by the `Actor` class) in any way.
1616
- There is a difference in the `RequestQueue.add_request` method: it accepts an `apify.Request` object instead of a free-form dictionary.
17-
- A quick way to migrate from dict-based arguments is to wrap it with a `Request.model_validate()` call.
18-
- The preferred way is using the `Request.from_url` helper which prefills the `unique_key` and `id` attributes, or instantiating it directly, e.g., `Request(url='https://example.tld', ...)`.
19-
- For simple use cases, `add_request` also accepts plain strings that contain a URL, e.g. `queue.add_request('https://example.tld')`.
17+
- A quick way to migrate from dict-based arguments is to wrap it with a `Request.model_validate()` call.
18+
- The preferred way is using the `Request.from_url` helper which prefills the `unique_key` and `id` attributes, or instantiating it directly, e.g., `Request(url='https://example.tld', ...)`.
19+
- For simple use cases, `add_request` also accepts plain strings that contain a URL, e.g. `queue.add_request('https://example.tld')`.
2020
- Removing the `StorageClientManager` class is a significant change. If you need to change the storage client, use `crawlee.service_container` instead.
2121

2222
## Configuration

0 commit comments

Comments
 (0)