Skip to content
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

Removed all references to Atom #31

Merged
merged 1 commit into from
Jan 27, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Once your entry point file is ready, there are two ways to profile interactive p

### Interactive Profiling
```zsh
poetry run skyline interactive --skip-atom path/to/entry/point/file
poetry run skyline interactive
```

### Standalone Profiling
Expand Down
16 changes: 5 additions & 11 deletions docs/remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
The current support for remote projects is meant for *advanced users*. We are working on a more user-friendly process for setting up a remote project that we will ship in a future release.

## Terminology
- **Client:** The local machine where you run Atom and the Skyline plugin.
- **Client:** The local machine where you run the Skyline plugin.
- **Server:** The remote machine where you want to run the Skyline profiler.

## Prerequisites
Expand All @@ -25,23 +25,17 @@ ssh -L 60210:localhost:60210 <server hostname>
Skyline uses port 60210 by default, so we recommend forwarding that port. If your server exposes ports, you do not need to set up an SSH tunnel and can use one of the open ports instead.

### Starting the Skyline Profiler
After connecting to the server, you can start the Skyline profiler by navigating to your project root and running the `skyline interactive` command as usual, but with the `--skip-atom` flag added. This flag prevents Skyline from attempting to launch Atom (since you will be running it on your client machine).
After connecting to the server, you can start the Skyline profiler by navigating to your project root and running the `skyline interactive` command as usual.

```zsh
pipenv run skyline interactive your_entry_point.py --skip-atom
pipenv run skyline interactive
```

If you want to use a different port, you can use the `--port` flag to tell the profiler to listen on a different port.

```zsh
pipenv skyline interactive your_entry_point.py --skip-atom --port 1337
pipenv skyline interactive --port 1337
```

### Starting the Skyline Plugin
Launch Atom and open Skyline by running the `Skyline:Toggle` command in the command palette (Ctrl-Shift-P on Ubuntu, ⌘-Shift-P on macOS). You can also launch Skyline using the Atom menus: Packages > Skyline > Show/Hide Skyline.

Now, *instead* of hitting Connect, click the button next to it with a gear icon. Three text fields should appear. If you are using an SSH tunnel to connect to the Skyline profiler, you do not need to change the host and port (the first two text boxes). If you are connecting to a custom port on the server machine, enter the correct host and port.

Next, you need to specify the absolute path to the project root on the client machine. A quick way of doing this is to open a project file in Atom and then click the button next to the text field. Skyline will fill in the project root using the path to that file. You can then edit the path to correct it if needed.

Once all three fields have been filled in, you can click the Connect button to start your profiling session. If everything was set up correctly, you will be able to use Skyline with your remote project!
Launch VSCode and open Skyline by running the `Skyline` command in the command palette (Ctrl-Shift-P on Ubuntu, ⌘-Shift-P on macOS).
21 changes: 0 additions & 21 deletions skyline/commands/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,8 @@ def register_command(subparsers):
)
parser.add_argument(
"--debug", action="store_true", help="Log debug messages.")
parser.add_argument(
"--skip-atom",
action="store_true",
help="Skip launching Atom.",
)
parser.set_defaults(func=main)


def launch_atom():
try:
# The atom command line executable returns by default after launching
# Atom (i.e. it does not block and wait until Atom is closed).
subprocess.run(["atom", "--no-sandbox", "atom://skyline"], check=True)
except FileNotFoundError:
logger.warn(
"Skyline was not able to launch Atom from the command line. "
"Please make sure that Atom is installed and then launch Atom "
"manually to use Skyline's interactive profiling interface.",
)


def actual_main(args):
from skyline.config import Config
from skyline.server import SkylineServer
Expand All @@ -78,8 +59,6 @@ def signal_handler(signal, frame):
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)

if not args.skip_atom:
launch_atom()

with SkylineServer(args.host, args.port) as server:
_, port = server.listening_on
Expand Down
7 changes: 1 addition & 6 deletions test/utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@

import argparse
import json
import os
import socket
import struct
import subprocess
import pytest
import threading
from termcolor import colored

from skyline.protocol_gen import innpv_pb2

Expand Down Expand Up @@ -47,7 +42,7 @@ def spawn_process(self):
# Skyline expects the entry_point filename to be relative
working_dir = os.path.dirname(self.entry_point)
entry_filename = os.path.basename(self.entry_point)
launch_command = [self.skyline_bin, "interactive", "--skip-atom", entry_filename]
launch_command = [self.skyline_bin, "interactive", entry_filename]

# Launch backend + listener threads for stdout and stderr
self.process = subprocess.Popen(launch_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=working_dir)
Expand Down