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

Core refactoring #92

Merged
merged 24 commits into from
Jan 23, 2024
Merged

Core refactoring #92

merged 24 commits into from
Jan 23, 2024

Conversation

mephenor
Copy link
Member

@mephenor mephenor commented Jan 15, 2024

Unfortunately, this one is quite big as most of the core files have been touched in some way. However, there is not too much new code, as most changes are introduced by grouping/extracting functionality into dedicated modules and classes.

What changed

The focus of this PR is to disentagle the interdependencies that have been introduced into the connector due to organic growth. Functionality pertaining to the 3 commands exposed in the CLI has been moved into dedicated subpackages and the monolithic download/upload modules have been split into multiple, smaller modules dealing with specific aspects of the download/upload process. Where possible and sensible, functionality was grouped into classes and respective abstract base classes were introduced. This was done to remove access to class attributes of upstream classes by classes further down the line, hopefully making the the connector less rigid and brittle. I was trying to maintain some symmetry between the modules in the upload and download package, but this was not always possible, so there might be some stuff in here that would benefit from renaming. More general functionality and functions accessed across the subpackages still remain in core.

Additionally, dependencies have been updated and the local s3_fixture and associated tests have been adjusted to be session scoped and reuse the localstack testcontainer.
The subpackages down-/uploading are called so due to conflicts in monkeypatching as downlod/upload are already taken by function names in the same scope.

@mephenor mephenor force-pushed the reactoring_continue_GSI-245 branch from 386ef43 to cdb0d2a Compare January 15, 2024 15:11
Copy link

github-actions bot commented Jan 15, 2024

Pull Request Test Coverage Report for Build 7626113286

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.6%) to 72.805%

Totals Coverage Status
Change from base Build 7529091551: -2.6%
Covered Lines: 1020
Relevant Lines: 1401

💛 - Coveralls

@mephenor mephenor marked this pull request as ready for review January 15, 2024 15:50
@mephenor mephenor requested a review from Cito January 22, 2024 10:09
Cito
Cito previously approved these changes Jan 22, 2024
Copy link
Member

@Cito Cito left a comment

Choose a reason for hiding this comment

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

Made some minor suggestions where I felt readabilaty could still be improved but overall looks good already.

src/ghga_connector/cli.py Outdated Show resolved Hide resolved
src/ghga_connector/cli.py Outdated Show resolved Hide resolved
src/ghga_connector/cli.py Show resolved Hide resolved
src/ghga_connector/core/crypt/checksums.py Outdated Show resolved Hide resolved
src/ghga_connector/core/crypt/checksums.py Outdated Show resolved Hide resolved
src/ghga_connector/core/uploading/abstract_uploader.py Outdated Show resolved Hide resolved
src/ghga_connector/core/exceptions.py Outdated Show resolved Hide resolved
src/ghga_connector/core/exceptions.py Outdated Show resolved Hide resolved
src/ghga_connector/core/exceptions.py Outdated Show resolved Hide resolved
src/ghga_connector/core/exceptions.py Outdated Show resolved Hide resolved
@mephenor mephenor requested a review from Cito January 23, 2024 13:06
Copy link
Member

@Cito Cito left a comment

Choose a reason for hiding this comment

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

Thanks, looks cleaner now.

src/ghga_connector/cli.py Show resolved Hide resolved
@mephenor mephenor merged commit c4da88f into main Jan 23, 2024
8 checks passed
@mephenor mephenor deleted the reactoring_continue_GSI-245 branch January 23, 2024 14:28
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.

2 participants