Skip to content

Commit 972c549

Browse files
authored
docs: tidy up website tooling and repo config (#1126)
Website tooling and repo config cleanup, same as crawlee-python#2327 and apify-sdk-python#1181. - Website code is linted with type-aware oxlint (new `website/tsconfig.json`), and warnings fail CI. - 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 ef8f088 commit 972c549

16 files changed

Lines changed: 139 additions & 125 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
181181
strategy:
182182
matrix:
183-
os: ["ubuntu-latest"]
183+
os: [ubuntu-latest]
184184
python-version: ["3.11", "3.15"]
185185

186186
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
@@ -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
@@ -126,6 +126,6 @@ jobs:
126126
uses: apify/actions/signed-commit@v1.6.2
127127
with:
128128
message: "docs: Version docs for v${{ steps.snapshot.outputs.version }} [skip ci]"
129-
add: 'website/versioned_docs website/versioned_sidebars website/versions.json'
130-
pull: '--rebase --autostash'
129+
add: website/versioned_docs website/versioned_sidebars website/versions.json
130+
pull: --rebase --autostash
131131
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

‎.github/workflows/on_schedule_regenerate_models.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
workflow_dispatch:
1414

1515
schedule:
16-
- cron: "0 2 * * *"
16+
- cron: 0 2 * * *
1717

1818
concurrency:
1919
group: regenerate-models

‎.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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ Each input-side TypedDict ships in two casings: snake_case (`RequestResourceDict
8282
- Generated by `datamodel-code-generator` from the OpenAPI spec at `https://docs.apify.com/api/openapi.json` (config in `pyproject.toml` under `[tool.datamodel-codegen]`, aliases in `datamodel_codegen_aliases.json`)
8383
- After generation, `scripts/postprocess_generated_models.py` is run to apply additional fixes
8484
- To regenerate locally:
85-
- From the live published spec: `uv run poe generate-models`
86-
- From a local spec file: `uv run poe generate-models-from-file path/to/openapi.json`
85+
- From the live published spec: `uv run poe generate-models`
86+
- From a local spec file: `uv run poe generate-models-from-file path/to/openapi.json`
8787
- `scripts/openapi_spec.py` downloads the spec once into git-ignored `tmp/openapi.json` — both codegen passes read that copy, so a spec redeployed mid-run can't leave the generated files describing two different inputs — then records its `info.version` in `pyproject.toml` under `[tool.apify.openapi-spec]`
8888
- That version is a **coarse marker, not a content identity**: the spec is served latest-only, and apify-docs bumps `components/version.yaml` in a follow-up `[skip ci]` commit, so a deploy can publish new content under the old stamp. A moved value proves the spec changed; an unchanged value proves nothing
8989
- Recording is unconditional; the nightly workflow keeps it honest by committing nothing unless the models changed. A local `generate-models` that only moves that line should be dropped, not committed alone. `generate-models-from-file` leaves the line alone, so models from a candidate spec must not be committed
@@ -99,12 +99,12 @@ Each input-side TypedDict ships in two casings: snake_case (`RequestResourceDict
9999
- **Docstrings**: Google style format, single backticks for inline code references (`` `ApifyClient` `` not ``` ``ApifyClient`` ```)
100100
- **Imports**: `from __future__ import annotations` used throughout
101101
- **Commits**: [Conventional Commits](https://www.conventionalcommits.org/) format. Choose the type based on *what* changed, not just *why*:
102-
- `feat:` / `fix:` / `perf:` / `refactor:` / `style:` — **source code only**; these trigger a release and appear in the changelog
103-
- `test:` — test additions or changes (no release triggered)
104-
- `docs:` — documentation changes; also triggers a doc release on master
105-
- `ci:` — CI/workflow changes
106-
- `chore:` — dependency bumps, tooling, generated files (e.g. model regeneration PRs), and other housekeeping
107-
- `build:` — build system changes
102+
- `feat:` / `fix:` / `perf:` / `refactor:` / `style:` — **source code only**; these trigger a release and appear in the changelog
103+
- `test:` — test additions or changes (no release triggered)
104+
- `docs:` — documentation changes; also triggers a doc release on master
105+
- `ci:` — CI/workflow changes
106+
- `chore:` — dependency bumps, tooling, generated files (e.g. model regeneration PRs), and other housekeeping
107+
- `build:` — build system changes
108108

109109
## Testing
110110

‎CONTRIBUTING.md‎

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

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

131132
```sh

0 commit comments

Comments
 (0)