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
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install -e .
- name: Build package
run: python build_package.py
- name: Install browsers
run: python -m playwright install
- name: Lint
run: pre-commit run --all-files
- name: Test Sync generation script
Expand Down Expand Up @@ -58,7 +62,7 @@ jobs:
pip install -e .
- name: Build package
run: python build_package.py
- name: Install
- name: Install browsers
run: python -m playwright install
- name: Test Sync API
if: matrix.os != 'ubuntu-latest'
Expand Down
1 change: 0 additions & 1 deletion api.json

This file was deleted.

2 changes: 0 additions & 2 deletions build_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,3 @@ def driver_version(platform: str) -> str:
zip.write(from_location, to_location)

os.remove(base_wheel_location)

subprocess.check_call("python -m playwright print-api-json > api.json", shell=True)
9 changes: 7 additions & 2 deletions scripts/documentation_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import json
import re
import subprocess
from sys import stderr
from typing import ( # type: ignore
Any,
Expand Down Expand Up @@ -49,8 +50,12 @@ class DocumentationProvider:
def __init__(self) -> None:
self.api: Any = {}
self.printed_entries: List[str] = []
with open("api.json") as json_file:
self.api = json.load(json_file)
process_output = subprocess.run(
["python", "-m", "playwright", "print-api-json"],
check=True,
capture_output=True,
)
self.api = json.loads(process_output.stdout)
self.errors: Set[str] = set()

method_name_rewrites: Dict[str, str] = {
Expand Down