Skip to content

Commit

Permalink
generate-dataset command works from anywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishokamp committed Apr 15, 2024
1 parent ef1e7cf commit 4574922
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.6.1
7 changes: 6 additions & 1 deletion news_signals/cli.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import sys
import subprocess
import logging
import os
from pathlib import Path

from news_signals.log import create_logger


logger = create_logger(__name__, level=logging.INFO)


path_to_file = Path(os.path.dirname(os.path.abspath(__file__)))


def generate_dataset():
logger.info("Generating dataset via cli command `generate-dataset`")
print(f"Args: {sys.argv[1:]}")
sys.exit(subprocess.call([sys.executable, 'bin/generate_dataset.py'] + sys.argv[1:]))
sys.exit(subprocess.call([sys.executable, str(path_to_file / '../bin/generate_dataset.py')] + sys.argv[1:]))

0 comments on commit 4574922

Please sign in to comment.