Skip to content

Support item access to DockerVolume - #1044

Open
james-emerton wants to merge 5 commits into
aio-libs:mainfrom
james-emerton:volume-attrs
Open

Support item access to DockerVolume#1044
james-emerton wants to merge 5 commits into
aio-libs:mainfrom
james-emerton:volume-attrs

Conversation

@james-emerton

@james-emerton james-emerton commented Jun 15, 2026

Copy link
Copy Markdown

Implement kwargs and __getitem__() as per DockerContainer

What do these changes do?

This allows the user to access properties of a volume directly from the DockerVolume instance.

Are there changes in behavior for the user?

Arguments to DockerVolume constructor have changed. I have added support for a positional name argument.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the changes folder
    • name it <issue_id>.<type> for example (588.bug)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

james-emerton and others added 5 commits June 15, 2026 15:10
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 75.13%. Comparing base (178d8a0) to head (a7d55fd).

Files with missing lines Patch % Lines
aiodocker/volumes.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1044      +/-   ##
==========================================
+ Coverage   75.11%   75.13%   +0.02%     
==========================================
  Files          26       26              
  Lines        1965     1971       +6     
  Branches      272      272              
==========================================
+ Hits         1476     1481       +5     
- Misses        406      407       +1     
  Partials       83       83              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@james-emerton

Copy link
Copy Markdown
Author

The attribute access support in DockerContainer; upon which this change is modelled, is not specifically documented. I'm open to documenting it, but I'm not sure exactly what form that should take.

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