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

Formatting for entire openfl namespace (including experimental) #998

Merged
merged 27 commits into from
Jul 24, 2024

Conversation

MasterSkepticista
Copy link
Collaborator

@MasterSkepticista MasterSkepticista commented Jul 9, 2024

Pylint score before any changes: 5.45/10
Edit: Pylint score after this PR: 8.09/10

  • Convert all imports to be absolute.
  • Migrate all imports to be on top-level.
  • Sort all imports.
  • Re-insert updated Copyright headers in all impacted files.
  • Update Github actions workflow to use the new linting script.
  • Format code.
  • Clear all CI tests.
  • Works with OpenFL-Security.

Reviewers, pls note:

# NOTE: This test is disabled because of cryptic behaviour on calling
# _certify(). Previous version of _certify() had imports defined within
# the function, which allowed theses tests to pass, whereas the goal of the
# @mock.patch here seems to be to make them dummy. Usefulness of this test is
# doubtful. Now that the imports are moved to the top level (a.k.a out of
# _certify()) this test fails.
# In addition, using dummy return types for read/write key/csr seems to
# obviate the need for even testing _certify().

Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
@MasterSkepticista MasterSkepticista marked this pull request as ready for review July 10, 2024 08:17
@MasterSkepticista
Copy link
Collaborator Author

This has been a tiring one. Request this be merged as soon as we can (ideally before any open feature PRs), so future PRs can make use of the updated code practices.

@MasterSkepticista MasterSkepticista changed the title [Draft] Formatting for entire openfl namespace (including experimental) Formatting for entire openfl namespace (including experimental) Jul 10, 2024
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Signed-off-by: Shah, Karan <karan.shah@intel.com>
Copy link
Collaborator

@mansishr mansishr left a comment

Choose a reason for hiding this comment

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

LGTM! Great work!

Copy link
Collaborator

@kta-intel kta-intel left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the effort. Code looks much cleaner now. This will be nice going forward

Copy link
Collaborator

@nammbash nammbash left a comment

Choose a reason for hiding this comment

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

Nice technical debt PR!. LGTM

Copy link
Contributor

@psfoley psfoley left a comment

Choose a reason for hiding this comment

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

Great work, @MasterSkepticista! Approved and ready for merge

@psfoley psfoley merged commit 660ad32 into develop Jul 24, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants