diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0aeae08a3dcc..5ca64c01ab24 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -207,7 +207,7 @@ repos: files: '.*\.gni?$' - id: meta-validate name: Validate METADATA files - entry: python -m tools.metadata.validate + entry: python -m cobalt.tools.metadata.validate language: python additional_dependencies: - "protobuf" diff --git a/tools/metadata/README.md b/cobalt/tools/metadata/README.md similarity index 100% rename from tools/metadata/README.md rename to cobalt/tools/metadata/README.md diff --git a/tools/metadata/__init__.py b/cobalt/tools/metadata/__init__.py similarity index 100% rename from tools/metadata/__init__.py rename to cobalt/tools/metadata/__init__.py diff --git a/tools/metadata/gen/__init__.py b/cobalt/tools/metadata/gen/__init__.py similarity index 100% rename from tools/metadata/gen/__init__.py rename to cobalt/tools/metadata/gen/__init__.py diff --git a/tools/metadata/gen/metadata_file_pb2.py b/cobalt/tools/metadata/gen/metadata_file_pb2.py similarity index 100% rename from tools/metadata/gen/metadata_file_pb2.py rename to cobalt/tools/metadata/gen/metadata_file_pb2.py diff --git a/tools/metadata/protos/METADATA b/cobalt/tools/metadata/protos/METADATA similarity index 100% rename from tools/metadata/protos/METADATA rename to cobalt/tools/metadata/protos/METADATA diff --git a/tools/metadata/protos/metadata_file.proto b/cobalt/tools/metadata/protos/metadata_file.proto similarity index 100% rename from tools/metadata/protos/metadata_file.proto rename to cobalt/tools/metadata/protos/metadata_file.proto diff --git a/tools/metadata/tests/METADATA b/cobalt/tools/metadata/tests/METADATA similarity index 100% rename from tools/metadata/tests/METADATA rename to cobalt/tools/metadata/tests/METADATA diff --git a/tools/metadata/validate.py b/cobalt/tools/metadata/validate.py similarity index 98% rename from tools/metadata/validate.py rename to cobalt/tools/metadata/validate.py index b7385c1e91ea..462234a04960 100644 --- a/tools/metadata/validate.py +++ b/cobalt/tools/metadata/validate.py @@ -31,7 +31,7 @@ def validate_content(textproto_content, metadata_file_path='', warn_deprecations=False): # pylint: disable=import-outside-toplevel - from tools.metadata.gen import metadata_file_pb2 + from cobalt.tools.metadata.gen import metadata_file_pb2 metadata = metadata_file_pb2.Metadata() text_format.Parse(textproto_content, metadata) if not metadata.name: diff --git a/tools/metadata/validate_test.py b/cobalt/tools/metadata/validate_test.py similarity index 94% rename from tools/metadata/validate_test.py rename to cobalt/tools/metadata/validate_test.py index 684609f120b2..2370555b6468 100644 --- a/tools/metadata/validate_test.py +++ b/cobalt/tools/metadata/validate_test.py @@ -15,7 +15,7 @@ """ Cobalt Metadata tests.""" import unittest import os -from tools.metadata.validate import validate_content, validate_file +from cobalt.tools.metadata.validate import validate_content, validate_file class TestMetadata(unittest.TestCase):