Skip to content

Commit f7cf79b

Browse files
authored
Rename datascience to datascience_modules (#10525) (#10528)
* Rename datascience to datascience_modules (#10525) * Rename datascience to datascience_modules * Change name to something even harder to get wrong * Fix unit test failure for release
1 parent 6eab2fe commit f7cf79b

29 files changed

+306
-223
lines changed

pythonFiles/tests/ipython/scripts.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def execute_script(file, replace_dict=dict([])):
4646
def get_variables(capsys):
4747
path = os.path.dirname(os.path.abspath(__file__))
4848
file = os.path.abspath(
49-
os.path.join(path, "../../datascience/getJupyterVariableList.py")
49+
os.path.join(path, "../../vscode_datascience_helpers/getJupyterVariableList.py")
5050
)
5151
if execute_script(file):
5252
read_out = capsys.readouterr()
@@ -65,7 +65,9 @@ def get_variable_value(variables, name, capsys):
6565
varJson = find_variable_json(variables, name)
6666
path = os.path.dirname(os.path.abspath(__file__))
6767
file = os.path.abspath(
68-
os.path.join(path, "../../datascience/getJupyterVariableValue.py")
68+
os.path.join(
69+
path, "../../vscode_datascience_helpers/getJupyterVariableValue.py"
70+
)
6971
)
7072
keys = dict([("_VSCode_JupyterTestValue", json.dumps(varJson))])
7173
if execute_script(file, keys):
@@ -79,7 +81,9 @@ def get_data_frame_info(variables, name, capsys):
7981
varJson = find_variable_json(variables, name)
8082
path = os.path.dirname(os.path.abspath(__file__))
8183
file = os.path.abspath(
82-
os.path.join(path, "../../datascience/getJupyterVariableDataFrameInfo.py")
84+
os.path.join(
85+
path, "../../vscode_datascience_helpers/getJupyterVariableDataFrameInfo.py"
86+
)
8387
)
8488
keys = dict([("_VSCode_JupyterTestValue", json.dumps(varJson))])
8589
if execute_script(file, keys):
@@ -92,7 +96,9 @@ def get_data_frame_info(variables, name, capsys):
9296
def get_data_frame_rows(varJson, start, end, capsys):
9397
path = os.path.dirname(os.path.abspath(__file__))
9498
file = os.path.abspath(
95-
os.path.join(path, "../../datascience/getJupyterVariableDataFrameRows.py")
99+
os.path.join(
100+
path, "../../vscode_datascience_helpers/getJupyterVariableDataFrameRows.py"
101+
)
96102
)
97103
keys = dict(
98104
[
File renamed without changes.

pythonFiles/datascience/daemon/README.md renamed to pythonFiles/vscode_datascience_helpers/daemon/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const env = {
77
PYTHONUNBUFFERED: '1',
88
PYTHONPATH: '<extension dir>/pythonFiles:<extension dir>/pythonFiles/lib/python'
99
}
10-
const childProcess = cp.spawn('<fully qualifieid python path>', ['-m', 'datascience.daemon', '-v', '--log-file=log.log'], {env});
10+
const childProcess = cp.spawn('<fully qualifieid python path>', ['-m', 'vscode_datascience_helpers.daemon', '-v', '--log-file=log.log'], {env});
1111
const connection = rpc.createMessageConnection(new rpc.StreamMessageReader(childProcess.stdout),new rpc.StreamMessageWriter(childProcess.stdin));
1212

1313
connection.onClose(() => console.error('Closed'));
File renamed without changes.

pythonFiles/datascience/daemon/__main__.py renamed to pythonFiles/vscode_datascience_helpers/daemon/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def add_arguments(parser):
2020

2121
parser.add_argument(
2222
"--daemon-module",
23-
default="datascience.daemon.daemon_python",
23+
default="vscode_datascience_helpers.daemon.daemon_python",
2424
help="Daemon Module",
2525
)
2626

File renamed without changes.

pythonFiles/datascience/daemon/daemon_python.py renamed to pythonFiles/vscode_datascience_helpers/daemon/daemon_python.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import traceback
99
import runpy
1010
import importlib
11-
from datascience.daemon.daemon_output import (
11+
from vscode_datascience_helpers.daemon.daemon_output import (
1212
CustomWriter,
1313
IORedirector,
1414
get_io_buffers,
@@ -63,7 +63,7 @@ def _decorator(self, *args, **kwargs):
6363

6464
class PythonDaemon(MethodDispatcher):
6565
""" Base Python Daemon with simple methods to check if a module exists, get version info and the like.
66-
To add additional methods, please create a separate class based off this and pass in the arg `--daemon-module` to `datascience.daemon`.
66+
To add additional methods, please create a separate class based off this and pass in the arg `--daemon-module` to `vscode_datascience_helpers.daemon`.
6767
"""
6868

6969
def __init__(self, rx, tx):
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# This file can mimic juypter running. Useful for testing jupyter crash handling
2-
3-
import sys
4-
import argparse
5-
import time
6-
7-
8-
def main():
9-
print("hello from dummy jupyter")
10-
parser = argparse.ArgumentParser()
11-
parser.add_argument("--version", type=bool, default=False, const=True, nargs="?")
12-
parser.add_argument("notebook", type=bool, default=False, const=True, nargs="?")
13-
parser.add_argument("--no-browser", type=bool, default=False, const=True, nargs="?")
14-
parser.add_argument("--notebook-dir", default="")
15-
parser.add_argument("--config", default="")
16-
results = parser.parse_args()
17-
if results.version:
18-
print("1.1.dummy")
19-
else:
20-
print(
21-
"http://localhost:8888/?token=012f08663a68e279fe0a5335e0b5dfe44759ddcccf0b3a56"
22-
)
23-
time.sleep(5)
24-
raise Exception("Dummy is dead")
25-
26-
27-
if __name__ == "__main__":
28-
main()
1+
# This file can mimic juypter running. Useful for testing jupyter crash handling
2+
3+
import sys
4+
import argparse
5+
import time
6+
7+
8+
def main():
9+
print("hello from dummy jupyter")
10+
parser = argparse.ArgumentParser()
11+
parser.add_argument("--version", type=bool, default=False, const=True, nargs="?")
12+
parser.add_argument("notebook", type=bool, default=False, const=True, nargs="?")
13+
parser.add_argument("--no-browser", type=bool, default=False, const=True, nargs="?")
14+
parser.add_argument("--notebook-dir", default="")
15+
parser.add_argument("--config", default="")
16+
results = parser.parse_args()
17+
if results.version:
18+
print("1.1.dummy")
19+
else:
20+
print(
21+
"http://localhost:8888/?token=012f08663a68e279fe0a5335e0b5dfe44759ddcccf0b3a56"
22+
)
23+
time.sleep(5)
24+
raise Exception("Dummy is dead")
25+
26+
27+
if __name__ == "__main__":
28+
main()
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)