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:
parent
da233e2e35
commit
97d714d9ee
7 changed files with 196 additions and 15 deletions
|
|
@ -1,9 +1,15 @@
|
|||
"""Source code for the urban-meal-delivery research project."""
|
||||
|
||||
from importlib import metadata
|
||||
from importlib import metadata as _metadata
|
||||
|
||||
|
||||
try:
|
||||
__version__ = metadata.version(__name__)
|
||||
except metadata.PackageNotFoundError: # pragma: no cover
|
||||
_pkg_info = _metadata.metadata(__name__)
|
||||
|
||||
except _metadata.PackageNotFoundError: # pragma: no cover
|
||||
__pkg_name__ = 'unknown'
|
||||
__version__ = 'unknown'
|
||||
|
||||
else:
|
||||
__pkg_name__ = _pkg_info['name']
|
||||
__version__ = _pkg_info['version']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue