Skip to content

Conversation

@panh99
Copy link
Member

@panh99 panh99 commented Dec 4, 2025

No description provided.

Comment on lines +61 to +69
def get_flwr_home() -> Path:
"""Get the Flower home directory path.
Returns FLWR_HOME environment variable if set, otherwise returns a default
subdirectory in the user's home directory.
"""
if flwr_home := os.getenv(FLWR_HOME):
return Path(flwr_home)
return Path.home() / FLWR_DIR
Copy link
Member Author

Choose a reason for hiding this comment

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

We also have a similar get_flwr_dir function. I wonder if we should merge this with it.

The original function is a bit unnecessarily complicated:

def get_flwr_dir(provided_path: str | None = None) -> Path:
    """Return the Flower home directory based on env variables."""
    if provided_path is None or not Path(provided_path).is_dir():
        return Path(
            os.getenv(
                FLWR_HOME,
                Path(f"{os.getenv('XDG_DATA_HOME', os.getenv('HOME'))}") / FLWR_DIR,
            )
        )
    return Path(provided_path).absolute()

@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Dec 4, 2025
class ConnectionConfigYamlKey:
"""YAML keys for connection configuration."""

CURRENT_CONNECTION = "current-connection"
Copy link
Member

Choose a reason for hiding this comment

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

should we still include this in the v1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants