Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saner package exports #104

Merged
merged 3 commits into from
Sep 18, 2024
Merged

Saner package exports #104

merged 3 commits into from
Sep 18, 2024

Conversation

mephenor
Copy link
Member

@mephenor mephenor commented Sep 17, 2024

Restructured imports to conform to the following rules:

  1. Only the needed minimum is available in each (sub)package __init__.py
  2. Lateral imports directly from a module are allowed (and prefered) within a package, everything else that should be accessed should be exposed in and imported from the corresponding __init__.py
  3. Minimize the amount of imports from higher level packages
  4. The central main.py is allowed to import directly from lower level packages

This also introduces a mixed import style, i.e. imports within the same package are now relative for better readability, so it's clear what's local and which module might have some complexity distributed across the code base.

Also moved config and work_package up one level and removed clamping for the exponential_backoff value.

@mephenor mephenor marked this pull request as ready for review September 17, 2024 09:21
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10903432722

Details

  • 67 of 76 (88.16%) changed or added relevant lines in 22 files are covered.
  • 74 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-1.6%) to 71.173%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ghga_connector/core/uploading/api_calls.py 0 4 0.0%
src/ghga_connector/cli.py 15 20 75.0%
Files with Coverage Reduction New Missed Lines %
src/ghga_connector/core/uploading/api_calls.py 74 0.0%
Totals Coverage Status
Change from base Build 10830020336: -1.6%
Covered Lines: 995
Relevant Lines: 1398

💛 - Coveralls

@mephenor mephenor merged commit 8485a7e into main Sep 18, 2024
11 checks passed
@mephenor mephenor deleted the fix/saner_package_exports branch September 18, 2024 06:26
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