Skip to content

group: rename the group profile to config - #334

Closed
sondove wants to merge 2 commits into
novem-code:mainfrom
sondove:sen/group-config
Closed

sondove wants to merge 2 commits into
novem-code:mainfrom
sondove:sen/group-config

Conversation

@sondove

@sondove sondove commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Group settings were exposed as profile, which collides with the profile= keyword every resource accepts to select a connection profile from the config file. Passing the settings as a keyword was read as a connection profile:

org.Group("reports", profile={"options": {"is_open": True}})

No config profile matched the dict, so no token was loaded and the request went out unauthenticated, which the API answers with a 404.

This renames the group settings to config, matching the naming used by other resources:

g = org.Group("reports", config={"options": {"is_open": True}})
g.config.name = "Reports"
g.config.options.show_members = True

A second commit fixes group option getters, which always returned False because the value read from the API ends in a newline.

Breaking change

  • group.profile is now group.config, and the profile= constructor keyword on groups now only selects the connection profile, as it does everywhere else. There is no alias.
  • NovemGroupProfile is now NovemGroupConfig (novem/group/config.py).

The API paths are unchanged; the settings are still read from and written to /profile/....

Testing

  • Existing group and org tests moved to config.
  • New tests: profile= on a group selects the connection profile, and option reads ignore the trailing newline.
  • Full suite passes (498 tests), ruff and mypy clean.

A group's name, description and options were set through `profile`, as
an attribute and as a constructor keyword. `profile` is also the keyword
that selects which account to connect as, on every resource, so a
group created with `profile={...}` connected with no credentials.

Group settings are now `config`, as on jobs and repos:

    org.Group("reports", config={"options": {"allow_inbound_mail": True}})
    group.config.options.allow_inbound_mail = True

`profile` on a group now only selects the connection. The API paths
under `/profile` are unchanged.
The API returns option values with a trailing newline, so every
option read back as False. Strip the value before comparing.
@sondove

sondove commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #333.

@sondove sondove closed this Nov 11, 2026
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.

1 participant