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

📚 Enable documentation on Readthedocs #37

Merged
merged 8 commits into from Oct 22, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 27 additions & 27 deletions .github/workflows/latest-changes.yaml
@@ -1,29 +1,29 @@
name: Latest Changes
# name: Latest Changes

on:
pull_request_target:
branches:
- master
types:
# This action should only run after the PR has been merged
- closed
# For manually triggering it
workflow_dispatch:
inputs:
number:
description: PR number
required: true
# on:
# pull_request_target:
# branches:
# - master
# types:
# # This action should only run after the PR has been merged
# - closed
# # For manually triggering it
# workflow_dispatch:
# inputs:
# number:
# description: PR number
# required: true

jobs:
latest-changes:
# Make sure it only runs if the PR was merged
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://tiangolo/latest-changes:0.0.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
latest_changes_file: CHANGELOG.md
latest_changes_header: '# Changelog\n\n'
debug_logs: true
# jobs:
# latest-changes:
# # Make sure it only runs if the PR was merged
# if: github.event.pull_request.merged == true
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: docker://tiangolo/latest-changes:0.0.3
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# latest_changes_file: CHANGELOG.md
# latest_changes_header: '# Changelog\n\n'
# debug_logs: true
13 changes: 7 additions & 6 deletions CHANGELOG.md
@@ -1,12 +1,13 @@
# Changelog

* Use setuptools-scm for versioning. PR [#36](https://github.com/NCAR/jupyter-forward/pull/36) by [@andersy005](https://github.com/andersy005).
- Fix changelog formatting. PR [#35](https://github.com/NCAR/jupyter-forward/pull/35) by [@andersy005](https://github.com/andersy005).
- Use setuptools-scm for versioning. PR [#36](https://github.com/NCAR/jupyter-forward/pull/36) by [@andersy005](https://github.com/andersy005).

* Update PyPI release action. PR [#34](https://github.com/NCAR/jupyter-forward/pull/34) by [@andersy005](https://github.com/andersy005).
* Fix changelog formatting. PR [#35](https://github.com/NCAR/jupyter-forward/pull/35) by [@andersy005](https://github.com/andersy005).

* Update README. PR [#33](https://github.com/NCAR/jupyter-forward/pull/33) by [@andersy005](https://github.com/andersy005).
- Update PyPI release action. PR [#34](https://github.com/NCAR/jupyter-forward/pull/34) by [@andersy005](https://github.com/andersy005).

* Fix Header in `latest changes` GH action. PR [#32](https://github.com/NCAR/jupyter-forward/pull/32) by [@andersy005](https://github.com/andersy005).
- Update README. PR [#33](https://github.com/NCAR/jupyter-forward/pull/33) by [@andersy005](https://github.com/andersy005).

* Create release via GitHub action. PR [#31](https://github.com/NCAR/jupyter-forward/pull/31) by [@andersy005](https://github.com/andersy005).
- Fix Header in `latest changes` GH action. PR [#32](https://github.com/NCAR/jupyter-forward/pull/32) by [@andersy005](https://github.com/andersy005).

- Create release via GitHub action. PR [#31](https://github.com/NCAR/jupyter-forward/pull/31) by [@andersy005](https://github.com/andersy005).
52 changes: 20 additions & 32 deletions README.md
Expand Up @@ -3,10 +3,10 @@
- [jupyter-forward](#jupyter-forward)
- [Badges](#badges)
- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usage)
- [Launching Jupyter Lab on a Remote Cluster](#launching-jupyter-lab-on-a-remote-cluster)
- [Running on a Remote Host's Head Node](#running-on-a-remote-hosts-head-node)
- [Running on a Remote Host's Compute Node](#running-on-a-remote-hosts-compute-node)
- [Running on a Remote Host's Head Node](#running-on-a-remote-hosts-head-node)
- [Running on a Remote Host's Compute Node](#running-on-a-remote-hosts-compute-node)

## Badges

Expand All @@ -25,35 +25,21 @@ Jupyter-forward simplifies the process of running `jupyter lab` on a remote mach
3. Port forward Jupyter Lab session back to your local machine!
4. Opening the port forwarded Jupyter Lab session into your local browser

## Usage

```bash
❯ jupyter-forward --help
Usage: jupyter-forward [OPTIONS] COMMAND [ARGS]...

Jupyter Lab Port Forwarding Utility

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or
customize the installation.
## Installation

--help Show this message and exit.
Jupyter-forward can be installed from PyPI with pip:

Commands:
end Stops the running Jupyter Lab server.
resume Resumes an already running remote Jupyter Lab session.
start Starts Jupyter lab on a remote resource and port forwards session...
```bash
python -m pip install jupyter-forward
```

### Launching Jupyter Lab on a Remote Cluster
## Usage

`jupyter-forward` provides functionality to launch a jupyter lab session on a remote cluster via the `start` command:
`jupyter-forward` provides functionality to launch a jupyter lab session on a remote cluster via the `jupyter-forward` command:

```bash
❯ jupyter-forward start --help

Usage: jupyter-forward start [OPTIONS] HOST
❯ jupyter-forward --help (playground) 18:35:43
Usage: jupyter-forward [OPTIONS] HOST

Starts Jupyter lab on a remote resource and port forwards session to local
machine.
Expand Down Expand Up @@ -85,20 +71,22 @@ Options:
-l select=1:ncpus=36,walltime=00:05:00 -A
AABD1115"

--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to
copy it or customize the installation.

--help Show this message and exit.
```

**Note:** The `start` command will prompt you for your password.

#### Running on a Remote Host's Head Node
### Running on a Remote Host's Head Node

For instance, here is how to start a jupyter lab server running on port 9999 on one of Cheyenne's login nodes:

```bash
❯ jupyter-forward start mariecurie@cheyenne.ucar.edu
❯ jupyter-forward mariecurie@cheyenne.ucar.edu
```

#### Running on a Remote Host's Compute Node
### Running on a Remote Host's Compute Node

To launch `jupyter lab` on a remote host's compute node, the user needs to specify the `--launch-command` option. The launch command is meant to submit a job on the remote host's queueing system. Once the job is up and running, `jupyter lab` is launched on the compute node and the session is port-forwarded to the user's local machine.

Expand All @@ -107,13 +95,13 @@ Here is a couple examples:
- Launch Jupyter Lab on a remote system that uses [PBS job scheduler](https://www.altair.com/pbs-works-documentation/)

```bash
❯ jupyter-forward start mariecurie@cheyenne.ucar.edu --launch-command "qsub -q regular -l select=1:ncpus=36,walltime=00:05:00 -A AABD1115"
❯ jupyter-forward mariecurie@cheyenne.ucar.edu --launch-command "qsub -q regular -l select=1:ncpus=36,walltime=00:05:00 -A AABD1115"
```

- Launch Jupyter Lab on a remote system that uses [Slurm job scheduler](https://slurm.schedmd.com/documentation.html)

```bash
❯ jupyter-forward start mariecurie@casper.ucar.edu --launch-command "sbatch -A AABD1115 -t 00:05:00"
❯ jupyter-forward mariecurie@casper.ucar.edu --launch-command "sbatch -A AABD1115 -t 00:05:00"
```

[github-ci-badge]: https://img.shields.io/github/workflow/status/NCAR/jupyter-forward/CI?label=CI&logo=github&style=for-the-badge
Expand Down
6 changes: 0 additions & 6 deletions docs/requirements-docs.txt

This file was deleted.

6 changes: 6 additions & 0 deletions docs/requirements.txt
@@ -0,0 +1,6 @@
Pygments>=2.6
myst-parser
pydata-sphinx-theme
setuptools>=50.3
sphinx>=3.2
-r ../requirements.txt
3 changes: 3 additions & 0 deletions docs/source/changelog.md
@@ -0,0 +1,3 @@
```{include} ../../CHANGELOG.md

```