Branch: refs/heads/master
Home:
https://github.com/Checkmk/checkmk
Commit: d426fb3119ebcbdee1369bd7fac766674a0c53f6
https://github.com/Checkmk/checkmk/commit/d426fb3119ebcbdee1369bd7fac766674…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/gui/werks.py
M cmk/utils/werks/__init__.py
M cmk/utils/werks/__main__.py
M cmk/utils/werks/announce/__init__.py
M cmk/utils/werks/collect.py
M cmk/utils/werks/convert.py
M cmk/utils/werks/mail/__init__.py
M cmk/utils/werks/werk.py
M cmk/utils/werks/werkv1.py
M cmk/utils/werks/werkv2.py
M tests/code_quality/test_werks.py
M tests/unit/cmk/utils/werks/test_werks.py
Log Message:
-----------
remove loading of werkv1: convert them to werkv2 before loading
this commit is quite big as multiple things have to be done at once:
* The parsing of v2/markdown werks is more strict compared to parsing
v1/nowiki werks. This means that we need to fix all HTML problems in
the existing nowiki werks.
* The nowiki/markdown mix will be resolved in a later commit when all
werks are converted to markdown.
* Previously, we had a namedtuple called "Werk" that defined a common
structure for both werkv1 and werkv2, allowing us to work with a
single data structure. But now, since we transform werkv1 before
loading it, we can directly work with "RawWerkV2" (which was renamed
to "Werk") as the differentiation between V1 and V2 Werks is no longer
prominent.
* We still parse (read the file, extract metadata and description)
werkv1, but we no longer load (validate metadata and put it into a
pydantic model) it. After parsing, it is transformed into a werkv2.
This is also why we remove the NoWiki type, that was used to signal
that the content it nowiki-formatted text. We now only handle markdown
formatted text, or html.
* Models from werkv1.py and werkv2.py are removed. Werkv1 models are
deleted, and werkv2 models are moved to werk.
Change-Id: Ic0fa659d93687eb35d0e7c9836500aae220eb041
Commit: a7d88c3c21a9cda28b0a3c685653d02fa52faa1e
https://github.com/Checkmk/checkmk/commit/a7d88c3c21a9cda28b0a3c685653d02fa…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/werk.py
M tests/unit/cmk/utils/werks/test_werks.py
Log Message:
-----------
remove component validator
werks are shared between three projects: cmk, cma, and checkmk_agent.
components differ for the three projects. This should be fixed on the
long term.
Change-Id: I564c08e028b616dc35fb9f05a249f00d049efed4
Commit: a04d672c0c2d30c0db9c5a23b4ab5c01f0a0ffc9
https://github.com/Checkmk/checkmk/commit/a04d672c0c2d30c0db9c5a23b4ab5c01f…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/collect.py
Log Message:
-----------
better error message for werk parsing problems
Change-Id: I36cd7c21f833c02ea71bb45c913d7280883ba1e5
Commit: 1f381bd11fcc88dd68502c6ef220973eb02ca61f
https://github.com/Checkmk/checkmk/commit/1f381bd11fcc88dd68502c6ef220973eb…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/__init__.py
Log Message:
-----------
better error message for werk precompile
Change-Id: I7bf85985a48e58998c6e89ce024ee9f54416ce5f
Commit: d6475cda8f2adf86b5b377854c4bc96c82957dce
https://github.com/Checkmk/checkmk/commit/d6475cda8f2adf86b5b377854c4bc96c8…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/werkv2.py
M tests/unit/cmk/utils/werks/test_werks.py
Log Message:
-----------
parse_werk_v2 no longer transforms markdown to html
markdown to html conversion is now done when werk is loaded. This allows
us to modify the metadata of a parsed werk and write it to disk. Before
we would have to transform the html back to markdown.
This functionality is needed for picking werks between branches.
Change-Id: Ica3e2e6854632f7f7b3575f6c317bf394d0b9e01
Commit: 5857e13acc327774a40a0ab500ecc955562357bd
https://github.com/Checkmk/checkmk/commit/5857e13acc327774a40a0ab500ecc9555…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/werkv2.py
M tests/unit/cmk/utils/werks/test_werks.py
Log Message:
-----------
add functionality for formatting v2/markdown werks
it's now possible to open a markdown werk, modify its metadata and write
it back to disk.
Change-Id: I1f4588b47e625e75974d9cce075a6cc639c8f2de
Commit: a45b97ecb3721cb9eb20288122435bd4edfb2ab2
https://github.com/Checkmk/checkmk/commit/a45b97ecb3721cb9eb20288122435bd4e…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/convert.py
Log Message:
-----------
add missing type hint
Change-Id: Ieda210b1881f4e33901581fe314616b9fbb8a930
Commit: 513001d433cfaf4ee789030f6f5202ca6c24fc09
https://github.com/Checkmk/checkmk/commit/513001d433cfaf4ee789030f6f5202ca6…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/convert.py
M tests/unit/cmk/utils/werks/test_convert.py
Log Message:
-----------
remove leading spaces when converting to werkv1
Change-Id: I4ab87466309a3313c04da7d5d26c4a30e51b38ad
Commit: 3dc0226a4efa39fd7693ab873fa889f1c4d42215
https://github.com/Checkmk/checkmk/commit/3dc0226a4efa39fd7693ab873fa889f1c…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/convert.py
M tests/unit/cmk/utils/werks/test_convert.py
M tests/unit/cmk/utils/werks/test_werks.py
Log Message:
-----------
add function to format werkv1
it's now possible to open a nowiki werk, modify its metadata and write
it back to disk.
Change-Id: I0d3defdc73da41183874db5800048e69fd64c887
Commit: b7c4d07f7f845bdaaf98bc577b0905679790ac96
https://github.com/Checkmk/checkmk/commit/b7c4d07f7f845bdaaf98bc577b0905679…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M cmk/utils/werks/convert.py
A cmk/utils/werks/format.py
M cmk/utils/werks/werkv2.py
M tests/unit/cmk/utils/werks/test_convert.py
A tests/unit/cmk/utils/werks/test_format.py
M tests/unit/cmk/utils/werks/test_werks.py
Log Message:
-----------
werk: move format functions to own file
Change-Id: I66f32c3ad5fe31368a51257e0e1ec18d06a3045a
Commit: b54b52476e9afc2e15338e51e36c9e4876a24100
https://github.com/Checkmk/checkmk/commit/b54b52476e9afc2e15338e51e36c9e487…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M .werks/11142
M .werks/11472
M .werks/11478
M .werks/11480
M .werks/11647
M .werks/14425
M .werks/14427
M .werks/14431
M .werks/337
M cmk/utils/werks/werkv2.py
Log Message:
-----------
fix broken werk html: check for parent of li
this broke the output of werks on our website
Change-Id: I59abda105d4a04096089481f6ea6956cf6652719
Commit: e9a674282a086e03f399e5d3fa05393452364425
https://github.com/Checkmk/checkmk/commit/e9a674282a086e03f399e5d3fa0539345…
Author: Benedikt Seidl <benedikt.seidl(a)checkmk.com>
Date: 2023-09-27 (Wed, 27 Sep 2023)
Changed paths:
M .werks/10429
M .werks/11137
M .werks/1900
M .werks/5769
M .werks/8289
Log Message:
-----------
fix invalid werks html
temporary added dead/deprecated html5lib as a dependency,
used it in _check_html in cmk.utils.werks.werkv2 to detect
the fixed html problems:
from html5lib.html5parser import HTMLParser
p5arser = HTMLParser(strict=True)
tree = p5arser.parseFragment(string)
Change-Id: I86e3442c2952c81684894bff3740ef969234e4b9
Compare:
https://github.com/Checkmk/checkmk/compare/5e48d554b13e...e9a674282a08