Skip to content
Snippets Groups Projects
Unverified Commit e9ebd74e authored by Anton Joubert's avatar Anton Joubert
Browse files

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.
parent 331ed191
Branches
No related tags found
No related merge requests found
...@@ -20,13 +20,10 @@ test: ...@@ -20,13 +20,10 @@ test:
lint: lint:
# FIXME pylint needs to run twice since there is no way go gather the text and junit xml output at the same time # 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; \ python3 -m pip install pylint_junit pylint2junit; \
cd src; \ cd src; \
pylint --output-format=parseable ska_logging.configuration | tee ../build/code_analysis.stdout; \ pylint --output-format=parseable ska_logging | tee ../build/code_analysis.stdout; \
pylint --output-format=pylint2junit.JunitReporter ska_logging.configuration > ../build/reports/linting.xml; pylint --output-format=pylint2junit.JunitReporter ska_logging > ../build/reports/linting.xml;
.PHONY: all test lint .PHONY: all test lint
...@@ -155,7 +155,7 @@ Testing ...@@ -155,7 +155,7 @@ Testing
* Put tests into the `tests` folder * Put tests into the `tests` folder
* Use [PyTest](https://pytest.org) as the testing framework * Use [PyTest](https://pytest.org) as the testing framework
- Reference: [PyTest introduction](http://pythontesting.net/framework/pytest/pytest-introduction/) - 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` - Configure PyTest in `setup.py` and `setup.cfg`
* Running the test creates the `htmlcov` folder * Running the test creates the `htmlcov` folder
- Inside this folder a rundown of the issues found will be accessible using the `index.html` file - Inside this folder a rundown of the issues found will be accessible using the `index.html` file
...@@ -165,8 +165,7 @@ Code analysis ...@@ -165,8 +165,7 @@ Code analysis
------------- -------------
* Use [Pylint](https://www.pylint.org) as the code analysis framework * 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/) * 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 `make lint`. All pertaining options reside under the `.pylintrc` file.
* Code analysis should be run by calling `pylint ska_logging`. All pertaining options reside under the `.pylintrc` file.
* Code analysis should only raise document related warnings (i.e. `#FIXME` comments) before merging the code * Code analysis should only raise document related warnings (i.e. `#FIXME` comments) before merging the code
Writing documentation Writing documentation
......
...@@ -11,10 +11,11 @@ setup( ...@@ -11,10 +11,11 @@ setup(
name="ska_logging", name="ska_logging",
description="Square Kilometre Array logging configuration library", description="Square Kilometre Array logging configuration library",
long_description=readme + "\n\n", long_description=readme + "\n\n",
long_description_content_type="text/markdown",
author="Anton Joubert", author="Anton Joubert",
author_email="ajoubert+ska@ska.ac.za", author_email="ajoubert+ska@ska.ac.za",
url="https://gitlab.com/ska-telescope/ska-logging", url="https://gitlab.com/ska-telescope/ska-logging",
packages=setuptools.find_namespace_packages(where="src"), packages=setuptools.find_packages(where="src"),
package_dir={"": "src"}, package_dir={"": "src"},
include_package_data=True, include_package_data=True,
license="BSD license", license="BSD license",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment