Skip to content

Commit

Permalink
Adjust summaries and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjstevens committed Sep 19, 2024
1 parent 2fb5ce2 commit ff37f95
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 21 deletions.
6 changes: 3 additions & 3 deletions packages/apollo-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ npm install -g @apollo-annotation/cli
$ apollo COMMAND
running command...
$ apollo (--version)
@apollo-annotation/cli/0.1.19 darwin-x64 node-v20.10.0
@apollo-annotation/cli/0.1.19 linux-x64 node-v20.17.0
$ apollo --help [COMMAND]
USAGE
$ apollo COMMAND
Expand All @@ -41,8 +41,8 @@ USAGE
- [`apollo feature`](../website/docs/cli//feature.md) - Commands to handle
features
- [`apollo help`](../website/docs/cli//help.md) - Display help for apollo.
- [`apollo jbrowse`](../website/docs/cli//jbrowse.md) - Get Jbrowse
configuration from Apollo
- [`apollo jbrowse`](../website/docs/cli//jbrowse.md) - Commands to manage the
JBrowse configuration
- [`apollo login`](../website/docs/cli//login.md) - Login to Apollo
- [`apollo logout`](../website/docs/cli//logout.md) - Logout of Apollo
- [`apollo refseq`](../website/docs/cli//refseq.md) - Commands to handle
Expand Down
3 changes: 3 additions & 0 deletions packages/apollo-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
"feature": {
"description": "Commands to handle features"
},
"jbrowse": {
"description": "Commands to manage the JBrowse configuration"
},
"refseq": {
"description": "Commands to handle reference sequences"
},
Expand Down
13 changes: 10 additions & 3 deletions packages/apollo-cli/src/commands/jbrowse/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ import { BaseCommand } from '../../baseCommand.js'
import { wrapLines, queryApollo } from '../../utils.js'

export default class GetConfig extends BaseCommand<typeof GetConfig> {
static summary = 'Get Jbrowse configuration from Apollo'
static summary = 'Get JBrowse configuration from Apollo'
static description = wrapLines(
'Print to stdout the Jbrowse configuration from Apollo in json format',
'Print to stdout the JBrowse configuration from Apollo in JSON format',
)

static examples = [
{
description: 'Get JBrowse configuration:',
command: '<%= config.bin %> <%= command.id %> > config.json',
},
]

public async run(): Promise<void> {
const { flags } = await this.parse(GetConfig)

Expand All @@ -20,7 +27,7 @@ export default class GetConfig extends BaseCommand<typeof GetConfig> {
)

if (!response.ok) {
throw new Error('Failed to fetch jbrowse configuration')
throw new Error('Failed to fetch JBrowse configuration')
}

const json = (await response.json()) as object
Expand Down
11 changes: 5 additions & 6 deletions packages/apollo-cli/src/commands/jbrowse/set-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ import {
} from '../../utils.js'

export default class SetConfig extends BaseCommand<typeof SetConfig> {
static summary = 'Add jbrowse configuration'
static summary = 'Set JBrowse configuration'
static description = wrapLines(
'Add jbrowse configuration into apollo database',
'Set JBrowse configuration in Apollo collaboration server',
)

static examples = [
{
description: 'Add jbrowse configuration:',
description: 'Add JBrowse configuration:',
command: '<%= config.bin %> <%= command.id %> config.json',
},
]

static args = {
inputFile: Args.string({
description: 'Input jbrowse configuration file',
description: 'JBrowse configuration file',
required: true,
}),
}
Expand Down Expand Up @@ -65,10 +65,9 @@ export default class SetConfig extends BaseCommand<typeof SetConfig> {
if (!response.ok) {
const errorMessage = await createFetchErrorMessage(
response,
'Failed to add jbrowse configuration',
'Failed to add JBrowse configuration',
)
throw new ConfigError(errorMessage)
}
this.log('Jbrowse configuartion added successfully to apollo')
}
}
23 changes: 14 additions & 9 deletions packages/website/docs/cli/jbrowse.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# `apollo jbrowse`

Get Jbrowse configuration from Apollo
Commands to manage the JBrowse configuration

- [`apollo jbrowse get-config`](#apollo-jbrowse-get-config)
- [`apollo jbrowse set-config INPUTFILE`](#apollo-jbrowse-set-config-inputfile)

## `apollo jbrowse get-config`

Get Jbrowse configuration from Apollo
Get JBrowse configuration from Apollo

```
USAGE
Expand All @@ -18,36 +18,41 @@ FLAGS
--profile=<value> Use credentials from this profile
DESCRIPTION
Get Jbrowse configuration from Apollo
Get JBrowse configuration from Apollo
Print to stdout the Jbrowse configuration from Apollo in json format
Print to stdout the JBrowse configuration from Apollo in JSON format
EXAMPLES
Get JBrowse configuration:
$ apollo jbrowse get-config > config.json
```

_See code:
[src/commands/jbrowse/get-config.ts](https://github.com/GMOD/Apollo3/blob/v0.1.19/packages/apollo-cli/src/commands/jbrowse/get-config.ts)_

## `apollo jbrowse set-config INPUTFILE`

Add jbrowse configuration
Set JBrowse configuration

```
USAGE
$ apollo jbrowse set-config INPUTFILE [--profile <value>] [--config-file <value>]
ARGUMENTS
INPUTFILE Input jbrowse configuration file
INPUTFILE JBrowse configuration file
FLAGS
--config-file=<value> Use this config file (mostly for testing)
--profile=<value> Use credentials from this profile
DESCRIPTION
Add jbrowse configuration
Set JBrowse configuration
Add jbrowse configuration into apollo database
Set JBrowse configuration in Apollo collaboration server
EXAMPLES
Add jbrowse configuration:
Add JBrowse configuration:
$ apollo jbrowse set-config config.json
```
Expand Down

0 comments on commit ff37f95

Please sign in to comment.