Skip to content

docs: convert documentation from rst to google style#965

Draft
martynia wants to merge 29 commits into
DIRACGrid:mainfrom
martynia:janusz_googledocs_927
Draft

docs: convert documentation from rst to google style#965
martynia wants to merge 29 commits into
DIRACGrid:mainfrom
martynia:janusz_googledocs_927

Conversation

@martynia

@martynia martynia commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Adding google-style documentation. Addresses #927

@read-the-docs-community

read-the-docs-community Bot commented Jul 1, 2026

Copy link
Copy Markdown

Documentation build overview

📚 diracx | 🛠️ Build #33430774 | 📁 Comparing 16d2d74 against latest (b8db2cc)

  🔍 Preview build  

1 file changed
± admin/reference/env-variables/index.html

@aldbr aldbr marked this pull request as draft July 2, 2026 08:04
@aldbr aldbr changed the title Janusz googledocs 927 docs: convert documentation from rst to google style 927 Jul 2, 2026
@aldbr aldbr changed the title docs: convert documentation from rst to google style 927 docs: convert documentation from rst to google style Jul 2, 2026
@martynia martynia force-pushed the janusz_googledocs_927 branch from c75ab7d to 7cdb0a0 Compare July 3, 2026 16:18
@martynia martynia force-pushed the janusz_googledocs_927 branch from 7cdb0a0 to 555c833 Compare July 3, 2026 16:25
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why don't you put the type here?

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.
"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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."""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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]:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.
"""

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.

Enhancement: Harmonize Docstring convention to Google Style (Native MkDocs Support & CI Enforcement)

2 participants