Skip to content

Process editor enhancement - #70

Open
yoavnash wants to merge 68 commits into
mainfrom
process-editor-enhancement
Open

Process editor enhancement#70
yoavnash wants to merge 68 commits into
mainfrom
process-editor-enhancement

Conversation

@yoavnash

@yoavnash yoavnash commented Jun 18, 2026

Copy link
Copy Markdown
Member
  • Add new attributes to process schema
  • In the old version (1.7.5), bandit → pbr → pkg_resources (from setuptools). So setuptools was listed to satisfy that chain. New version (1.8.3) dropped pbr entirely, so no additional deps needed.

MBueschelberger and others added 30 commits November 9, 2025 20:59
- Remove dead-code group objects with underscore IDs (interally_public,
  externally_public) that conflicted with config defaults (hyphens)
- Add refresh_public_groups(config) so DSMS can update the module-level
  INTERNALLY/EXTERNALLY_PUBLIC_GROUP constants after its own config is set,
  fixing the import-time staleness bug
- Fix min_access_level / max_access_level to return Role (not int) and raise
  a clear ValueError for operations with no role mapping (e.g. CREATE)
- Fix inverted comments in serialize_role_json
- Cache user_groups and users on the DSMS instance (pattern matches ktypes);
  add refresh_user_groups() and refresh_users() invalidation methods
- Fix get_user_by_id: accept dsms as first argument (consistent with all
  other util functions) and return a typed User object instead of a raw dict
- Expose get_user_by_id as DSMS.get_user(user_id)
test_access_extended.py:
- Role hierarchy ordering and >= comparison
- min/max_access_level return Role instances (not int)
- min/max_access_level raise ValueError for unmapped operations (CREATE)
- Error message lists valid operations
- serialize_role_json: JSON mode → int, Python mode → name string
- model_dump(mode='json') produces integer roles for wire format
- model_dump(mode='python') produces string role names
- Round-trip from backend dict (int roles) through model and back
- user_by_role property
- None user_access/group_access converted to []

test_groups.py:
- Group model: basic, subgroups, deeply nested
- GroupList: flat flattening, flat returns BaseGroup, by_id, by_name
  (including subgroup traversal)
- User model: basic, with groups
- UserList: by_id, by_username, by_name, __getitem__, missing key
- INTERNALLY/EXTERNALLY_PUBLIC_GROUP IDs use hyphens
- refresh_public_groups with custom config and without arg
- DSMS.user_groups caches result; refresh_user_groups() re-fetches
- DSMS.users caches result; refresh_users() re-fetches
- DSMS.get_user() returns typed User object; raises on 404
Yoav Nahshon and others added 30 commits June 7, 2026 17:35
The backend update endpoint accepts visibility as a top-level field,
separate from access_properties. Previously utils._get_kitems_diffs
embedded visibility inside the access_properties dict, causing all
SDK-driven visibility changes to be silently ignored by the server.

Also documents the visibility field in KItemAccessProperties schema
docs, fixes the role range from 1-4 to 1-3 (ADMIN removed), and adds
two unit tests covering the promoted-visibility and unchanged-visibility
cases.
- DSMS: add create_group, update_group, delete_group, get_group_members,
  add_group_member, remove_group_member with cache invalidation
- utils.py: add corresponding HTTP helpers for all six operations
- groups/models.py: remove GroupListBase (empty list subclass); flat now
  returns List[BaseGroup] directly; clean up docstrings
- groups/__init__.py: remove GroupListBase from exports
- properties/__init__.py: remove dead UserGroup import and export
- kitem.py: update docstring to reference access_properties instead of
  the removed user_groups/UserGroup field
- tests/test_groups.py: 14 new tests covering all CRUD methods and the
  GroupListBase removal
Removes BaseAccessProperty, UserAccessProperty, GroupAccessProperty and
the user_access/group_access fields. Replaces them with a single grants:
List[AccessGrant] where each grant carries id, type (user|group), and
role. Duplicate detection now keyed on (id, type) pairs. Properties
by_user/by_group/user_by_role/group_by_role replaced by by_id, by_role,
and operation_by_principal. Updates both test files accordingly.
- Delete dsms/knowledge/groups/public.py (never deployed)
- Remove INTERNAL_GROUP, PUBLIC_GROUP, refresh_public_groups from groups __init__
- Remove id_internal, id_public, label_internal, label_public from BaseConfiguration
- Remove refresh_public_groups call from DSMS.__init__
Follow-up to 8c8ba77: test_groups.py still imported from the deleted
dsms/knowledge/groups/public module. Drop the import and the 6 tests
that covered those constants.
- Add optional visibility parameter to dsms.search() and _search()
- Accepts 'private', 'internal', or 'public'; defaults to None (no filter)
- Passes visibility in the POST payload to the backend search endpoint
…ntry

Guard the error_message construction with the select_options check so
choices.keys() is never called on None when no select options are defined.
Adds KItem.populate_schema() to apply simplified-input transforms from
k-type semantic schema specs, schema_to_oold() in the semantics module,
a shorthand dict syntax for schema_data on KItem construction, and a
tutorial notebook demonstrating the full workflow.
…stem env

Three related fixes:
- schema_to_oold: replace non-existent Schema.from_url with a direct
  requests fetch of specs/transform.simplified.jsonata from the raw
  GitHub URL; fall back to pass-through on HTTP 404
- setup.cfg: upgrade pylint 3.2.0→3.3.9 so too-many-positional-arguments
  in .pylintrc is recognised (added in pylint 3.3.0)
- .pre-commit-config.yaml: switch pylint hook from language: python to
  language: system so local runs use the same installed environment as
  CI, eliminating stale-cache version drift
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.

2 participants