Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ quote_type = single
[Makefile]
indent_style = tab

[{*.yaml, *.yml}]
[{*.yaml,*.yml}]
indent_size = 2
quote_type = double
2 changes: 1 addition & 1 deletion .github/workflows/_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:

strategy:
matrix:
os: ["ubuntu-latest"]
os: [ubuntu-latest]
python-version: ["3.11", "3.15"]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_release_beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: apify/actions/wait-for-checks@v1.6.2
with:
ref: ${{ github.sha }}
check-regexp: '^Checks'
check-regexp: ^Checks

release_prepare:
name: Release prepare
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual_release_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: apify/actions/wait-for-checks@v1.6.2
with:
ref: ${{ github.sha }}
check-regexp: '^Checks'
check-regexp: ^Checks

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

- name: Build docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_release_stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: apify/actions/wait-for-checks@v1.6.2
with:
ref: ${{ github.sha }}
check-regexp: '^Checks'
check-regexp: ^Checks

release_prepare:
name: Release prepare
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual_version_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: apify/actions/wait-for-checks@v1.6.2
with:
ref: ${{ github.sha }}
check-regexp: '^Checks'
check-regexp: ^Checks

- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -126,6 +126,6 @@ jobs:
uses: apify/actions/signed-commit@v1.6.2
with:
message: "docs: Version docs for v${{ steps.snapshot.outputs.version }} [skip ci]"
add: 'website/versioned_docs website/versioned_sidebars website/versions.json'
pull: '--rebase --autostash'
add: website/versioned_docs website/versioned_sidebars website/versions.json
pull: --rebase --autostash
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/on_schedule_regenerate_models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
workflow_dispatch:

schedule:
- cron: "0 2 * * *"
- cron: 0 2 * * *

concurrency:
group: regenerate-models
Expand Down
6 changes: 3 additions & 3 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ line-length: false
ul-style:
style: dash

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

# Docs are MDX and embed JSX components.
no-inline-html: false
Expand Down
16 changes: 8 additions & 8 deletions .rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ Each input-side TypedDict ships in two casings: snake_case (`RequestResourceDict
- 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`)
- After generation, `scripts/postprocess_generated_models.py` is run to apply additional fixes
- To regenerate locally:
- From the live published spec: `uv run poe generate-models`
- From a local spec file: `uv run poe generate-models-from-file path/to/openapi.json`
- From the live published spec: `uv run poe generate-models`
- From a local spec file: `uv run poe generate-models-from-file path/to/openapi.json`
- `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]`
- 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
- 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
Expand All @@ -99,12 +99,12 @@ Each input-side TypedDict ships in two casings: snake_case (`RequestResourceDict
- **Docstrings**: Google style format, single backticks for inline code references (`` `ApifyClient` `` not ``` ``ApifyClient`` ```)
- **Imports**: `from __future__ import annotations` used throughout
- **Commits**: [Conventional Commits](https://www.conventionalcommits.org/) format. Choose the type based on *what* changed, not just *why*:
- `feat:` / `fix:` / `perf:` / `refactor:` / `style:` — **source code only**; these trigger a release and appear in the changelog
- `test:` — test additions or changes (no release triggered)
- `docs:` — documentation changes; also triggers a doc release on master
- `ci:` — CI/workflow changes
- `chore:` — dependency bumps, tooling, generated files (e.g. model regeneration PRs), and other housekeeping
- `build:` — build system changes
- `feat:` / `fix:` / `perf:` / `refactor:` / `style:` — **source code only**; these trigger a release and appear in the changelog
- `test:` — test additions or changes (no release triggered)
- `docs:` — documentation changes; also triggers a doc release on master
- `ci:` — CI/workflow changes
- `chore:` — dependency bumps, tooling, generated files (e.g. model regeneration PRs), and other housekeeping
- `build:` — build system changes

## Testing

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ uv run poe run-docs

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

```sh
Expand Down
20 changes: 6 additions & 14 deletions tests/integration/test_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

from collections.abc import AsyncIterator, Iterator
from datetime import timedelta
from typing import TYPE_CHECKING

Expand Down Expand Up @@ -468,19 +467,12 @@ async def test_task_runs_iterate(client: ApifyClient | ApifyClientAsync, *, is_a
run = await maybe_await(task_client.call())
assert isinstance(run, Run)

iterator = task_client.runs().iterate(limit=5)
collected: list[RunListItem] = []
if is_async:
assert isinstance(iterator, AsyncIterator)
async for r in iterator:
assert isinstance(r, RunListItem)
collected.append(r)
else:
assert isinstance(iterator, Iterator)
for r in iterator:
assert isinstance(r, RunListItem)
collected.append(r)

collected = await collect_iterate_until_present(
lambda: task_client.runs().iterate(limit=5),
{run.id},
item_type=RunListItem,
is_async=is_async,
)
run_ids = [r.id for r in collected]
assert run.id in run_ids

Expand Down
File renamed without changes.
19 changes: 9 additions & 10 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"lint:fix": "pnpm lint:md:fix && pnpm lint:code:fix",
"lint:md": "cd .. && markdownlint --config .markdownlint.yaml \"**/*.{md,mdx}\" --ignore-path .gitignore --ignore website/versioned_docs --ignore website/versioned_sidebars --ignore CHANGELOG.md --ignore docs/changelog.md",
"lint:md:fix": "cd .. && markdownlint --fix --config .markdownlint.yaml \"**/*.{md,mdx}\" --ignore-path .gitignore --ignore website/versioned_docs --ignore website/versioned_sidebars --ignore CHANGELOG.md --ignore docs/changelog.md",
"lint:code": "oxlint",
"lint:code:fix": "oxlint --fix",
"lint:code": "oxlint --type-aware --deny-warnings",
"lint:code:fix": "oxlint --type-aware --fix",
"format": "oxfmt",
"format:check": "oxfmt --check",
"opt:images": "pnx --config.onlyBuiltDependencies=* @343dev/optimizt --webp",
Expand All @@ -28,26 +28,25 @@
"@apify/docusaurus-plugin-typedoc-api": "^5.1.16",
"@docusaurus/core": "^3.10.2",
"@docusaurus/faster": "^3.10.2",
"@docusaurus/plugin-client-redirects": "^3.10.2",
"@docusaurus/preset-classic": "^3.10.2",
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.2",
"clsx": "^2.1.1",
"docusaurus-gtm-plugin": "^0.0.2",
"prop-types": "^15.8.1",
"raw-loader": "^4.0.2",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"unist-util-visit": "^5.1.0"
},
"devDependencies": {
"@apify/oxlint-config": "^0.3.0",
"@apify/tsconfig": "^0.2.0",
"@types/react": "^19.2.18",
"@docusaurus/module-type-aliases": "^3.10.2",
"@docusaurus/types": "^3.10.2",
"@types/react": "^19.3.0",
"markdownlint": "^0.41.1",
"markdownlint-cli": "^0.49.1",
"oxfmt": "^0.72.0",
"oxlint": "^1.81.0",
"path-browserify": "^1.0.1",
"oxlint": "^1.87.0",
"oxlint-tsgolint": "^7.0.2004",
"rimraf": "^6.1.3",
"typescript": "^6.0.3"
},
Expand Down
Loading
Loading