diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 5ba95fc..43a571a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -5,7 +5,7 @@ name: Bug Report description: File a bug report. title: "bug: " -projects: ["outpost-os/1"] +projects: ["camelot-os/1"] assignees: - fvalette-ledger - pthierry-ledger diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 2f5b97f..c298ddd 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -5,7 +5,7 @@ name: Proposing a feature/enancement description: File an evolution proposition title: "feature: " -projects: ["outpost-os/1"] +projects: ["camelot-os/1"] assignees: - fvalette-ledger - pthierry-ledger diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 6c7d049..826a66b 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -20,6 +20,6 @@ on: jobs: doc: - uses: outpost-os/pipeline-python/.github/workflows/doc.yml@v1 + uses: camelot-os/pipeline-python/.github/workflows/doc.yml@v1 with: python-version: '3.10' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c8b03e8..fb11ce9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,6 +20,6 @@ on: jobs: lint: - uses: outpost-os/pipeline-python/.github/workflows/lint.yml@v1 + uses: camelot-os/pipeline-python/.github/workflows/lint.yml@v1 with: python-version: '3.10' diff --git a/.github/workflows/publish-to-jfrog.yml b/.github/workflows/publish-to-jfrog.yml deleted file mode 100644 index 361ff81..0000000 --- a/.github/workflows/publish-to-jfrog.yml +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Ledger SAS -# -# SPDX-License-Identifier: Apache-2.0 - -name: Upload Python Package to jfrog - -on: - push: - branches: - - main - -jobs: - publish: - permissions: - id-token: write - contents: read - attestations: write - uses: outpost-os/pipeline-python/.github/workflows/publish.yml@main - with: - environment: ledger-publish - runner: outpost-os-shared-small - python-version: '3.10' - build-name: dts-utils-dev - module-name: dts-utils - repo-name: outpost-pypi-dev-green - virtual-repo-name: outpost-pypi-virtual-green diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 35a8a63..22c649b 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -19,4 +19,4 @@ jobs: packages: read actions: read contents: read - uses: outpost-os/pipeline-python/.github/workflows/codeql.yml@v1 + uses: camelot-os/pipeline-python/.github/workflows/codeql.yml@v1 diff --git a/.github/workflows/release-to-jfrog.yml b/.github/workflows/release-to-jfrog.yml deleted file mode 100644 index d0d66ce..0000000 --- a/.github/workflows/release-to-jfrog.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Ledger SAS -# -# SPDX-License-Identifier: Apache-2.0 - -name: Upload Python Package to jfrog - -on: - release: - types: [released] - -jobs: - release: - permissions: - id-token: write - contents: read - attestations: write - uses: outpost-os/pipeline-python/.github/workflows/publish.yml@main - with: - environment: ledger-publish - runner: outpost-os-shared-small - python-version: '3.10' - build-name: dts-utils-dev - module-name: dts-utils - repo-name: outpost-pypi-prod-public - virtual-repo-name: outpost-pypi-virtual-green diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index a436bdd..658f89d 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: version: ['3.10', '3.11', '3.12'] - uses: outpost-os/pipeline-python/.github/workflows/unittest.yml@v1 + uses: camelot-os/pipeline-python/.github/workflows/unittest.yml@v1 with: python-version: ${{ matrix.version }} secrets: inherit diff --git a/README.md b/README.md index dcf018d..75b6242 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ SPDX-FileCopyrightText: 2024 Ledger SAS SPDX-License-Identifier: Apache-2.0 --> -[![REUSE status](https://api.reuse.software/badge/github.com/outpost-os/python-dts-utils)](https://api.reuse.software/info/github.com/outpost-os/python-dts-utils) +[![REUSE status](https://api.reuse.software/badge/github.com/camelot-os/python-dts-utils)](https://api.reuse.software/info/github.com/camelot-os/python-dts-utils) ![PyPI - Version](https://img.shields.io/pypi/v/dts-utils) ![PyPI - License](https://img.shields.io/pypi/l/dts-utils) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dts-utils) -[![codecov](https://codecov.io/gh/outpost-os/python-dts-utils/graph/badge.svg?token=SGQPBE40UI)](https://codecov.io/gh/outpost-os/python-dts-utils) -![lint](https://github.com/outpost-os/python-dts-utils/actions/workflows/lint.yml/badge.svg) -![unittest](https://github.com/outpost-os/python-dts-utils/actions/workflows/unittest.yml/badge.svg) -![doc](https://github.com/outpost-os/python-dts-utils/actions/workflows/doc.yml/badge.svg) -![quality](https://github.com/outpost-os/python-dts-utils/actions/workflows/quality.yml/badge.svg) +[![codecov](https://codecov.io/gh/camelot-os/python-dts-utils/graph/badge.svg?token=SGQPBE40UI)](https://codecov.io/gh/camelot-os/python-dts-utils) +![lint](https://github.com/camelot-os/python-dts-utils/actions/workflows/lint.yml/badge.svg) +![unittest](https://github.com/camelot-os/python-dts-utils/actions/workflows/unittest.yml/badge.svg) +![doc](https://github.com/camelot-os/python-dts-utils/actions/workflows/doc.yml/badge.svg) +![quality](https://github.com/camelot-os/python-dts-utils/actions/workflows/quality.yml/badge.svg) # dts-utils python package `dts-utils` is an utility python package that aims to ease dts handling in python and source code diff --git a/REUSE.toml b/REUSE.toml index e4b28ba..b342dfe 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -5,7 +5,7 @@ version = 1 SPDX-PackageName = "dts-utils" SPDX-PackageSupplier = "Ledger SAS " -SPDX-PackageDownloadLocation = "https://github.com/outpost-os/python-dts-utils" +SPDX-PackageDownloadLocation = "https://github.com/camelot-os/python-dts-utils" [[annotations]] path = "doc/**" diff --git a/doc/conf.py b/doc/conf.py index 434d13c..5576405 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -47,7 +47,7 @@ html_theme = "sphinx_rtd_theme" -# Any idea for non outpost specific python package ? +# Any idea for non camelot specific python package ? # html_logo = '_static/figures/sentry_kernel.png' html_static_path = ["_static"] @@ -72,7 +72,7 @@ "cover": "#ffffff", "white": "#ffffff", "links": "#6299C4", - # "cover-bg": "url(figures/outpost_fp.png) no-repeat center", + # "cover-bg": "url(figures/camelot_fp.png) no-repeat center", "cover-overlay": "rgba(62, 99, 196, 0.5)", "top-left-content": "counter(page)", # "bottom-center-content": "Outpost documentation suite: Sentry kernel concepts", diff --git a/pyproject.toml b/pyproject.toml index b62ba3b..5010a61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,10 +37,10 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/outpost-os" +Homepage = "https://github.com/camelot-os" # Documentation = -Repository = "https://github.com/outpost-os/python-dts-utils" -Issues = "https://github.com/outpost-os/python-dts-utils/issues" +Repository = "https://github.com/camelot-os/python-dts-utils" +Issues = "https://github.com/camelot-os/python-dts-utils/issues" [project.scripts] dts_dump = 'dts_utils.dump:main' diff --git a/src/dts_utils/filters.py b/src/dts_utils/filters.py index d0ec647..34371f8 100644 --- a/src/dts_utils/filters.py +++ b/src/dts_utils/filters.py @@ -97,14 +97,14 @@ def f_owner(value: Node) -> int: InvalidTemplateValueType If `value` parameter is not an instance of dts node InvalidPropertyValueType - If `outpost,owner` is not an instance of `int` type + If `sentry,owner` is not an instance of `int` type InvalidPropertyValue - If `outpost,owner` is set to 0, this is a reserved value for internal kernel usage + If `sentry,owner` is set to 0, this is a reserved value for internal kernel usage """ if not isinstance(value, Node): raise InvalidTemplateValueType("owner", type(value), Node) - prop = "outpost,owner" + prop = "sentry,owner" if prop in value._node.props: owner_label = getattr(value, prop) if not isinstance(owner_label, int): @@ -162,7 +162,7 @@ def f_owned(value: list[Node]) -> list[Node]: Returns ------- list[Node] - A filtered list w/ only nodes w/ `outpost,owner` different from 0 + A filtered list w/ only nodes w/ `sentry,owner` different from 0 Raises ------ diff --git a/src/dts_utils/tests.py b/src/dts_utils/tests.py index f0920a5..76e82c4 100644 --- a/src/dts_utils/tests.py +++ b/src/dts_utils/tests.py @@ -51,7 +51,7 @@ def is_enabled(value: Node) -> bool: def is_owned(value: Node) -> bool: """Owned custom jinja test. - Custom jinja test that return true if Node has a valid `outpost,owner` property + Custom jinja test that return true if Node has a valid `sentry,owner` property Parameters ---------- @@ -61,7 +61,7 @@ def is_owned(value: Node) -> bool: Returns ------- bool - True if `outpost,owner` is valid + True if `sentry,owner` is valid Raises ------ @@ -78,7 +78,7 @@ def is_owned(value: Node) -> bool: def is_owned_by(value: Node, label: int) -> bool: """Owned_by custom jinja test. - Custom jinja test that return true if Node owner `outpost,owner` matches the given one + Custom jinja test that return true if Node owner `sentry,owner` matches the given one Parameters ---------- @@ -90,7 +90,7 @@ def is_owned_by(value: Node, label: int) -> bool: Returns ------- bool - True if `outpost,owner` equals `label` parameter, False otherwise + True if `sentry,owner` equals `label` parameter, False otherwise Raises ------ diff --git a/tests/dts/sample.dts b/tests/dts/sample.dts index 1c68ef1..55ed180 100644 --- a/tests/dts/sample.dts +++ b/tests/dts/sample.dts @@ -839,27 +839,27 @@ #size-cells = <1>; kernel_code: kernel_code@8000000 { reg = <0x8000000 0x8000>; - compatible = "outpost,memory-pool"; + compatible = "sentry,memory-pool"; }; idle_code: idle_code@8008000 { reg = <0x8008000 0x300>; - compatible = "outpost,memory-pool"; + compatible = "sentry,memory-pool"; }; autotest_code: autotest_code@800a000 { reg = <0x800a000 0xe000>; - compatible = "outpost,memory-pool"; + compatible = "sentry,memory-pool"; }; kernel_ram: kernel_memory@20000000 { reg = <0x20000000 0x2000>; - compatible = "outpost,memory-pool"; + compatible = "sentry,memory-pool"; }; idle_ram: idle_memory@20004000 { reg = <0x20004000 0x200>; - compatible = "outpost,memory-pool"; + compatible = "sentry,memory-pool"; }; autotest_ram: autotest_memory@20008000 { reg = <0x20008000 0x1000>; - compatible = "outpost,memory-pool"; + compatible = "sentry,memory-pool"; }; }; }; @@ -872,7 +872,7 @@ }; led0: led_0 { compatible = "gpio-leds"; - outpost,owner = <0xbabe>; + sentry,owner = <0xbabe>; pinctrl-0 = <&led_pc7 &led_pc7>; status = "disabled"; }; @@ -882,23 +882,23 @@ shm_autotest_1: memory@2000a000 { reg = <0x2000a000 0x256>; dma-pool; - outpost,shm; - outpost,label = <0xf00>; - outpost,owner = <0xbabe>; + sentry,shm; + sentry,label = <0xf00>; + sentry,owner = <0xbabe>; }; shm_autotest_2: memory@2000b000 { reg = <0x2000b000 0x100>; - outpost,shm; + sentry,shm; dma-pool; - outpost,no-map; - outpost,label = <0xf01>; - outpost,owner = <0xbabe>; + sentry,no-map; + sentry,label = <0xf01>; + sentry,owner = <0xbabe>; }; shm_autotest_3: memory@2000b100 { reg = <0x2000b100 0x100>; - outpost,shm; - outpost,label = <0xf02>; - outpost,owner = <0xbabe>; + sentry,shm; + sentry,label = <0xf02>; + sentry,owner = <0xbabe>; }; }; }; @@ -935,7 +935,7 @@ }; &i2c1 { status = "okay"; - outpost,owner = <0xbabe>; + sentry,owner = <0xbabe>; }; &rcc { clocks = <&pll1>; diff --git a/tests/test_filters.py b/tests/test_filters.py index 4c49afc..195bb8d 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -37,12 +37,12 @@ def test_filter_owner_exceptions(dts_file): def test_filter_has_property(dts_file): i2c1 = dts_file.dts.i2c1 - assert dts_utils.filters.f_has_property(i2c1, "outpost,owner") + assert dts_utils.filters.f_has_property(i2c1, "sentry,owner") def test_filter_has_property_exception(dts_file): try: - dts_utils.filters.f_has_property(dts_file.dts, "outpost,owner") + dts_utils.filters.f_has_property(dts_file.dts, "sentry,owner") assert False except dts_utils.exceptions.InvalidTemplateValueType: assert True @@ -50,17 +50,17 @@ def test_filter_has_property_exception(dts_file): def test_filter_with_property(dts_file): dev_list = dts_utils.filters.f_peripherals(dts_file.dts.root) - assert len(dts_utils.filters.f_with_property(dev_list, "outpost,owner")) == 1 + assert len(dts_utils.filters.f_with_property(dev_list, "sentry,owner")) == 1 def test_filter_with_property_exception(dts_file): try: - dts_utils.filters.f_with_property(dts_file.dts, "outpost,owner") + dts_utils.filters.f_with_property(dts_file.dts, "sentry,owner") assert False except dts_utils.exceptions.InvalidTemplateValueType: assert True try: - dts_utils.filters.f_with_property(dts_file.dts.usart1, "outpost,owner") + dts_utils.filters.f_with_property(dts_file.dts.usart1, "sentry,owner") assert False except dts_utils.exceptions.InvalidTemplateValueType: assert True