diff --git a/.python-version b/.python-version new file mode 100644 index 0000000000000000000000000000000000000000..d2577d975622d5415d4d59199a92a798af3c09cc --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.7.7 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 587cf7be0f04ba8dc05115d189d8b1e9f7fbc806..4e46f7e0c3754a9f6b421c583c12802603fbcce9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,13 +10,13 @@ v0.4.0 Change packaging to use single namespace. Usage like `from ska.logging import configure_logging` changes -to `from ska_logging import configure_logging`. +to `from ska_ser_logging import configure_logging`. v0.3.0 ****** Change packaging to use "ska" namespace. -Usage like `from ska_logging import configure_logging` changes +Usage like `from ska_ser_logging import configure_logging` changes to `from ska.logging import configure_logging`. v0.2.1 diff --git a/Makefile b/Makefile index 689a1f08e9aaafd8a6068a049d2579fcfeef5a5e..0c4c93e8821ef6f94fabeac6f935550ea4ea5cb0 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,8 @@ lint: # FIXME pylint needs to run twice since there is no way go gather the text and junit xml output at the same time python3 -m pip install pylint_junit pylint2junit; \ cd src; \ - pylint --output-format=parseable ska_logging | tee ../build/code_analysis.stdout; \ - pylint --output-format=pylint2junit.JunitReporter ska_logging > ../build/reports/linting.xml; + pylint --output-format=parseable ska_ser_logging | tee ../build/code_analysis.stdout; \ + pylint --output-format=pylint2junit.JunitReporter ska_ser_logging > ../build/reports/linting.xml; .PHONY: all test lint diff --git a/README.md b/README.md index 0f586774b60bd5b289412c7556c6dfb7db3dbf45..13d85a49f7536e0d131cecbf84c4539c92e482ae 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ SKA Logging Configuration Library ================================= -[](https://developer.skatelescope.org/projects/ska-logging/en/latest/?badge=latest) +[](https://developer.skatelescope.org/projects/ska-ser-logging/en/latest/?badge=latest) This project allows standard logging configuration across all SKA projects. The format used is described in detail on the [developer portal](https://developer.skatelescope.org/en/latest/development/logging-format.html). @@ -17,7 +17,7 @@ For Python applications, this is as simple as: ```python import logging -from ska_logging import configure_logging +from ska_ser_logging import configure_logging def main(): configure_logging() @@ -29,7 +29,7 @@ be specified. It may be useful to link that to a command line option or environ ```python import logging -from ska_logging import configure_logging +from ska_ser_logging import configure_logging def main(): configure_logging(logging.DEBUG) @@ -45,7 +45,7 @@ No validation is done by this library. If the filter is `None` (the default), t ```python import logging -from ska_logging import configure_logging +from ska_ser_logging import configure_logging class TangoDeviceTagsFilter(logging.Filter): @@ -67,7 +67,7 @@ by the default configuration. ```python import logging.handlers -from ska_logging import configure_logging +from ska_ser_logging import configure_logging ADDITIONAL_LOGGING_CONFIG = { @@ -96,7 +96,7 @@ A more practical use case is adding and removing handlers at runtime. ```python import logging import logging.handlers -from ska_logging import configure_logging, get_default_formatter +from ska_ser_logging import configure_logging, get_default_formatter def main(): diff --git a/docs/src/package/guide.rst b/docs/src/package/guide.rst index 20e07ce743d972efe13a001c27b58658e96f2621..a568dd65e832d64d1cf5dff9574cd37505eddad4 100644 --- a/docs/src/package/guide.rst +++ b/docs/src/package/guide.rst @@ -22,5 +22,5 @@ Public API Documentation Functions --------- -.. automodule:: ska_logging +.. automodule:: ska_ser_logging :members: diff --git a/setup.py b/setup.py index 5389e53ce8e7e6618587e07f9c34f9b3a94ed01f..08276bd26cb30615fb93ec1f9db465db59e5dcb0 100644 --- a/setup.py +++ b/setup.py @@ -8,13 +8,13 @@ with open("README.md") as readme_file: readme = readme_file.read() setup( - name="ska_logging", + name="ska_ser_logging", description="Square Kilometre Array logging configuration library", long_description=readme + "\n\n", long_description_content_type="text/markdown", author="Anton Joubert", author_email="ajoubert+ska@ska.ac.za", - url="https://gitlab.com/ska-telescope/ska-logging", + url="https://gitlab.com/ska-telescope/ska-ser-logging", packages=find_packages("src"), package_dir={"": "src"}, include_package_data=True, diff --git a/src/ska_logging/__init__.py b/src/ska_ser_logging/__init__.py similarity index 100% rename from src/ska_logging/__init__.py rename to src/ska_ser_logging/__init__.py diff --git a/src/ska_logging/configuration.py b/src/ska_ser_logging/configuration.py similarity index 100% rename from src/ska_logging/configuration.py rename to src/ska_ser_logging/configuration.py diff --git a/tests/test_configuration.py b/tests/test_configuration.py index e16881988768e724c57dbcb933349e2e30f822af..8c4e3826516c1b2b45760a0cc72d7592cd08f135 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -7,9 +7,9 @@ import logging.handlers import time import pytest -import ska_logging.configuration as configuration +import ska_ser_logging.configuration as configuration -from ska_logging import configure_logging, get_default_formatter +from ska_ser_logging import configure_logging, get_default_formatter @pytest.fixture @@ -104,7 +104,7 @@ def recording_tags_logger(): @pytest.mark.usefixtures("reset_logging") class TestConfigureLogging: - """Tests for :func:`~ska_logging.configuration.configure_logging`.""" + """Tests for :func:`~ska_ser_logging.configuration.configure_logging`.""" def test_includes_console_handler(self, default_logger): assert get_named_handler(default_logger, "console") @@ -170,7 +170,7 @@ class TestConfigureLogging: @pytest.mark.usefixtures("reset_logging") class TestGetDefaultFormatter: - """Tests for :func:`~ska_logging.configuration.get_default_formatter`.""" + """Tests for :func:`~ska_ser_logging.configuration.get_default_formatter`.""" def get_recorded_message(self, logger): logger.info("test message") @@ -199,7 +199,7 @@ class TestGetDefaultFormatter: class TestOverride: - """Tests for :func:`~ska_logging.configuration._override`. + """Tests for :func:`~ska_ser_logging.configuration._override`. Code based on: https://github.com/ska-sa/katsdpcontroller/blob/