Skip to content

Modernize packaging#394

Merged
frankrousseau merged 3 commits intocgwire:mainfrom
nledez:modernize-packaging
Apr 7, 2026
Merged

Modernize packaging#394
frankrousseau merged 3 commits intocgwire:mainfrom
nledez:modernize-packaging

Conversation

@nledez
Copy link
Copy Markdown
Contributor

@nledez nledez commented Mar 13, 2026

Problem

  • Test suite is too slow
  • Legacy project packaging scattered across setup.py, setup.cfg and pyproject.toml
  • Legacy % string formatting in tests

Solution

  • Add tests/conftest.py with an autouse fixture that isolates test state,
    and fix 5 broken tests that hardcoded the wrong base URL.
  • Consolidate all packaging configuration into a single pyproject.toml
    (PEP 621), remove setup.py and setup.cfg. Add the LGPL-3.0-only
    license classifier.
  • Replace all % string formatting with f-strings across test files.

nledez added 3 commits March 13, 2026 19:29
Add conftest.py fixture to save/restore default_client state (host,
tokens) between tests. A host mutation in test_init_host was causing
test_query_string to make a real HTTP request that blocked indefinitely.
Also fix 5 tests that hardcoded the wrong base URL instead of using
get_api_url_from_host().
Consolidate setup.py, setup.cfg and pyproject.toml into a single
pyproject.toml using PEP 621 metadata. Add LGPL-3.0-only classifier.
Copy link
Copy Markdown
Member

@NicoPennec NicoPennec left a comment

Choose a reason for hiding this comment

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

LGTM

@frankrousseau frankrousseau merged commit ba8e2b7 into cgwire:main Apr 7, 2026
11 checks passed
@nledez nledez deleted the modernize-packaging branch April 9, 2026 14:36
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.

3 participants