diff --git a/CHANGELOG.md b/CHANGELOG.md index cc629c1..9f7d9ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,16 +17,12 @@ This project follows **Semantic Versioning (SemVer)** ([semver.org](https://semv --- -## [Unreleased] +## [0.90.0] 2026-08-25 -### Added -- Placeholder for upcoming features and enhancements. +### Initial Features -### Fixed -- Placeholder for bug fixes and security updates. - -### Changed -- Placeholder for changes to existing functionality. +- Key functionality (in Python) for providing useful helper classes to build and create security labels. +- Added SPDX headers. --- diff --git a/ianode_labels/__init__.py b/ianode_labels/__init__.py index d10581e..3d34d0a 100644 --- a/ianode_labels/__init__.py +++ b/ianode_labels/__init__.py @@ -1,25 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. + + +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. + + from ianode_labels.idh_model import IDHModel from ianode_labels.security_labels import Label, MultiValueLabel, SecurityLabelBuilder, SingleValueLabel from ianode_labels.ianode_model import IANodeModel from ianode_labels.ianodev1 import IANodeLabelsV1 from ianode_labels.ianodev2 import IANodeSecurityLabelsV2 -__license__ = """ -Copyright (c) Telicent Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - __all__ = [ "SecurityLabelBuilder", diff --git a/ianode_labels/ianode_model.py b/ianode_labels/ianode_model.py index 64eadd4..b528e5e 100644 --- a/ianode_labels/ianode_model.py +++ b/ianode_labels/ianode_model.py @@ -1,3 +1,26 @@ +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. + + +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. + + import logging from abc import ABC, abstractmethod from datetime import datetime, timezone @@ -8,21 +31,6 @@ from ianode_labels.security_labels import SecurityLabelBuilder from ianode_labels.ianodev2 import IANodeSecurityLabelsV2 -__license__ = """ -Copyright (c) Telicent Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" log = logging.getLogger(__name__) diff --git a/ianode_labels/ianodev1.py b/ianode_labels/ianodev1.py index c2d3a87..7f86802 100644 --- a/ianode_labels/ianodev1.py +++ b/ianode_labels/ianodev1.py @@ -1,22 +1,29 @@ -from enum import Enum +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. -from ianode_labels import security_labels as security -__license__ = """ -Copyright (c) Telicent Ltd. +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" +from enum import Enum + +from ianode_labels import security_labels as security class IANodeLabelsV1(Enum): diff --git a/ianode_labels/ianodev2.py b/ianode_labels/ianodev2.py index b9acd9f..1ffcde7 100644 --- a/ianode_labels/ianodev2.py +++ b/ianode_labels/ianodev2.py @@ -1,22 +1,30 @@ -from enum import Enum +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. -from ianode_labels.security_labels import MultiValueLabel, SingleValueLabel -__license__ = """ -Copyright (c) Telicent Ltd. +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 +from enum import Enum + +from ianode_labels.security_labels import MultiValueLabel, SingleValueLabel -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" class AndGroups(MultiValueLabel): diff --git a/ianode_labels/idh_model.py b/ianode_labels/idh_model.py index 27ad6e1..50a3b64 100644 --- a/ianode_labels/idh_model.py +++ b/ianode_labels/idh_model.py @@ -1,3 +1,26 @@ +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. + + +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. + + import logging from datetime import datetime, timezone from typing import Annotated @@ -7,21 +30,6 @@ from ianode_labels.security_labels import SecurityLabelBuilder from ianode_labels.ianodev2 import IANodeSecurityLabelsV2 -__license__ = """ -Copyright (c) Telicent Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" log = logging.getLogger(__name__) diff --git a/ianode_labels/security_labels.py b/ianode_labels/security_labels.py index 4af3e10..cb49c7e 100644 --- a/ianode_labels/security_labels.py +++ b/ianode_labels/security_labels.py @@ -1,18 +1,24 @@ -__license__ = """ -Copyright (c) Telicent Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. + + +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. class Label: diff --git a/test/__init__.py b/test/__init__.py index e69de29..a8a7ebe 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. + + +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. \ No newline at end of file diff --git a/test/test_idh_model.py b/test/test_idh_model.py index 66efb86..88bed6e 100644 --- a/test/test_idh_model.py +++ b/test/test_idh_model.py @@ -1,3 +1,26 @@ +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. + + +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. + + import unittest from ianode_labels import IDHModel diff --git a/test/test_security_labels.py b/test/test_security_labels.py index 944b110..3a6aa9d 100644 --- a/test/test_security_labels.py +++ b/test/test_security_labels.py @@ -1,3 +1,26 @@ +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. + + +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. + + import unittest from ianode_labels import SecurityLabelBuilder, IANodeSecurityLabelsV2 diff --git a/test/test_security_labels_ianode_model.py b/test/test_security_labels_ianode_model.py index cfa506e..6269e5e 100644 --- a/test/test_security_labels_ianode_model.py +++ b/test/test_security_labels_ianode_model.py @@ -1,3 +1,26 @@ +# SPDX-License-Identifier: Apache-2.0 +# Originally developed by Telicent Ltd.; subsequently adapted, enhanced, and maintained by the National Digital Twin Programme. + + +# Copyright (c) Telicent Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Modifications made by the National Digital Twin Programme (NDTP) +# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme +# and is legally attributed to the UK's Department for Business, Innovation, Science and Trade (BIST) as the governing entity. + + import unittest from ianode_labels import SecurityLabelBuilder, IANodeLabelsV1