docs: convert documentation from rst to google style#965
Draft
martynia wants to merge 29 commits into
Draft
Conversation
c75ab7d to
7cdb0a0
Compare
7cdb0a0 to
555c833
Compare
for more information, see https://pre-commit.ci
devlink42
reviewed
Jul 3, 2026
Comment on lines
+108
to
+110
| vo (Optional[str]): Virtual Organization name (validated by `vo_callback`). | ||
| group (Optional[str]): Group name within the VO. | ||
| property (Optional[list[str]]): Additional properties to request. |
There was a problem hiding this comment.
Suggested change
| vo (Optional[str]): Virtual Organization name (validated by `vo_callback`). | |
| group (Optional[str]): Group name within the VO. | |
| property (Optional[list[str]]): Additional properties to request. | |
| vo (Optional[str]): Virtual Organization name (validated by `vo_callback`). | |
| group (Optional[str]): Group name within the VO. | |
| property (Optional[list[str]]): Additional properties to request. |
| property (Optional[list[str]]): Additional properties to request. | ||
|
|
||
| Raises: | ||
| RuntimeError: If the device flow fails or expires before completion. |
There was a problem hiding this comment.
Suggested change
| RuntimeError: If the device flow fails or expires before completion. | |
| RuntimeError: If the device flow fails or expires before completion. |
Comment on lines
+26
to
+28
|
|
||
| Returns: | ||
| None |
There was a problem hiding this comment.
Do we really need to put 'Returns: None' when it returns nothing? You didn't put it for the previous file, so should we always put it or never put it? I don't know what the best approach is or what we want.
| `NotImplementedError`. | ||
|
|
||
| Args: | ||
| data: Arbitrary JSON-serializable data to display. |
| The class understands headers of the form ``"unit start-end/total"`` | ||
| (e.g. ``"jobs 0-9/100"``) and exposes parsed attributes suitable for | ||
| building human-readable captions for CLI output. | ||
| """ |
There was a problem hiding this comment.
You can probably add Attributes: for unit, start, end and total?
Suggested change
| """ | |
| Attributes: | |
| unit (str | None): The unit of the range (e.g., "bytes", "items", "jobs"). | |
| start (int | None): The starting index of the requested range. | |
| end (int | None): The ending index of the requested range. | |
| total (int | None): The total number of items available. | |
| """ |
|
|
||
| scheme = "git+file" | ||
|
|
||
| def __init__(self, *, backend_url: ConfigSourceUrl) -> None: |
There was a problem hiding this comment.
Suggested change
| def __init__(self, *, backend_url: ConfigSourceUrl) -> None: | |
| """Initialize the local Git configuration source. | |
| Args: | |
| backend_url (ConfigSourceUrl): The URL containing the repository path. | |
| Raises: | |
| ValueError: If the backend URL does not contain a valid path, | |
| or if the provided path is not a valid Git repository. | |
| """ |
|
|
||
| class BaseGitConfigSource(ConfigSource): | ||
| """Base class for the git based config source.""" | ||
| """Base class for Git-backed configuration sources.""" |
There was a problem hiding this comment.
Suggested change
| """Base class for Git-backed configuration sources.""" | |
| """Base class for Git-backed configuration sources. | |
| Attributes: | |
| repo_location (Path): The local file system path where the repository is stored. | |
| scheme (str): The URL scheme identifier required by the parent registry. | |
| remote_url (str): The extracted remote URL for the Git repository. | |
| git_revision (str): The specific Git revision (branch, tag, or commit) to use. | |
| """ |
| __registry: dict[str, type["ConfigSource"]] = {} | ||
| scheme: str | ||
|
|
||
| def __init__(self, *, backend_url: ConfigSourceUrl) -> None: |
There was a problem hiding this comment.
Suggested change
| def __init__(self, *, backend_url: ConfigSourceUrl) -> None: | |
| """Initialize the Git-backed configuration source. | |
| Args: | |
| backend_url (ConfigSourceUrl): The backend URL containing the Git | |
| configuration parameters. | |
| """ |
| self.remote_url = self.extract_remote_url(backend_url) | ||
| self.git_revision = self.get_git_revision_from_url(backend_url) | ||
|
|
||
| def latest_revision(self) -> tuple[str, datetime]: |
There was a problem hiding this comment.
Suggested change
| def latest_revision(self) -> tuple[str, datetime]: | |
| """Retrieve the latest Git revision hash and its modification timestamp. | |
| Returns: | |
| tuple[str, datetime]: A tuple containing the commit hash (str) and | |
| the exact modification timestamp (datetime) of the latest revision. | |
| Raises: | |
| BadConfigurationVersionError: If the underlying Git commands fail to | |
| parse the revision or retrieve the commit information. | |
| """ |
| return rev, modified | ||
|
|
||
| def read_raw(self, hexsha: str, modified: datetime) -> Config: | ||
| """:param: hexsha commit hash""" |
There was a problem hiding this comment.
Suggested change
| """Read and parse the raw configuration from a specific Git commit. | |
| Args: | |
| hexsha (str): The Git commit hash to read the configuration from. | |
| modified (datetime): The modification timestamp associated with the commit. | |
| Returns: | |
| Config: The validated configuration object populated with the repository data. | |
| Raises: | |
| BadConfigurationVersionError: If the Git command fails to locate or read | |
| the specified configuration blob. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding google-style documentation. Addresses #927