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

Core: add docstrings for launcher components #4148

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

qwint
Copy link
Contributor

@qwint qwint commented Nov 4, 2024

What is this fixing or adding?

adds docstrings, mostly off the top of my head with some double-checking,
any wording suggestions and/or clarifications appreciated

How was this tested?

wasn't

If this makes graphical changes, please attach screenshots.

@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Nov 4, 2024
@Exempt-Medic Exempt-Medic added the is: documentation Improvements or additions to documentation. label Nov 4, 2024
type: Type
"""Classification of component intent to filter in the Launcher GUI"""
Copy link
Contributor

Choose a reason for hiding this comment

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

A little confused by what this is actually supposed to mean. Looking at nearby code helps a little, but after reading this, I'm not fully sure what type DOES, if I should set it, what I should set it to/with, and what happens if I choose one option over the others.

Copy link
Contributor

Choose a reason for hiding this comment

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

It affects the column and sort order of the Launcher UI.

Right side is Clients, left side is Tools, Misc, and Adjusters in that order.

Copy link
Contributor

@nicholassaylor nicholassaylor Nov 6, 2024

Choose a reason for hiding this comment

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

I guess my point is that it's not obvious when reading the docstring. At the least, I would expect that making a component a client puts it on the right side.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

part of my intent on this wording is to be generic enough that it doesn't need to be rewritten with #3934
is the typing of type being Type the confusing part? If it was more obvious that there was an enum to reference about potential values help clarify?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also when writing it I forgot that the init parameter for type is optional (and gets inferred by substrings of component name), because the actual value on the class is not optional
so that clarification could be expanded upon

Copy link
Contributor

Choose a reason for hiding this comment

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

Referencing the enum could help

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with a bit more clarifications

Copy link
Contributor

@silasary silasary left a comment

Choose a reason for hiding this comment

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

This all sounds good to me

Copy link
Contributor

@nicholassaylor nicholassaylor left a comment

Choose a reason for hiding this comment

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

In light of #3934, code LGTM

Copy link
Contributor

@nicholassaylor nicholassaylor left a comment

Choose a reason for hiding this comment

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

Reaffirming approval

@ScipioWright ScipioWright added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Nov 22, 2024
Copy link
Collaborator

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

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

Little things

worlds/LauncherComponents.py Outdated Show resolved Hide resolved
worlds/LauncherComponents.py Outdated Show resolved Hide resolved
worlds/LauncherComponents.py Outdated Show resolved Hide resolved
frozen_name: Optional[str]
"""Recommended to use func instead; Name of the frozen EXE file for this component"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is EXE the right term here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not technically correct on linux i believe, but succinct enough for my tastes (willing to take suggestions)

worlds/LauncherComponents.py Outdated Show resolved Hide resolved
worlds/LauncherComponents.py Outdated Show resolved Hide resolved
worlds/LauncherComponents.py Outdated Show resolved Hide resolved
@Exempt-Medic Exempt-Medic added the waiting-on: author Issue/PR is waiting for feedback or changes from its author. label Nov 22, 2024
Copy link
Collaborator

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

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

LGTM

@Exempt-Medic Exempt-Medic removed the waiting-on: author Issue/PR is waiting for feedback or changes from its author. label Nov 22, 2024
worlds/LauncherComponents.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: documentation Improvements or additions to documentation. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants