Skip to content

Add INI integration#402

Merged
nathanjmcdougall merged 2 commits intomainfrom
400-create-an-ini-integration
Mar 20, 2025
Merged

Add INI integration#402
nathanjmcdougall merged 2 commits intomainfrom
400-create-an-ini-integration

Conversation

@nathanjmcdougall
Copy link
Copy Markdown
Collaborator

No description provided.

@nathanjmcdougall nathanjmcdougall linked an issue Mar 20, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for INI file integration to the module while updating configuration dependencies and test expectations. Key changes include:

  • Introducing INIFileManager and associated error classes in the INI integration.
  • Updating the pyproject.toml to include the configupdater dependency and expand supported file types.
  • Adjusting TOML and pyproject.toml test cases by removing logic related to missing value errors.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/usethis/integrations/file/ini/io.py Adds a new INI file manager with methods for reading, writing, and key access.
src/usethis/_integrations/file/ini/errors.py Introduces error classes specific to INI file operations.
tests/usethis/integrations/file/toml/test_io.py Updates tests to validate new behaviors in file management.
pyproject.toml Updates dependency list and layering to include INI integration.
src/usethis/_io.py Refactors init to set file paths and removes duplicate definitions.
src/usethis/integrations/file/toml/io.py Removes the error raise for empty keys in configuration access.
tests/usethis/integrations/file/pyproject_toml/test_pyproject_toml_io.py Adjusts deletion behavior to align with new error handling.
src/usethis/_integrations/file/pyproject_toml/errors.py Removes unused error types related to missing values.
src/usethis/_integrations/file/toml/errors.py Removes the TOMLValueMissingError related code changes.
Comments suppressed due to low confidence (1)

src/usethis/integrations/file/ini/io.py:69

  • The _content getter returns 'super()._content' while the setter assigns to '_content_by_path'. This mismatch may cause inconsistencies when reading the value; consider aligning the getter to retrieve the value from _content_by_path.
    @property

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 20, 2025

CodSpeed Performance Report

Merging #402 will not alter performance

Comparing 400-create-an-ini-integration (822ab63) with main (ae24f0f)

Summary

✅ 1 untouched benchmarks

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.48%. Comparing base (ae24f0f) to head (822ab63).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #402      +/-   ##
==========================================
+ Coverage   98.39%   98.48%   +0.08%     
==========================================
  Files          69       71       +2     
  Lines        3113     3290     +177     
==========================================
+ Hits         3063     3240     +177     
  Misses         50       50              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nathanjmcdougall nathanjmcdougall merged commit 93086e5 into main Mar 20, 2025
15 checks passed
@nathanjmcdougall nathanjmcdougall deleted the 400-create-an-ini-integration branch March 20, 2025 11:53
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.

Create an INI integration

3 participants