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

Docs/Backend API docs #109

Open
wants to merge 28 commits into
base: dev
Choose a base branch
from
Open

Docs/Backend API docs #109

wants to merge 28 commits into from

Conversation

ZergLev
Copy link
Collaborator

@ZergLev ZergLev commented Jan 22, 2025

Description

Added documentation for backend API. (api/endpoints and services/json_converter)
Added Bun installation to CONTRIBUTING.md

Checklist

  • I have performed a self-review of the changes.

To Consider

  • Rewriting docs to improve them or making them more concise.
  • Refactoring one bug and a few typos/mistakes that were found. I'll do that in another PR soon.
  • Not much else, production code hasn't changed in this PR.

@ZergLev ZergLev changed the title Docs/Endpoints docs (or Backend API docs) Docs/Backend API docs Jan 23, 2025
"""Starts a `build` process with the given preset.

This runs a background task to check the status of the process every 2 seconds.

Args:
preset (Preset): The preset to set the build process for. Must be among ("success", "failure", "loop")
background_tasks (BackgroundTasks): A background tasks manager. Required to schedule a task that checks the
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
background_tasks (BackgroundTasks): A background tasks manager. Required to schedule a task that checks the
background_tasks (BackgroundTasks): A background tasks manager. Required to schedule a task that keeps checking the status of the build process in the background after returning a response.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the description now. Commit number: 32243f9.

@@ -159,6 +204,9 @@ async def start_run(
Args:
build_id (int): The id of the build process to start running.
preset (Preset): The preset to set the build process for. Must be among ("success", "failure", "loop")
background_tasks (BackgroundTasks): A background tasks manager. Required to schedule a task that checks the
Copy link
Member

Choose a reason for hiding this comment

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

same as before

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the description now. Commit number: 32243f9.

) -> Dict[str, str]:
"""Write the flows to the frontend_flows.yaml file."""
"""Write the flows to the frontend_flows.yaml file.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""Write the flows to the frontend_flows.yaml file.
"""Write the flows to the frontend_flows.yaml file. Then commit changes to git without a tag.

tags are only created when building. their names are the builds ids

Copy link
Member

Choose a reason for hiding this comment

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

Merge dev to your branch to see this fix

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Merged dev, but that didn't fix it, so I did it manually. Commit number: 536215b.

@@ -18,7 +18,16 @@
async def flows_get(
build_id: Optional[int] = None, build_manager: BuildManager = Depends(get_build_manager)
) -> Dict[str, Union[str, Dict[str, Union[list, dict]]]]:
"""Get the flows by reading the frontend_flows.yaml file."""
"""Get the flows by reading the frontend_flows.yaml file.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""Get the flows by reading the frontend_flows.yaml file.
"""Gets the flows by reading the frontend_flows.yaml file. If the build_id isn't passed then it will return the last saved (committed) flow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the description now. Commit number: 536215b.

@@ -4,6 +4,7 @@


def get_build_manager() -> BuildManager:
"""Returns the `build` process manager."""
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""Returns the `build` process manager."""
"""Returns the only used instance of `build` process manager."""

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

True, that explains it better. Changed it now in 54abaca.

@@ -14,6 +15,7 @@ def get_build_manager() -> BuildManager:


def get_run_manager() -> RunManager:
"""Returns the `run` process manager."""
Copy link
Member

Choose a reason for hiding this comment

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

same

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as above. Changed it now in 54abaca.

@ZergLev ZergLev requested a review from Ramimashkouk February 4, 2025 10:57
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