The code in the 4.4 git branch is formatted in a certain way and lots of linters are used to check both formatting and for programming errors. Introduce those same formatters and linters with the same settings to the Kelvin API git branch to make development work easier and safer.
The same per-commit hooks and configuration as in 4.4 have been added to the branch "dtroeder/kelvin_pre-commit", branched off from "feature/kelvin". The files in packages not used by the Kelvin API are being ignored. Excluded are: ^doc/doc-common/ ^doc/manual/ ^italc-windows/ ^italc/ ^ucs-school-branding/ ^ucs-school-import/usr/share/ucs-school-import/scripts/ucs-school-import ^ucs-school-info/ ^ucs-school-italc/ ^ucs-school-l10n-fr/ ^ucs-school-ldap-acls-master/ ^ucs-school-metapackage/ ^ucs-school-netlogon-user-logonscripts/ ^ucs-school-netlogon/ ^ucs-school-old-homedirs/ ^ucs-school-old-sharedirs/ ^ucs-school-ox-support/ ^ucs-school-radius-802.1x/ ^ucs-school-roleshares/ ^ucs-school-s4-branch-site/ ^ucs-school-selfservice-support/ ^ucs-school-ucc-integration/ ^ucs-school-umc- ^ucs-school-webproxy/ ^ucs-test-ucsschool/ ^univention-management-console-module-selective-udm/ The files in ucs-school-lib and ucs-school-import have been reformatted and adhere to all linters except flake8, as those directories will be synced to 4.4 in a separate step. After that, they will also be checked by flake8. Except for a few Python 2/3 fixes, the commit contains only white space and comment changes: [1a21ca89f] Bug #52817: introduce same formatting and linting as in the 4.4 branch, except for non-Kelvin packages and ucs-school-lib|ucs-school-import as they will be handled separately To test the code, copy the repository to a VM and build the docker image there. Then install the Kelvin API app.
In share.py get_nt_acls needs lo because the sid is not in UDM. There were still lots of "type:" annotations. I took the liberty of converting them in ucs-school-lib automatically and hope that's OK. [dtroeder/kelvin_pre-commit] 423a7ddeb Bug #52817: type hints [dtroeder/kelvin_pre-commit] dafe32fe8 Bug #52817: type hints in validator and share.py I also found some locations, where udm_obj was used as a dict, which seems not right.
More changes… still not gone throug all… [dtroeder/kelvin_pre-commit] 3b32415a8 Bug #52817: sync from 4.4 (WIP) Additionally I created a git branch "dtroeder/52817_sync_4.4_kelvin" of "4.4" with changes to the "regular" ucsschool.lib, to make future code comparisons easier: [a2bfea660] Bug #52817: sync code in 4.4 and kelvin
Commits have been squashed and merged into 4.4: [4.4] ed67a9f86 Bug #52817: sync code in 4.4 and kelvin
Code Review: OK Merge: OK
Kelvin 1.4.4 has been released.