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

refactor: Move source go files in /sdk package #1198

Merged
merged 8 commits into from
Jan 10, 2025
Merged

Conversation

0xivanov
Copy link
Contributor

@0xivanov 0xivanov commented Jan 3, 2025

Description

This PR reorganizes the project structure by introducing an sdk directory as the primary location for SDK-related functionality.

Changes Made

  1. Created an sdk directory to serve as the central location for SDK source files.
  2. Moved all existing source files into the sdk directory.

Why Not Sub-Packages?

  • Sub-packages are not introduced in this PR to keep the structure simple and minimize disruption to the current development workflow.
  • Sub-packaging will be considered in future iterations as the codebase grows, especially if functionality becomes more modular and requires logical grouping.

Why /sdk Instead of /src?

  • Avoiding Non-Idiomatic Practices: Other popular Go libraries, such as aws-sdk-go and go-redis, avoid using /src and instead organize their files directly in meaningful directories like sdk, pkg, or at the root level.

Fixes #1205

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
@0xivanov 0xivanov self-assigned this Jan 3, 2025
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
sdk/abi.go 59.70% <ø> (ø)
sdk/abi_decode.go 54.09% <ø> (ø)
sdk/abi_encode.go 47.58% <ø> (ø)
sdk/abi_type.go 78.19% <ø> (ø)
sdk/account_allowance_approve_transaction.go 72.46% <ø> (ø)
sdk/account_allowance_delete_transaction.go 90.35% <ø> (ø)
sdk/account_balance.go 100.00% <ø> (ø)
sdk/account_balance_query.go 85.84% <ø> (ø)
sdk/account_create_transaction.go 97.25% <ø> (ø)
sdk/account_delete_transaction.go 97.59% <ø> (ø)
... and 111 more

... and 126 files with indirect coverage changes

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Copy link
Contributor

@gsstoykov gsstoykov left a comment

Choose a reason for hiding this comment

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

I think that we shouldn't name the folder with the source sdk as the repo itself is the sdk.

.github/workflows/build.yml Outdated Show resolved Hide resolved
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
@0xivanov 0xivanov marked this pull request as ready for review January 10, 2025 11:29
@0xivanov 0xivanov requested review from a team as code owners January 10, 2025 11:29
Copy link
Contributor

@gsstoykov gsstoykov left a comment

Choose a reason for hiding this comment

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

LGTM.

@0xivanov 0xivanov merged commit b5f1ce3 into main Jan 10, 2025
6 checks passed
@0xivanov 0xivanov deleted the move-files-to-src-dir branch January 10, 2025 11:36
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.

Improve project structure
2 participants