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

feat: added mermaid diagrams for some functions in ManifestGenerator #1463

Merged
merged 10 commits into from
Sep 10, 2024

Conversation

linglp
Copy link
Contributor

@linglp linglp commented Jul 30, 2024

feature

Added some mermaid diagrams for the following schematic functions:

  • _handle_output_format_logic
  • create_manifests
  • get_manifests

The diagrams were auto-generated by mermaid chatgpt plug-in, and will appear on Pdoc for schematic documentation!

Test out the documentation

To preview:

podc --mermaid path/to/manifest/generator.py

@linglp linglp changed the title feat: added for mermaid diagrams for functions in ManifestGenerator feat: added mermaid diagrams (sequence diagrams) for some functions in ManifestGenerator Jul 30, 2024
@linglp linglp changed the title feat: added mermaid diagrams (sequence diagrams) for some functions in ManifestGenerator feat: added mermaid diagrams for some functions in ManifestGenerator Jul 30, 2024
@linglp
Copy link
Contributor Author

linglp commented Jul 30, 2024

Below is a diagram generated for get_manifest function. Here's the preview:

flowchart TD
    A[Start] --> B{Dataset ID provided?}
    B -- No --> C[Get Empty Manifest URL]
    C --> D{Output Format is 'excel'?}
    D -- Yes --> E[Export to Excel]
    D -- No --> F[Return Manifest URL]
    B -- Yes --> G[Instantiate SynapseStorage]
    G --> H[Update Dataset Manifest Files]
    H --> I[Get Empty Manifest URL]
    I --> J{Manifest Record exists?}
    J -- Yes --> K[Update Dataframe]
    K --> L[Handle Output Format Logic]
    L --> M[Return Result]
    J -- No --> AN{Use Annotations?}

    AN -- No --> Q[Create dataframe from empty manifest on Google]
    Q --> AJ{Manifest file-based?}
    AJ -- Yes --> P[Add entityId and filename to manifest df]
    AJ -- No --> R[Use dataframe from an empty manifest]

    P --> L[Handle Output Format Logic]
    R -->  L[Handle Output Format Logic]

    AN -- Yes --> AM{Manifest file-based?}
    AM -- No --> L[Handle Output Format Logic]
    AM -- Yes --> AO[Process Annotations]
    AO --> AP{Annotations Empty?}
    AP -- Yes --> AQ[Create dataframe from an empty manifest on Google]
    AQ --> AR[Update dataframe]
    AP -- No --> AS[Get Manifest with Annotations]
    AS --> AR
    AR --> L[Handle Output Format Logic]
    M --> T[End]
    F --> T
    E --> T
Loading

Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

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

@linglp This is fantastic! I think if you resolve conflicts, let's get this merged in!

Not urgent ofcourse.

@linglp linglp marked this pull request as ready for review August 31, 2024 14:48
@linglp linglp requested a review from BryanFauble August 31, 2024 14:48
Copy link
Collaborator

@BryanFauble BryanFauble left a comment

Choose a reason for hiding this comment

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

A few comments, otherwise LGTM!

linglp and others added 2 commits September 10, 2024 11:12
Co-authored-by: BryanFauble <17128019+BryanFauble@users.noreply.github.com>
Copy link

@linglp linglp merged commit 48ffbe9 into develop Sep 10, 2024
7 checks passed
@linglp linglp deleted the develop-add-mermaid branch September 10, 2024 18:56
@MiekoHash
Copy link

@linglp Which JIRA ticket is this for? cc: @andrewelamb

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.

4 participants