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

Rename binary to rnk #6

Merged
merged 1 commit into from
Jul 3, 2024
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
46 changes: 23 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "renku-cli"
name = "rnk"
description = "A command line interface to the Renku platform"
homepage = "https://renkulab.io/"
version = "0.1.0-nightly"
Expand Down
13 changes: 8 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Renku CLI

This is the documentation for `renku-cli` the command line interface
to the Renku platform.
This is the documentation for the command line interface to the Renku
platform.


## Installation

The binary name for the renku-cli is `renku-cli`.
The binary name for the renku-cli is `rnk`.

### Manual Download

Expand All @@ -17,9 +17,12 @@ If you run on MacOS, download the `*-darwin` binary. If you run some
form of linux, try `*-amd64` or `*-aarch64`. Last for Windows use the
`*-windows` binary.

Once downloaded, you can simply execute it without any further
installation step.

### Nix User

If you are a nix user and have flakes enabled, you can install renku-cli
If you are a nix user and have flakes enabled, you can install rnk
from this repository:

```
Expand All @@ -46,5 +49,5 @@ get an overview of possible commands, run the binary without any
options or adding `--help`.

``` bash renku-cli
renku-cli --help
rnk --help
```
2 changes: 1 addition & 1 deletion mkdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -e

cargo build --release
cargo run --features user-doc -- user-doc --output-dir target/docs --overwrite --renku-cli target/release/renku-cli docs/
cargo run --features user-doc -- user-doc --output-dir target/docs --overwrite --renku-cli target/release/rnk docs/
2 changes: 1 addition & 1 deletion src/cli/cmd/shell_completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct Input {
pub shell: GeneratorChoice,

/// The binary name.
#[arg(long, default_value = "renku-cli")]
#[arg(long, default_value = "rnk")]
pub binary: String,
}

Expand Down
6 changes: 3 additions & 3 deletions src/cli/cmd/userdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ pub struct Input {
#[arg(long, group = "output")]
pub output_dir: Option<PathBuf>,

/// The renku-cli binary program to use for running the snippets.
/// By default it will use itself.
/// The rnk binary program to use for running the snippets. By
/// default it will use itself.
#[arg(long)]
pub renku_cli: Option<PathBuf>,

Expand Down Expand Up @@ -207,7 +207,7 @@ fn write_to_file(file: &Path, content: &str, overwrite: bool, append: bool) -> R
Ok(())
}

/// Process a markdown file by executing all included renku-cli
/// Process a markdown file by executing all included rnk
/// commands and inserting the results.
///
/// The commands are taken from (fenced) code blocks marked with
Expand Down
2 changes: 1 addition & 1 deletion src/cli/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub enum SubCommand {
/// Repository: https://github.com/SwissDataScienceCenter/renku-cli
/// Issue tracker: https://github.com/SwissDataScienceCenter/renku-cli/issues
#[derive(Parser, Debug)]
#[command(name = "renku-cli", version)]
#[command(name = "rnk", version)]
pub struct MainOpts {
#[clap(flatten)]
pub common_opts: CommonOpts,
Expand Down
2 changes: 1 addition & 1 deletion src/httpclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! # Usage
//!
//! ```rust
//! use renku_cli::httpclient;
//! use rnk::httpclient;
//! let client = httpclient::Client::new(
//! "https://renkulab.io",
//! httpclient::proxy::ProxySetting::System,
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use renku_cli::error::{Error, Result};
use rnk::error::{Error, Result};
use std::env;
use std::process;

Expand All @@ -15,7 +15,7 @@ async fn main() {
}

async fn execute() -> Result<()> {
let opts = renku_cli::read_args();
let opts = rnk::read_args();
let remove_env = match opts.common_opts.verbose {
1 => set_log_level("info"),
n => {
Expand All @@ -28,7 +28,7 @@ async fn execute() -> Result<()> {
};
env_logger::init();

let result = renku_cli::execute_cmd(opts).await;
let result = rnk::execute_cmd(opts).await;
if remove_env {
env::remove_var(LOG_LEVEL);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl std::convert::From<serde_json::Error> for Error {
pub type Result<A> = std::result::Result<A, Error>;

pub fn mk_cmd() -> Result<Command> {
let mut cmd = Command::cargo_bin("renku-cli")?;
let mut cmd = Command::cargo_bin("rnk")?;
cmd.args(["--renku-url", "https://ci-renku-3668.dev.renku.ch"]); //use mock url?
Ok(cmd)
}
2 changes: 1 addition & 1 deletion tests/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod common;
use crate::common::*;
use assert_cmd::prelude::*;
use predicates::prelude::*;
use renku_cli::cli::BuildInfo;
use rnk::cli::BuildInfo;

#[test]
#[ignore = "needs a server"]
Expand Down
Loading