Skip to content

Move build system to UV, add vscode debugger/test ui, add python 3.13 build/test target#188

Open
nateinaction wants to merge 18 commits intoeconchick:masterfrom
nateinaction:use-uv
Open

Move build system to UV, add vscode debugger/test ui, add python 3.13 build/test target#188
nateinaction wants to merge 18 commits intoeconchick:masterfrom
nateinaction:use-uv

Conversation

@nateinaction
Copy link

@nateinaction nateinaction commented Jul 1, 2025

Hey Lynn,

I playfully (🪂) worked my way toward debugging issue #187. To start that journey I wanted to update some of the developer tooling to help me get to debugging a little quicker. I also needed to update the CI system to get builds passing since some of the action images had been deprecated and removed. What do you think?

  • Moved to using UV for python environment management
  • Updated contributing readme with new uv based commands
  • A teensy weensy code change in badge_gen.py to satisfy mypy
  • Another teensy weensy code change in badge_gen.py to prevent an OSError from ruining the day
    E   OSError: no library called "cairo-2" was found
    E   no library called "cairo" was found
    E   no library called "libcairo-2" was found
  • Added testing for python 3.13 and set that as the latest version
  • Updated all ci dependencies because ci was broken
Captura de pantalla 2025-06-30 a la(s) 19 05 44
  • Added support for running tests in vscode ui
Captura de pantalla 2025-06-30 a la(s) 18 46 56
  • Added support for running the debugger in vscode
Captura de pantalla 2025-06-30 a la(s) 18 48 19 Captura de pantalla 2025-06-30 a la(s) 19 32 58
  • Improved error message when interrogate encounters a syntax error in a codebase

Before
Captura de pantalla 2025-06-30 a la(s) 20 50 41

After
Captura de pantalla 2025-06-30 a la(s) 20 50 51

Have you tested this? If so, how?

All tests running in CI and I have tested all contributor doc commands locally.

Checklist for PR author(s)

  • Changes are covered by unit tests (no major decrease in code coverage %).
  • All tests pass.
  • Docstring coverage is 100% via tox -e docs or interrogate -c pyproject.toml (I mean, we should set a good example 😄).
  • Updates to documentation:
    • Document any relevant additions/changes in README.rst.
    • Manually update both the README.rst and docs/index.rst for any new/changed CLI flags.
    • Any changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in the project's __init__.py file.

Release note

- Improved error message when encountering syntax errors in a codebase

Solves #187

@nateinaction
Copy link
Author

Happy Monday @econchick! I've updated the PR to use the uv build backend which is now stable.

Comment on lines +238 to +245
current_results = []
for t in texts:
if (
t.hasAttribute("data-interrogate")
and t.childNodes
and hasattr(t.childNodes[0], "data")
):
current_results.append(t.childNodes[0].data)
Copy link
Author

Choose a reason for hiding this comment

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

teensy weensy code change to satisfy mypy

try:
import cairosvg
except ImportError: # pragma: no cover
except (ImportError, OSError): # pragma: no cover
Copy link
Author

@nateinaction nateinaction Jul 7, 2025

Choose a reason for hiding this comment

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

Another teensy weensy code change to prevent an OSError from ruining the day while running tests

E   OSError: no library called "cairo-2" was found
E   no library called "cairo" was found
E   no library called "libcairo-2" was found

Comment on lines +253 to +258
try:
parsed_tree = ast.parse(source_tree)
except SyntaxError as e:
click.echo(f"Failed to parse {filename}: {str(e)}", err=True)
return None

Copy link
Author

@nateinaction nateinaction Jul 7, 2025

Choose a reason for hiding this comment

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

Improved error message when interrogate encounters a syntax error in a codebase

Before
Captura de pantalla 2025-06-30 a la(s) 20 50 41

After
Captura de pantalla 2025-06-30 a la(s) 20 50 51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant