pypa / bandersnatch

A PyPI mirror client according to PEP 381 http://www.python.org/dev/peps/pep-0381/
Academic Free License v3.0
448 stars 141 forks source link

Provide default values for mirror config options #1740

Closed flyinghyrax closed 4 months ago

flyinghyrax commented 4 months ago

(...finally.)

This should be a much more focused PR for addressing issue #1702 without so much additional refactoring.

I've changed the configuration files embedded in the package like so:

I changed BandersnatchConfig:

Some notable effects of this include:

Happy to tweak which options are required/have defaults and dynamic fallback behaviors for things like root_uri, if that's something we want to change at this point.

Fixes #1702 Fixes #990

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 85.83333% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 83.69%. Comparing base (4d020e8) to head (74986a2). Report is 96 commits behind head on main.

Files Patch % Lines
src/bandersnatch/configuration.py 80.00% 11 Missing and 1 partial :warning:
src/bandersnatch/main.py 61.53% 4 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1740 +/- ## ========================================== + Coverage 79.69% 83.69% +4.00% ========================================== Files 31 33 +2 Lines 4324 4380 +56 Branches 780 783 +3 ========================================== + Hits 3446 3666 +220 + Misses 721 531 -190 - Partials 157 183 +26 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.