Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
26 changes: 0 additions & 26 deletions .github/workflows/publish-to-jfrog.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 0 additions & 25 deletions .github/workflows/release-to-jfrog.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
version = 1
SPDX-PackageName = "dts-utils"
SPDX-PackageSupplier = "Ledger SAS <firmware@ledger.fr>"
SPDX-PackageDownloadLocation = "https://github.com/outpost-os/python-dts-utils"
SPDX-PackageDownloadLocation = "https://github.com/camelot-os/python-dts-utils"

[[annotations]]
path = "doc/**"
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions src/dts_utils/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
------
Expand Down
8 changes: 4 additions & 4 deletions src/dts_utils/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand All @@ -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
------
Expand All @@ -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
----------
Expand All @@ -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
------
Expand Down
36 changes: 18 additions & 18 deletions tests/dts/sample.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
};
Expand All @@ -872,7 +872,7 @@
};
led0: led_0 {
compatible = "gpio-leds";
outpost,owner = <0xbabe>;
sentry,owner = <0xbabe>;
pinctrl-0 = <&led_pc7 &led_pc7>;
status = "disabled";
};
Expand All @@ -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>;
};
};
};
Expand Down Expand Up @@ -935,7 +935,7 @@
};
&i2c1 {
status = "okay";
outpost,owner = <0xbabe>;
sentry,owner = <0xbabe>;
};
&rcc {
clocks = <&pll1>;
Expand Down
10 changes: 5 additions & 5 deletions tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,30 @@ 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


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