8000 Make scripts run without install by tushuhei · Pull Request #239 · google/budoux · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make scripts run without install #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/encode_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@
import functools
import itertools
import multiprocessing
import os
import sys
import typing

from budoux import utils
# module hack
LIB_PATH = os.path.join(os.path.dirname(__file__), '..')
sys.path.insert(0, os.path.abspath(LIB_PATH))

from budoux import utils # noqa (module hack)

ArgList = typing.Optional[typing.List[str]]
DEFAULT_OUTPUT_FILENAME = 'encoded_data.txt'
Expand Down
7 changes: 6 additions & 1 deletion scripts/prepare_knbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@

import argparse
import os
import sys
import typing
from html.parser import HTMLParser

from budoux import utils
# module hack
LIB_PATH = os.path.join(os.path.dirname(__file__), '..')
sys.path.insert(0, os.path.abspath(LIB_PATH))

from budoux import utils # noqa (module hack)


class KNBCHTMLParser(HTMLParser):
Expand Down
3 changes: 1 addition & 2 deletions scripts/tests/test_encode_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
import typing
import unittest

from budoux import utils

# module hack
LIB_PATH = os.path.join(os.path.dirname(__file__), '..', '..')
sys.path.insert(0, os.path.abspath(LIB_PATH))

from budoux import utils # noqa (module hack)
from scripts import encode_data # noqa (module hack)


Expand Down
0