-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: cli tools are installed via extra **cli**
- Loading branch information
1 parent
6f5df7a
commit 59a05b5
Showing
11 changed files
with
225 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
def generate_error_text(entry_point: str) -> str: | ||
return ( | ||
f"The {entry_point} command line interface can not be run because of missing " | ||
"dependencies. Make sure that the package was installed with the **cli** " | ||
"extra. Use: pip install geo-track-analyzer[cli]" | ||
) | ||
|
||
|
||
try: | ||
from .update_elevation import main as update_elevation | ||
except ImportError: | ||
|
||
def update_elevation() -> None: | ||
import sys | ||
|
||
print(generate_error_text("enhance-elevation")) | ||
sys.exit(1) | ||
|
||
|
||
try: | ||
from .extract_track import main as extract_track | ||
except ImportError: | ||
|
||
def extract_track() -> None: | ||
import sys | ||
|
||
print(generate_error_text("extract-fit-track")) | ||
sys.exit(1) | ||
|
||
|
||
__all__ = ["update_elevation", "extract_track"] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters