From e9ebd74e697610f2bcdd83f86e522f25a854c815 Mon Sep 17 00:00:00 2001 From: Anton Joubert <ajoubert@ska.ac.za> Date: Thu, 11 Feb 2021 10:35:09 +0200 Subject: [PATCH] SAR-189 Fixes for single namespace Some minor fixes to documentation and setup.py. Linting can now be run on the whole folder instead of just a single file, since we are no longer using a namespace. --- Makefile | 7 ++----- README.md | 5 ++--- setup.py | 3 ++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 9b9fafe..689a1f0 100644 --- a/Makefile +++ b/Makefile @@ -20,13 +20,10 @@ test: lint: # FIXME pylint needs to run twice since there is no way go gather the text and junit xml output at the same time - # Also note that we are linting just the single configuration.py module, since pylint has import issues - # if we call it with the src/ska/logging path - it can't find the standard library "logging". Probably since - # it is running in an importable folder with the same name. python3 -m pip install pylint_junit pylint2junit; \ cd src; \ - pylint --output-format=parseable ska_logging.configuration | tee ../build/code_analysis.stdout; \ - pylint --output-format=pylint2junit.JunitReporter ska_logging.configuration > ../build/reports/linting.xml; + pylint --output-format=parseable ska_logging | tee ../build/code_analysis.stdout; \ + pylint --output-format=pylint2junit.JunitReporter ska_logging > ../build/reports/linting.xml; .PHONY: all test lint diff --git a/README.md b/README.md index a7ecd16..0f58677 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Testing * Put tests into the `tests` folder * Use [PyTest](https://pytest.org) as the testing framework - Reference: [PyTest introduction](http://pythontesting.net/framework/pytest/pytest-introduction/) -* Run tests with `python setup.py test` +* Run tests with `python3 setup.py test` or just `make test` - Configure PyTest in `setup.py` and `setup.cfg` * Running the test creates the `htmlcov` folder - Inside this folder a rundown of the issues found will be accessible using the `index.html` file @@ -165,8 +165,7 @@ Code analysis ------------- * Use [Pylint](https://www.pylint.org) as the code analysis framework * By default it uses the [PEP8 style guide](https://www.python.org/dev/peps/pep-0008/) - * Use the provided `code-analysis.sh` script in order to run the code analysis in the `module` and `tests` - * Code analysis should be run by calling `pylint ska_logging`. All pertaining options reside under the `.pylintrc` file. + * Code analysis should be run by calling `make lint`. All pertaining options reside under the `.pylintrc` file. * Code analysis should only raise document related warnings (i.e. `#FIXME` comments) before merging the code Writing documentation diff --git a/setup.py b/setup.py index cc7388d..79db364 100644 --- a/setup.py +++ b/setup.py @@ -11,10 +11,11 @@ setup( name="ska_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", - packages=setuptools.find_namespace_packages(where="src"), + packages=setuptools.find_packages(where="src"), package_dir={"": "src"}, include_package_data=True, license="BSD license", -- GitLab