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
17 changes: 17 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
},
{
"description": "python-semantic-release <11 requires rich<15; hold until PSR bumps its pin",
"matchPackageNames": ["rich"],
"allowedVersions": "<15"
}
]
}
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
- name: Install dependencies
run: uv sync --dev

- name: Check lockfile consistency
run: uv lock --check

- name: Run Ruff Linter
run: uv run ruff check .

Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11
3.14.7
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ pyphase6 = "pyphase6.cli:app"
[tool.ruff]
line-length = 100

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I"]

[tool.pytest.ini_options]
testpaths = ["tests"]

Expand Down
1 change: 1 addition & 0 deletions scripts/check_subjects.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/debug_create.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
3 changes: 2 additions & 1 deletion scripts/dump_subjects.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import json
import os

from playwright.sync_api import sync_playwright


Expand Down
3 changes: 2 additions & 1 deletion scripts/explore.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import json
import os

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/explore_create.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/find_add_button.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/find_add_button2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create_2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create_3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create_4.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create_5.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create_6.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create_7.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create_8.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/intercept_create_9.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/test_api_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import uuid
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/test_api_create.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import uuid
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/test_card_content.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from pyphase6.client import Phase6Client


Expand Down
3 changes: 2 additions & 1 deletion scripts/test_create_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import json
import os
import uuid

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/test_headers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/test_playwright_direct.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

from playwright.sync_api import sync_playwright


Expand Down
3 changes: 2 additions & 1 deletion scripts/test_pure_login.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import os

import httpx
import json

username = os.environ.get("PHASE6_USERNAME")
password = os.environ.get("PHASE6_PASSWORD")
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_refactor_actions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from test_refactor_client import Phase6API
from playwright.sync_api import sync_playwright
from test_refactor_client import Phase6API


class ExtendedAPI(Phase6API):
Expand Down
1 change: 1 addition & 0 deletions scripts/test_refactor_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import uuid
from pathlib import Path

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/test_url_routing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

from playwright.sync_api import sync_playwright


Expand Down
1 change: 1 addition & 0 deletions scripts/test_user_agent.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import os

import httpx
from playwright.sync_api import sync_playwright

Expand Down
7 changes: 4 additions & 3 deletions src/pyphase6/cli.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import re
import csv
import json
import re
from pathlib import Path
from typing import Optional
from rich.progress import track

import typer
from rich.console import Console
from rich.progress import track
from rich.table import Table

from pyphase6.client import Phase6Client, AuthError, APIConnectionError
from pyphase6.client import APIConnectionError, AuthError, Phase6Client

app = typer.Typer(help="CLI for managing Phase-6 vocabulary")
console = Console()
Expand Down
2 changes: 1 addition & 1 deletion src/pyphase6/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import uuid
from pathlib import Path
from typing import List, Tuple, Dict, Optional
from typing import Dict, List, Optional, Tuple

from playwright.sync_api import sync_playwright

Expand Down
3 changes: 2 additions & 1 deletion src/pyphase6/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import List, Optional

from pydantic import BaseModel
from typing import Optional, List


class SubjectIdOwner(BaseModel):
Expand Down
4 changes: 3 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from unittest.mock import MagicMock, patch

from typer.testing import CliRunner
from unittest.mock import patch, MagicMock

from pyphase6.cli import app, strip_html

runner = CliRunner()
Expand Down
8 changes: 5 additions & 3 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import json
import pytest
from unittest.mock import patch, MagicMock
from pathlib import Path
from pyphase6.client import Phase6Client, AuthError
from unittest.mock import MagicMock, patch

import pytest

from pyphase6.client import AuthError, Phase6Client


@pytest.fixture
Expand Down
Loading