Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ dependencies = [

[project.optional-dependencies]
dev = [
"hatch-vcs>=0.4.0",
"hatch>=1.13.0",
"pytest>=8.3.3",
"pytest-cov>=6.0.0",
"pytest-asyncio>=0.24.0",
Comment thread
Sivivatu marked this conversation as resolved.
"respx>=0.22.0",
"ruff>=0.8.0",
"pytest-cov>=6.0.0",
]
Comment on lines 32 to 39

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove duplicate pytest-cov entry.

pytest-cov>=6.0.0 is already declared on line 34. The duplicate on line 38 should be removed.

Proposed fix
 dev = [
     "pytest>=8.3.3",
     "pytest-cov>=6.0.0",
     "pytest-asyncio>=0.24.0",
     "respx>=0.22.0",
     "ruff>=0.8.0",
-    "pytest-cov>=6.0.0",
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dev = [
"hatch-vcs>=0.4.0",
"hatch>=1.13.0",
"pytest>=8.3.3",
"pytest-cov>=6.0.0",
"pytest-asyncio>=0.24.0",
"respx>=0.22.0",
"ruff>=0.8.0",
"pytest-cov>=6.0.0",
]
dev = [
"pytest>=8.3.3",
"pytest-cov>=6.0.0",
"pytest-asyncio>=0.24.0",
"respx>=0.22.0",
"ruff>=0.8.0",
]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` around lines 32 - 39, Duplicate dependency entry: remove the
second occurrence of "pytest-cov>=6.0.0" from the dev list in pyproject.toml so
the dev = [...] array contains only one "pytest-cov>=6.0.0" entry; locate the
dev list and delete the redundant "pytest-cov>=6.0.0" line, preserving the
existing commas and formatting.


[project.urls]
Expand Down
1 change: 1 addition & 0 deletions scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path
from typing import Any, Dict, Optional, Tuple


import requests
from dotenv import load_dotenv

Expand Down
5 changes: 5 additions & 0 deletions src/alteryx_server_py/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def from_dotenv(

@property
def workflows(self) -> WorkflowResource:
"""Access workflow resource.

"""Access workflow operations for the current client.

Returns:
Expand All @@ -255,6 +257,9 @@ def workflows(self) -> WorkflowResource:
return self._workflows

@property
def jobs(self) -> object:
"""Access job resource.

def jobs(self) -> "JobResource":
"""Access job operations for the current client.

Expand Down
14 changes: 14 additions & 0 deletions tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,20 @@

---

## Discovered During Work

- [x] **Fix failing test suite** (2026-03-17)
- Fixed 4 test files still importing from old `alteryx_gallery_api` package (renamed to `alteryx_server_py`)
- Fixed `test_exceptions.py` infinite recursion caused by Windows path separator mismatch in `importlib.util.spec_from_file_location`
- Fixed `test_workflows.py` calling non-existent `get_workflows()` method (now uses `client.workflows.list()`)
- Fixed `test_job_resource.py` async/sync mismatch (used sync client with `await`) and broken `respx` mock patterns
- Fixed `test_client.py` and `test_client_get_workflows_models.py` using `responses` library (migrated to `respx`/`unittest.mock`)
- Fixed test data using invalid `ExecutionMode` enum value (`"Standard"` → `"Safe"`)
- Fixed duplicate empty `class AlteryxClient` definition in `client.py` causing `IndentationError`
- Fixed `AsyncJobResource.cancel()` string-based error detection to use explicit `NotFoundError` type catching

---
Comment on lines +371 to +383

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove duplicate "Discovered During Work" section.

This section duplicates the heading at line 264 and the "Fix failing test suite" entry already present at lines 340-348. The static analysis tool also flags this as a duplicate heading (MD024).

Proposed fix
-## Discovered During Work
-
-- [x] **Fix failing test suite** (2026-03-17)
-    - Fixed 4 test files still importing from old `alteryx_gallery_api` package (renamed to `alteryx_server_py`)
-    - Fixed `test_exceptions.py` infinite recursion caused by Windows path separator mismatch in `importlib.util.spec_from_file_location`
-    - Fixed `test_workflows.py` calling non-existent `get_workflows()` method (now uses `client.workflows.list()`)
-    - Fixed `test_job_resource.py` async/sync mismatch (used sync client with `await`) and broken `respx` mock patterns
-    - Fixed `test_client.py` and `test_client_get_workflows_models.py` using `responses` library (migrated to `respx`/`unittest.mock`)
-    - Fixed test data using invalid `ExecutionMode` enum value (`"Standard"` → `"Safe"`)
-    - Fixed duplicate empty `class AlteryxClient` definition in `client.py` causing `IndentationError`
-    - Fixed `AsyncJobResource.cancel()` string-based error detection to use explicit `NotFoundError` type catching
-
----
-
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Discovered During Work
- [x] **Fix failing test suite** (2026-03-17)
- Fixed 4 test files still importing from old `alteryx_gallery_api` package (renamed to `alteryx_server_py`)
- Fixed `test_exceptions.py` infinite recursion caused by Windows path separator mismatch in `importlib.util.spec_from_file_location`
- Fixed `test_workflows.py` calling non-existent `get_workflows()` method (now uses `client.workflows.list()`)
- Fixed `test_job_resource.py` async/sync mismatch (used sync client with `await`) and broken `respx` mock patterns
- Fixed `test_client.py` and `test_client_get_workflows_models.py` using `responses` library (migrated to `respx`/`unittest.mock`)
- Fixed test data using invalid `ExecutionMode` enum value (`"Standard"` → `"Safe"`)
- Fixed duplicate empty `class AlteryxClient` definition in `client.py` causing `IndentationError`
- Fixed `AsyncJobResource.cancel()` string-based error detection to use explicit `NotFoundError` type catching
---
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 371-371: Multiple headings with the same content

(MD024, no-duplicate-heading)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tasks.md` around lines 371 - 383, Remove the duplicate "Discovered During
Work" section and its "Fix failing test suite" list (the entire block that
repeats the heading and entries already present earlier), leaving only the
original heading and entries; search for the duplicate heading text "Discovered
During Work" and the "Fix failing test suite" bullet to locate the redundant
block and delete it so the markdown no longer contains the repeated section
flagged by MD024.


## Next Steps

1. Add Google-style docstrings to the remaining public APIs
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_env_loading.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from alteryx_server_py.client import AlteryxClient


def test_env_loading(monkeypatch):
# Set environment variables
monkeypatch.setenv("ALTERYX_BASE_URL", "https://env-gallery.com/webapi/")
Expand Down
Loading
Loading