-
Notifications
You must be signed in to change notification settings - Fork 114
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
Update CLI output to match the latest changes to the catalog commands #1597
Changes from 6 commits
544ba21
2e9d98c
aeec991
e02794b
2a264ec
f3c296b
4edaa7f
4cfe1c5
e2446ea
dec192f
2502b71
e49f3eb
3dbe9d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,13 +38,13 @@ cd nru-programmability-course/describe-app/ab-test | |
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the
->
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Are multiple catalog directories actually required or are they just automatically created? In another comment there was a conversation about whether empty screenshots directories are skipped or not. I think that may factor in here too. In general, I think the change is fine, except that this guide might need to be reworked a little bit more because the procedures following the create command only deal with adding info to the root-level catalog directory. If these Nerdpack item-level catalog directories can be deleted/skipped, then we may need to add a step to do that. Or maybe I'm overthinking this? 😅 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Multiple catalog directories are automatically created but not required. Totally optional if you want to add nerdpack item screenshots or not. We will be releasing an update to the CLI that will skip uploading any screenshots directory that is empty. Currently it is a bit annoying. If you run the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I think if the document describes the final state correctly but there's effectively a bug in the code, then let's just make the change to plural and be done with it 😃 |
||
<Step> | ||
|
||
Create the _catalog_ directory: | ||
Create the _catalog_ directories: | ||
|
||
```sh | ||
nr1 create --type catalog | ||
``` | ||
|
||
This creates a _catalog_ directory with template files for inputting custom information about your app. | ||
This creates a root _catalog_ directory and a _catalog_ directory for each artifact with template files for inputing custom information about your app. | ||
jerelmiller marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<Callout variant="tip"> | ||
|
||
|
@@ -135,4 +135,5 @@ This lesson is part of a course that teaches you how to build a New Relic One ap | |
|
||
</Callout> | ||
|
||
</HideWhenEmbedded> | ||
</HideWhenEmbedded> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,26 +82,22 @@ In _package.json_, set `version` to `1.0.0`: | |
|
||
```json filename=package.json lineHighlight=4 | ||
{ | ||
"private": true, | ||
"name": "ab-test", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"start": "nr1 nerdpack:serve", | ||
"test": "exit 0" | ||
}, | ||
"nr1": { | ||
"uuid": "2d923ba6-d231-4dd3-830f-b1923577a422" | ||
}, | ||
"dependencies": { | ||
"prop-types": "^15.6.2", | ||
"react": "^16.6.3", | ||
"react-dom": "^16.6.3" | ||
}, | ||
"browserslist": [ | ||
"last 2 versions", | ||
"not ie < 11", | ||
"not dead" | ||
] | ||
"private": true, | ||
"name": "ab-test", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"start": "nr1 nerdpack:serve", | ||
"test": "exit 0" | ||
}, | ||
"nr1": { | ||
"uuid": "2d923ba6-d231-4dd3-830f-b1923577a422" | ||
}, | ||
"dependencies": { | ||
"prop-types": "^15.6.2", | ||
"react": "^16.6.3", | ||
"react-dom": "^16.6.3" | ||
}, | ||
"browserslist": ["last 2 versions", "not ie < 11", "not dead"] | ||
} | ||
``` | ||
|
||
|
@@ -209,8 +205,8 @@ Submit your catalog information: | |
|
||
```sh | ||
nr1 catalog:submit | ||
[output] Uploading screenshots... | ||
[output] {green}✔ {plain}Screenshots uploaded | ||
[output] Uploading screenshots from nru-programmability-course/publish/ab-test... | ||
[output] {success}✔{normal} Screenshots uploaded from: nru-programmability-course/publish/ab-test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty sure this section should also include the output from the Similar to what we've got over here: https://github.com/newrelic/developer-website/pull/1597/files#diff-a5b87ebe2e68e66c60aff11ad881315a991250324cd72f76a96165187dc8ab49R181-R188 Course repo for reference: https://github.com/newrelic-experimental/nru-programmability-course/tree/main/describe-app/ab-test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me look at this again. I was under the impression that if the screenshots folder was empty, we wouldn't try to upload it, so let me make sure that is still the case, hence why I omitted that output here. The course doesn't call for adding screenshots at the nerdpack item level, so I only included output from the root-level screenshots. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok after trying this out some more on my own, it looks like we actually don't skip screenshots on empty folders, which means that it errors out when trying to submit this step. $ nr1 catalog:submit
Uploading screenshots from /path/to/demo-app...
✔ Screenshots uploaded from: /path/to/demo-app
Uploading screenshots from /path/to/demo-app/nerdlets/home...
Uploading screenshots from /path/to/demo-app/launchers/launcher...
› Error: 1 error while updating Home 1.0.0
›
› "You must include at least 1 screenshot when uploading screenshots."
› Code: UNKNOWN There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. Good point. All good to leave as is if that's how the command behaves. Pretty sure we're skipping the upload on empty There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So are these Nerdpack item-level screenshots mandatory or can we delete There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alexronquillo per this comment, they are not required and we are releasing a patch to skip uploading screenshots directories that are empty. The output that I have above will be the correct one once that patch goes live. |
||
[output] {green}✔ {plain}Updated metadata for AbTest 1.0.0 | ||
``` | ||
|
||
|
@@ -238,18 +234,26 @@ View your catalog information: | |
|
||
```sh | ||
nr1 catalog:info | ||
[output] {purple}description: {plain}Nerdpack ab-test | ||
[output] {purple}details: {plain}Display test data for our newsletter subscription A/B test | ||
[output] {purple}displayName: {plain}AbTest | ||
[output] {purple}icon.url: {plain}https://nr3.nr-ext.net/artifact-index-production/a685fec2-29fb-40b0-9f65-4178... | ||
[output] {purple}previews.0.url: {plain}https://application-catalog-production.s3.us-east-2.amazonaws.com/nerdpacks/a... | ||
[output] {purple}releaseDate: {plain}2021-03-12T15:46:09.600138Z | ||
[output] {purple}repository: {plain}https://github.com/newrelic-experimental/nru-programmability-course | ||
[output] {purple}tagline: {plain}Win @ newsletter subscriptions | ||
[output] {purple}version: {plain}1.0.0 | ||
[output] {purple}whatsNew.changes: {plain}Initial release! Includes: | ||
[output] - A variety of charts for understanding the test r... | ||
[output] {purple}whatsNew.version: {plain}1.0.0 | ||
[output] AbTest (Nerdpack): | ||
[output] {purple}description: {plain}Nerdpack ab-test | ||
[output] {purple}details: {plain}Display test data for our newsletter subscription A/B test | ||
[output] {purple}displayName: {plain}AbTest | ||
[output] {purple}icon.url: {plain}https://nr3.nr-ext.net/artifact-index-production/a685fec2-29fb-40b0-9f65-4178... | ||
[output] {purple}previews.0.url: {plain}https://application-catalog-production.s3.us-east-2.amazonaws.com/nerdpacks/a... | ||
[output] {purple}releaseDate: {plain}2021-03-12T15:46:09.600138Z | ||
[output] {purple}repository: {plain}https://github.com/newrelic-experimental/nru-programmability-course | ||
[output] {purple}tagline: {plain}Win @ newsletter subscriptions | ||
[output] {purple}version: {plain}1.0.0 | ||
[output] {purple}whatsNew.changes: {plain}Initial release! Includes: | ||
[output] - A variety of charts for understanding the test r... | ||
[output] {purple}whatsNew.version: {plain}1.0.0 | ||
[output] AbTestLauncher (Launcher): | ||
[output] {purple}description: {plain}Describe me | ||
[output] {purple}displayName: {plain}AbTestLauncher | ||
[output] {purple}icon.url: {plain}https://nr3.nr-ext.net/artifact-index-production/a685fec2-29fb-40b0-9f65-4178... | ||
[output] AbTestNerdlet (Nerdlet): | ||
[output] {purple}displayName: {plain}AbTestNerdlet | ||
[output] {purple}supportedEntityTypes.mode: NONE | ||
``` | ||
|
||
All the information from _catalog_ shows here. | ||
|
@@ -333,4 +337,5 @@ This lesson is part of a course that teaches you how to build a New Relic One ap | |
|
||
</Callout> | ||
|
||
</HideWhenEmbedded> | ||
</HideWhenEmbedded> | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -104,28 +104,41 @@ There are no screenshots, icons, details, or what's new features. To add these, | |||||
|
||||||
alexronquillo marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
<Step> | ||||||
|
||||||
From the root of your Nerdpack, create a _catalog_ directory to house your Nerdpack's screenshots and metadata: | ||||||
From the root of your Nerdpack, create _catalog_ directories to house your Nerdpack's screenshots and metadata: | ||||||
|
||||||
```sh | ||||||
nr1 create --type catalog | ||||||
[output] {success}✔{normal} Component created successfully! | ||||||
[output] {success}✔{normal} created: launchers/launcher/catalog | ||||||
[output] {success}✔{normal} created: nerdlets/home/catalog | ||||||
[output] | ||||||
[output] {success}✔{normal} catalog created successfully! | ||||||
[output] {purple}catalog{normal} is available at "./catalog" | ||||||
``` | ||||||
|
||||||
Inside your _catalog_ directory, you'll find specific files and directories for portraying information about your Nerdpack to your users: | ||||||
Inside your root _catalog_ directory, you'll find specific files and directories for portraying information about your Nerdpack to your users: | ||||||
|
||||||
```sh | ||||||
ls catalog | ||||||
[output] README.md additionalInfo.md config.json documentation.md {blue}screenshots | ||||||
``` | ||||||
|
||||||
| File | Description | | ||||||
|---|---| | ||||||
| _README.md_ | A markdown file that instructs you how to use the information and metadata in _catalog_ | | ||||||
| _config.json_ | A JSON file that contains the following fields:<br /><br /><ul><li>`tagline`: A brief headline for the application. This cannot exceed 30 characters.</li><li>`repository`: The URL for the Nerdpack's remote repository. This cannot exceed 1000 characters.</li><li>`details`: The purpose of the Nerdpack and how to use it. This cannot exceed 1000 characters. Use newlines for formatting, and don't include any markdown or HTML.</li><li>`support`: An object that contains:</li><ul><li>`issues`: A URL for the repository's issues list. For example, the **Issues** tab if using GitHub.</li><li>`email`: A valid email address for the team supporting the application</li><li>`community`: A URL for a support thread, forum, or website for troubleshooting and usage support</li></ul><li>`whatsNew`: A bulleted list of changes in the current release version. This cannot exceed 500 characters. Use newlines for formatting, and don't include markdown or HTML.</li></ul>Check out our [Pageview Map application's _config.json_](https://github.com/newrelic/nr1-pageview-map/blob/main/catalog/config.json) to see a real-life implementation. | ||||||
| _documentation.md_ | A markdown file that tells users how to use the Nerdpack's Nerdlets or visualizations. This shows in the detail view's **Documentation** tab. | | ||||||
| _additionalInfo.md_ | An optional markdown file for any additional information about using your application | | ||||||
| _screenshots_ | A directory that contains screenshots of your Nerdlets or visualizations. This can contain no more than 6 images. All screenshots must meet the following criteria:<br /><br /><ul><li>3:2 aspect ratio</li><li>PNG format</li><li>landscape orientation</li><li>1600 to 2400 pixels wide</li></ul> | | ||||||
| File | Description | | ||||||
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||||
| _README.md_ | A markdown file that instructs you how to use the information and metadata in _catalog_ | | ||||||
| _config.json_ | A JSON file that contains the following fields:<br /><br /><ul><li>`tagline`: A brief headline for the application. This cannot exceed 30 characters.</li><li>`repository`: The URL for the Nerdpack's remote repository. This cannot exceed 1000 characters.</li><li>`details`: The purpose of the Nerdpack and how to use it. This cannot exceed 1000 characters. Use newlines for formatting, and don't include any markdown or HTML.</li><li>`support`: An object that contains:</li><ul><li>`issues`: A URL for the repository's issues list. For example, the **Issues** tab if using GitHub.</li><li>`email`: A valid email address for the team supporting the application</li><li>`community`: A URL for a support thread, forum, or website for troubleshooting and usage support</li></ul><li>`whatsNew`: A bulleted list of changes in the current release version. This cannot exceed 500 characters. Use newlines for formatting, and don't include markdown or HTML.</li></ul>Check out our [Pageview Map application's _config.json_](https://github.com/newrelic/nr1-pageview-map/blob/main/catalog/config.json) to see a real-life implementation. | | ||||||
| _documentation.md_ | A markdown file that tells users how to use the Nerdpack's Nerdlets or visualizations. This shows in the detail view's **Documentation** tab. | | ||||||
| _additionalInfo.md_ | An optional markdown file for any additional information about using your application | | ||||||
| _screenshots_ | A directory that contains screenshots of your Nerdlets or visualizations. This can contain no more than 6 images. All screenshots must meet the following criteria:<br /><br /><ul><li>3:2 aspect ratio</li><li>PNG format</li><li>landscape orientation</li><li>1600 to 2400 pixels wide</li></ul> | | ||||||
jerelmiller marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
This command also generates a `catalog` directory for each launcher, nerdlet, and visualization in your Nerdpack. Inside you'll find a directory that allows you to add screenshots for each artifact. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I feel like we're a bit TBD regarding capitalization of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah good catch. I forgot about this one. Thanks! |
||||||
|
||||||
```sh | ||||||
ls launchers/launcher/catalog | ||||||
[output] {blue}screenshots | ||||||
[output] | ||||||
ls nerdlets/home/catalog | ||||||
[output] {blue}screenshots | ||||||
``` | ||||||
|
||||||
</Step> | ||||||
|
||||||
|
@@ -156,7 +169,7 @@ Update your _config.json_ file: | |||||
|
||||||
<Step> | ||||||
|
||||||
Include screenshots in your _screenshots_ directory. | ||||||
Include screenshots in your root _screenshots_ directory or any artifact _screenshots_ directory. | ||||||
jerelmiller marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
</Step> | ||||||
|
||||||
|
@@ -166,8 +179,12 @@ Submit the information to the New Relic One catalog: | |||||
|
||||||
```sh | ||||||
nr1 catalog:submit | ||||||
[output] Uploading screenshots... | ||||||
[output] {success}✔{normal} Screenshots uploaded | ||||||
[output] Uploading screenshots from demo-app... | ||||||
[output] {success}✔{normal} Screenshots uploaded from: demo-app | ||||||
[output] Uploading screenshots from demo-app/launchers/launcher... | ||||||
[output] {success}✔{normal} Screenshots uploaded from: demo-app/launchers/launcher | ||||||
[output] Uploading screenshots from demo-app/nerdlets/home... | ||||||
[output] {success}✔{normal} Screenshots uploaded from: demo-app/nerdlets/home | ||||||
[output] {success}✔{normal} Updated metadata for DemoApp 1.0.0 | ||||||
``` | ||||||
|
||||||
|
@@ -216,26 +233,22 @@ Update your _package.json_ version: | |||||
|
||||||
```json fileName=package.json lineHighlight=4 | ||||||
{ | ||||||
"private": true, | ||||||
"name": "demo-app", | ||||||
"version": "1.0.1", | ||||||
"scripts": { | ||||||
"start": "nr1 nerdpack:serve", | ||||||
"test": "exit 0" | ||||||
}, | ||||||
"nr1": { | ||||||
"uuid": "f2dbc999-e9a3-49b9-933d-5a704c6750bd" | ||||||
}, | ||||||
"dependencies": { | ||||||
"prop-types": "^15.6.2", | ||||||
"react": "^16.6.3", | ||||||
"react-dom": "^16.6.3" | ||||||
}, | ||||||
"browserslist": [ | ||||||
"last 2 versions", | ||||||
"not ie < 11", | ||||||
"not dead" | ||||||
] | ||||||
"private": true, | ||||||
"name": "demo-app", | ||||||
"version": "1.0.1", | ||||||
"scripts": { | ||||||
"start": "nr1 nerdpack:serve", | ||||||
"test": "exit 0" | ||||||
}, | ||||||
"nr1": { | ||||||
"uuid": "f2dbc999-e9a3-49b9-933d-5a704c6750bd" | ||||||
}, | ||||||
"dependencies": { | ||||||
"prop-types": "^15.6.2", | ||||||
"react": "^16.6.3", | ||||||
"react-dom": "^16.6.3" | ||||||
}, | ||||||
"browserslist": ["last 2 versions", "not ie < 11", "not dead"] | ||||||
} | ||||||
``` | ||||||
|
||||||
|
@@ -276,8 +289,12 @@ Submit this new metadata to the catalog: | |||||
|
||||||
```sh | ||||||
nr1 catalog:submit | ||||||
[output] Uploading screenshots... | ||||||
[output] {success}✔{normal} Screenshots uploaded | ||||||
[output] Uploading screenshots from demo-app... | ||||||
[output] {success}✔{normal} Screenshots uploaded from: demo-app | ||||||
[output] Uploading screenshots from demo-app/launchers/launcher... | ||||||
[output] {success}✔{normal} Screenshots uploaded from: demo-app/launchers/launcher | ||||||
[output] Uploading screenshots from demo-app/nerdlets/home... | ||||||
[output] {success}✔{normal} Screenshots uploaded from: demo-app/nerdlets/home | ||||||
[output] {success}✔{normal} Updated metadata for DemoApp 1.0.1 | ||||||
``` | ||||||
|
||||||
|
@@ -347,4 +364,4 @@ nr1 catalog:submit | |||||
[output] {error}›{normal} {blue}catalog/config.json | ||||||
[output] {error}›{normal} {error}Invalid Metadata: `tagline` has a character length of 266. Must be no longer than 30 characters | ||||||
[output] {error}›{normal} Code: UNKNOWN | ||||||
``` | ||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it'd be valuable to update the following screenshot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya thats probably a good idea. Let me see what I can whip up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 0c7017d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyreer I can see how this reads better in English, but I'm wondering if wrapping it as inline code would make sense. The reason I went with plural here was because the directories are called
nerdlets
,launchers
andvisualizations
. I guess the question here is whether we want to use the directory names or update to your suggestion. Thoughts? @alexronquillo do you have a preferred direction for this kind of thing?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh also, are nerdlets capitalized or no? I know Nerdpacks are, but wasn't sure if that also applied to Nerdlet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to follow Alex's lead here :)
Yeah, Nerdlet in a sentence should be capitalized. Checked here: https://newrelic.slack.com/archives/G01GR8SHEHW/p1626718298004000?thread_ts=1626717697.002200&cid=G01GR8SHEHW
Referring to a directory, I think something like
nerdlets
(with the inline code-formatted text) would make it clear if we go that route.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've been trying to move away from using code for filenames because it can be confusing at times, so I think if we want to use directory names, let's use:
I do prefer what @tyreer suggested, though, for two reasons:
And, yep, Nerd* terms are all capitalized because they're branded terms, whereas the others are common nouns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats correct. It would be something like
launchers/my-launcher/catalog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 3dbe9d8