Add CLI entry point umd

- add the following file:
  + src/urban_meal_delivery/console.py => click-based CLI tools
  + tests/test_console.py => tests for the module above
- add a CLI entry point `umd`:
  + implement the --version / -V option
    to show the installed package's version
  + rework to package's top-level:
    * add a __pkg_name__ variable to parameterize the package name
  + add unit and integration tests
- fix that pylint cannot know the proper order of imports in the
  isolated nox session
This commit is contained in:
Alexander Hess 2020-08-04 21:14:40 +02:00
commit 97d714d9ee
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
7 changed files with 196 additions and 15 deletions

View file

@ -96,13 +96,16 @@ def lint(session: Session) -> None:
session.run('mypy', '--version')
session.run('mypy', *locations)
# Ignore errors where pylint cannot import a third-party package due its
# being run in an isolated environment. One way to fix this is to install
# all develop dependencies in this nox session, which we do not do. The
# whole point of static linting tools is to not rely on any package be
# importable at runtime. Instead, these imports are validated implicitly
# when the test suite is run.
# being run in an isolated environment. For the same reason, pylint is
# also not able to determine the correct order of imports.
# One way to fix this is to install all develop dependencies in this nox
# session, which we do not do. The whole point of static linting tools is
# to not rely on any package be importable at runtime. Instead, these
# imports are validated implicitly when the test suite is run.
session.run('pylint', '--version')
session.run('pylint', '--disable=import-error', *locations)
session.run(
'pylint', '--disable=import-error', '--disable=wrong-import-order', *locations,
)
@nox.session(python=[MAIN_PYTHON, NEXT_PYTHON])