Giter Club home page Giter Club logo

remote's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

remote's Issues

Shell escaping

See

result.append(f"'{item}'")

It seems to only add ' around arguments containing whitespace, but this does not account for shell escaping.

  • what if the argument contains a `'
  • what if the argument contains a newline?

Python includes shlex.quote for this purpose.

It also seems to filter out empty arguments, which is odd, since "" is a valid parameter for shell commands.

The environment arguments could also be affected

Feature request: Support forwarding multiple ports

This is a great tool, and has been helpful in making remote work more streamlined.

From what i can see, remote -tunnel a:b --tunnel c:d only forwards c:d. When working with a remote jupyter notebook on my compute machine, I need both port 8888 for the notebook itself along with port 6006 for tensorboard.

A power user might also want some kind of range syntax, to forward anything between a range of ports. My bet is that -tunnel a-b:c-d could be a decent syntax for that.

While at it, perhaps the option to pass in raw ssh -o options could be added? This would allow companies with their infrastructure behind a firewall to use the ProxyJump option.

Feature request: Option to push files, ignoring excludes

Notice this odd asymmetry:

Usage: remote-pull [OPTIONS] [PATH]...
Usage: remote-push [OPTIONS]

We're able to pull files that normally are ignore by specifically naming them with remote-pull, but are not able to push such files with remote-push.
An applicable use case would be to push dataset to a remote host, but not index them on each remote call, checking for differences.

Add option to populate remoteignore from gitignore?

It'd be handy if there was an option on remote-init to copy the contents of .gitignore to .remoteignore. An alternative would be to exclude gitignored files from the regular rsync (or add a setting in .remote to do it) and have an option to include those files in remote-push/remote-pull, as the one place I can think ignore them might be annoying is if you have editor configurations that you don't check in, but do want to keep in sync on both machines.

Feature request: (Host-specific) remote command prefix

When working on various remote hosts, it would be nice to prefix the remote COMMAND with something. This could either because the remote is shared, warranting prefixing all command with nice -n 5, or because the command needs to run inside some docker container with docker run, or because it has to queued in some job system such as SLURM.

Specifically, the command here would be nice to if it could be prefixed.

One way this could be configured in .remotes.toml would be:

[general]
cmd_prefix = ["nice", "-n", "5"]

[[hosts]]
host = "..."
cmd_prefix = ["docker", "run", "-it", "MYIMAGE", "-v", "/some/folder:/some/path"]

[[hosts]]
host = "..."
cmd_prefix = ["srun", "--account=foobar", "--mem=4g", "--cpus-per-task=4"]

[[hosts]]
host = "..."
cmd_prefix = [] # no prefix, ignores the default in [general]

This way enables you to have both a default prefix, with the option to override it per remote host

Project-specific defaults for .remote.toml

Currently you can populate the ignore filter from .gitignore, but this would more often than not also ignore any build/ folder which you rarely want to see on github, but do actually want to pull from the remote.

A current solution for pre-populating the ignore filter per project is to create a .remote.toml in the project with the [push], [pull] and [both] already set, omitting [[hosts]]. This however creates the issue of .remote.toml now being tracked by git, a footgun which too often would lead to people committing their own hosts.

I therefore suggest adding support for one more file: .remote-default.toml. The intention is that .remote-default.toml is tracked by git while .remote.toml is not. A tool to automatically generate a .remote-default.toml from the current .remote.toml, omitting the hosts, would also be nice

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.