diff --git a/Makefile b/Makefile index b46c952..7fe9ffb 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ test: format: isort $(CHECK_STYLE) black $(CHECK_STYLE) + burocrata --extension=py $(CHECK_STYLE) check: check-format check-style @@ -40,6 +41,7 @@ check-style: check-format: isort --check $(CHECK_STYLE) black --check $(CHECK_STYLE) + burocrata --check --extension=py $(CHECK_STYLE) clean: find . -name "*.pyc" -exec rm -v {} \; diff --git a/dependente/__init__.py b/dependente/__init__.py index 2a5eaa1..791f8c5 100644 --- a/dependente/__init__.py +++ b/dependente/__init__.py @@ -1,11 +1,13 @@ -# Copyright (c) 2021 Leonardo Uieda. +# Copyright (c) 2021 The Dependente Developers. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). """ Dependente: Extract Python package dependencies from configuration files. The _version module is generated automatically by setuptools_scm at build time. """ + from . import _version __version__ = f"v{_version.version}" diff --git a/dependente/cli.py b/dependente/cli.py index e8dddd8..92ddf4c 100644 --- a/dependente/cli.py +++ b/dependente/cli.py @@ -1,11 +1,13 @@ -# Copyright (c) 2021 Leonardo Uieda. +# Copyright (c) 2021 The Dependente Developers. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). """ Defines the command line interface. Uses click to define a CLI around the ``main`` function. """ + import sys import traceback from pathlib import Path diff --git a/dependente/converters.py b/dependente/converters.py index 875d124..7630696 100644 --- a/dependente/converters.py +++ b/dependente/converters.py @@ -1,6 +1,7 @@ -# Copyright (c) 2021 Leonardo Uieda. +# Copyright (c) 2021 The Dependente Developers. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). """ Functions for manipulating/converting dependency lists. """ diff --git a/dependente/parsers.py b/dependente/parsers.py index 4ac03a6..5e42526 100644 --- a/dependente/parsers.py +++ b/dependente/parsers.py @@ -1,9 +1,11 @@ -# Copyright (c) 2021 Leonardo Uieda. +# Copyright (c) 2021 The Dependente Developers. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). """ Functions for extracting the dependency information from files. """ + import configparser from pathlib import Path diff --git a/dependente/tests/__init__.py b/dependente/tests/__init__.py index e69de29..ed6fdba 100644 --- a/dependente/tests/__init__.py +++ b/dependente/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright (c) 2021 The Dependente Developers. +# Distributed under the terms of the MIT License. +# SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). diff --git a/dependente/tests/conftest.py b/dependente/tests/conftest.py index 634257e..ebb70b0 100644 --- a/dependente/tests/conftest.py +++ b/dependente/tests/conftest.py @@ -1,9 +1,11 @@ -# Copyright (c) 2021 Leonardo Uieda. +# Copyright (c) 2021 The Dependente Developers. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). """ Fixtures for pytest """ + from pathlib import Path import pytest diff --git a/dependente/tests/test_cli_utils.py b/dependente/tests/test_cli_utils.py index 6ada446..2a0a005 100644 --- a/dependente/tests/test_cli_utils.py +++ b/dependente/tests/test_cli_utils.py @@ -1,3 +1,7 @@ +# Copyright (c) 2021 The Dependente Developers. +# Distributed under the terms of the MIT License. +# SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). """ Test utility functions from cli.py """ diff --git a/dependente/tests/test_converters.py b/dependente/tests/test_converters.py index a8a24e6..a510d2c 100644 --- a/dependente/tests/test_converters.py +++ b/dependente/tests/test_converters.py @@ -1,9 +1,11 @@ -# Copyright (c) 2021 Leonardo Uieda. +# Copyright (c) 2021 The Dependente Developers. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). """ Test functions for converting/transforming dependencies. """ + import pytest from ..converters import pin_to_oldest diff --git a/dependente/tests/test_parsers.py b/dependente/tests/test_parsers.py index f422625..4233dc5 100644 --- a/dependente/tests/test_parsers.py +++ b/dependente/tests/test_parsers.py @@ -1,11 +1,13 @@ -# Copyright (c) 2021 Leonardo Uieda. +# Copyright (c) 2021 The Dependente Developers. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org). """ Test the functions that extract content from configuration files. The fixtures (arguments to the test functions) are defined in conftest.py """ + import pytest from ..parsers import ParserPyprojectToml, ParserSetupCfg, get_parser, validate_sources diff --git a/env/requirements-style.txt b/env/requirements-style.txt index 45f76f1..1095ff8 100644 --- a/env/requirements-style.txt +++ b/env/requirements-style.txt @@ -10,3 +10,4 @@ flake8-rst-docstrings flake8-simplify flake8-unused-arguments pep8-naming +burocrata diff --git a/environment.yml b/environment.yml index 55e3a15..d6be815 100644 --- a/environment.yml +++ b/environment.yml @@ -28,3 +28,5 @@ dependencies: - flake8-simplify - flake8-unused-arguments - pep8-naming + - pip: + - burocrata diff --git a/pyproject.toml b/pyproject.toml index 17cfd7d..10c14bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,3 +54,10 @@ write_to = "dependente/_version.py" [tool.isort] profile = "black" multi_line_output = 3 + +[tool.burocrata] +notice = ''' +# Copyright (c) 2021 The Dependente Developers. +# Distributed under the terms of the MIT License. +# SPDX-License-Identifier: MIT +# This code is part of the Fatiando a Terra project (https://www.fatiando.org).'''