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

[EPIC] Refactor Flank Scripts #1406

Closed
pawelpasterz opened this issue Dec 16, 2020 · 2 comments
Closed

[EPIC] Refactor Flank Scripts #1406

pawelpasterz opened this issue Dec 16, 2020 · 2 comments
Assignees
Labels

Comments

@pawelpasterz
Copy link
Contributor

pawelpasterz commented Dec 16, 2020

Refactor Flank Scripts

As a developer, I want to have well-structured and described flank-scripts commands so I can clearly understand the purpose of each, also maintain and scale the module without a doubt.

References

Motivation

Currently is quite hard to overview whole flank-scripts because the layers are mixed together and some of the features are aware of others. As result, the code is harder to understand, scale, and improve. Any new function can bring more tech-debt. Refactor could solve this problem. Also, the command hierarchy contains some legacy concepts that are confusing and should be redesigned.

Goals

  • The presentation layer is tin and not contains any logical operations.
  • The features are independent of each other.
  • The commands hierarchy has no more than one nestings.
  • Each command has a description that helps understand the purpose and results.

Design

This is the proposition of the new package hierarchy. The final design should be prepared in the scope of issue #1542

cli\
    ...
ops\
    ci\
        GenerateReleaseNotes.kt
        NextReleaseTag.kt
    git\
        LinkGitHooks.kt
    dependency\
        UpdateDependencies.kt
    firebase\
        GenerateJavaClient.kt
        UpdateApiJson.kt
        CheckForSDKUpdate.kt
    ios\
        InstallXcPretty.kt
        BuildEarlGreyExample.kt
    testartifacts\
        ...
    ...
util\
    git\
        ...
    github\
        ...
    zenhub\
        ...
    shell\
        ...
    ...

API

Wouldn't change so much, only the namings will change. Preparing a new design for an API is a part of issue #1545.

Results

The flank-scripts module is fully reorganized but the whole functionality is untouched. Additionally renaming the commands will bring some small changes in workflow files and markdown documents.

Testing

Everything should work the same as before. The most important flank-scripts commands are used by CI so it's important to check manually only the others.

Working steps:

  1. Separate logical operations from CliKt commands.
  2. Group CliKt commands in cli package and fix the structure
  3. Separate common layer
  4. Refactor common layer API
  5. Group all domain code in ops package (ops as shorthand for operations)
  6. Use a standardized naming convention for commands (camel-case preferred as easier to write).
  7. Refactor and restructure ops package
  8. Design a new structure for commands.
  9. Fix descriptions of commands.
@pawelpasterz pawelpasterz changed the title Refactor flank-scripts [PROPOSAL] Refactor flank-scripts TODO list Dec 28, 2020
@piotradamczyk5
Copy link
Contributor

Is this task is epic for refactor?

@pawelpasterz
Copy link
Contributor Author

Is this task is epic for refactor?

Correct

@piotradamczyk5 piotradamczyk5 changed the title Refactor flank-scripts TODO list [EPIC] Refactor Flank Scripts Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants