Skip to content

Commit 66a9333

Browse files
authored
Rename datascience to datascience_modules (microsoft#10525)
* Rename datascience to datascience_modules * Change name to something even harder to get wrong
1 parent 8267781 commit 66a9333

27 files changed

+302
-229
lines changed

pythonFiles/tests/ipython/scripts.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def get_data_frame_info(variables, name, capsys):
7575
varJson = find_variable_json(variables, name)
7676
path = os.path.dirname(os.path.abspath(__file__))
7777
file = os.path.abspath(
78-
os.path.join(path, "../../datascience/getJupyterVariableDataFrameInfo.py")
78+
os.path.join(
79+
path, "../../vscode_datascience_helpers/getJupyterVariableDataFrameInfo.py"
80+
)
7981
)
8082
keys = dict([("_VSCode_JupyterTestValue", json.dumps(varJson))])
8183
if execute_script(file, keys):
@@ -88,7 +90,9 @@ def get_data_frame_info(variables, name, capsys):
8890
def get_data_frame_rows(varJson, start, end, capsys):
8991
path = os.path.dirname(os.path.abspath(__file__))
9092
file = os.path.abspath(
91-
os.path.join(path, "../../datascience/getJupyterVariableDataFrameRows.py")
93+
os.path.join(
94+
path, "../../vscode_datascience_helpers/getJupyterVariableDataFrameRows.py"
95+
)
9296
)
9397
keys = dict(
9498
[

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'));

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

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()

0 commit comments

Comments
 (0)