Fix section 3 bugs and potential bugs (STATE_OF_THE_NATION) - #3
Merged
Merged
Conversation
- Version tests: assert CLI prints version-like string instead of pyproject literal so tests pass when installed package version differs - bad_test: gate intentional failing test with @pytest.mark.skip - main.py: fix temp file leak for --template minimal (return temp path, unlink in init() finally) - tools.py: explicit None default for file_writer allowed_paths + init to [] - validators.py: use str(e) for ValidationError (not e.message) - README + test_custom_llm_router: align with schema (open_agent_spec, role enum: analyst, reviewer, chat, retriever, planner, executor) Made-with: Cursor
Contributor
🧪 Test Results - Python 3.122 tests 0 ✅ 0s ⏱️ For more details on these errors, see this check. Results for commit 9162b13. ♻️ This comment has been updated with latest results. |
Contributor
🧪 Test Results - Python 3.1171 tests 68 ✅ 5s ⏱️ Results for commit f150a67. |
Contributor
🧪 Test Results - Python 3.1070 tests 68 ✅ 5s ⏱️ Results for commit 9162b13. ♻️ This comment has been updated with latest results. |
…flow README - tests/bad_test.py: add noqa: E712 so ruff passes (demo test stays skipped) - test-enhanced.yml: matrix 3.10 and 3.12 only (drop 3.11) - .github/workflows/README.md: document workflows and Python version choice Made-with: Cursor
- pytest.ini: use [pytest] section (not [tool:pytest]) so markers are registered and --strict-markers does not error on contract/cortex/multi_engine - oas_cli/__main__.py: allow 'python -m oas_cli init ...' for CI - tests/integration/test_templates.py: use python -m oas_cli instead of 'oas' so integration tests work when entry point is not on PATH Made-with: Cursor
- Add .github/workflows/ci.yml: one job, Python 3.12, on PR and push to main/develop (pytest, ruff check+format, mypy, integration test_templates.py) - Remove pr-test.yml, test-enhanced.yml, test.yml, integration-tests.yml, feature-test.yml - Update .github/workflows/README.md Made-with: Cursor
- get_version_from_pyproject: use importlib.metadata.version (no setuptools) - resolve_spec_path (minimal template): use Path(__file__)/templates/... Made-with: Cursor
Made-with: Cursor
- ruff.toml: set line-ending = 'lf' (match pyproject, avoid auto/CRLF drift) - pyproject.toml: pin ruff to >=0.15.0,<0.16 so CI and local use same formatter Made-with: Cursor
…te-packages) Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses STATE_OF_THE_NATION.md §3 — Bugs and potential bugs.
Changes
tests/test_main.py: assert CLI prints a version-like string (non-empty, contains digit) instead of matchingpyproject.toml; removed unusedget_version_from_pyproject/ tomllib.tests/bad_test.py:@pytest.mark.skipso the demo test no longer fails.oas_cli/main.py:resolve_spec_path()returns(spec_path, temp_file_to_delete);initusestry/finallyto unlink temp file when using--template minimal.oas_cli/tools.py:file_writer(..., allowed_paths=None)withif allowed_paths is None: allowed_paths = [].oas_cli/validators.py: usestr(e)instead ofe.messagefor jsonschema compatibility.open_agent_spec(canonical) and schema role enum;tests/test_custom_llm_router.pyusesopen_agent_specandrole: "chat".Tests
pytest tests/test_main.py tests/bad_test.py tests/test_custom_llm_router.py: 5 passed, 1 skipped.