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
Reorganize actions doc. #3816
Reorganize actions doc. #3816
Conversation
94c623b
to
2f81837
Compare
Codecov Report
@@ Coverage Diff @@
## master #3816 +/- ##
==========================================
- Coverage 75.19% 75.16% -0.04%
==========================================
Files 136 136
Lines 6383 6386 +3
Branches 387 389 +2
==========================================
Hits 4800 4800
- Misses 1583 1586 +3
Continue to review full report at Codecov.
|
docs/actions.md
Outdated
|
||
In addition, we recommend that you review the following topics: | ||
The rest of this document provides a [basic tutorial](#the-basics) for invoking an action, passing parameters to it, and | ||
inspecting the result. We recommend that you get familiar with the following topics first. |
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 can't recommend that you get familiar with the following topics first (i.e. before the basic tutorial) when the first prerequisite topic item is the basic tutorial.
docs/actions.md
Outdated
For more information regarding action invocations using the REST interface, see [Using REST APIs with OpenWhisk](rest_api.md#actions). | ||
|
||
Another way of invoking an action which does not require authentication is via | ||
[web actions](https://github.com/apache/incubator-openwhisk/blob/master/docs/webactions.md#web-actions). |
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.
Can we use a relative link here?
I like it! I think it makes perfect sense to explain the general principles of Actions and farm out the language-specific details. It might be useful to mention what happens under the hood when running actions (i.e. /init and /run calls to a container) but maybe that's too much detail at this level. |
docs/php-actions.md
Outdated
|
||
The PHP runtime will automatically include Composer's autoloader for you, so you can immediately use the dependencies in your action code. | ||
|
||
Note that if you don't include your own `vendor` folder, then the runtime will include one for you. The packages included are listed in the [reference](https://github.com/apache/incubator-openwhisk/blob/master/docs/reference.md#composer-packages). |
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.
Link is wrong - the composer-packages section is further down the page.
docs/swift-actions.md
Outdated
``` | ||
|
||
|
||
See the Swift [reference](./reference.md#swift-actions) for more information about the Swift runtime. |
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.
Link is wrong - reference is further down the page now.
docs/node-actions.md
Outdated
``` | ||
ok: created action hello | ||
``` | ||
The CLI automatically infers the type of the action by using the source file extension. For `.js` source files, the action runs by using a Node.js 6 runtime. You can also create an action that runs with Node.js 8 by explicitly specifying the parameter `--kind nodejs:8`. For more information, see the Node.js 6 vs 8 [reference](./reference.md#javascript-runtime-environments). |
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.
Link is wrong - reference is further down the page.
docs/node-actions.md
Outdated
} | ||
``` | ||
|
||
Note that the action in the example uses the JavaScript `request` library to make an HTTP request to the Yahoo Weather API, and extracts fields from the JSON result. The [References](./reference.md#javascript-runtime-environments) detail the Node.js packages that you can use in your actions. |
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.
Link to reference needs updating.
docs/docker-actions.md
Outdated
wsk action update example --docker janesmith/blackboxdemo | ||
``` | ||
|
||
You can find more information about creating Docker actions in the [References](./reference.md#docker-actions) section. |
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.
The "Docker actions" section is no longer in reference.md, but I can't find it in docker-actions.md either!
docs/php-actions.md
Outdated
wsk action create helloPHP hello.php | ||
``` | ||
|
||
The CLI automatically infers the type of the action from the source file extension. For `.php` source files, the action runs using a PHP 7.1 runtime. See the PHP [reference](./reference.md#php-actions) for more information. |
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.
Link needs updating
This is great I wanted this split for the longest time +1 What do you think is all files start with “actions-*”? Like “actions-java.md” I think is my OCD and I will have trouble find the files. What used to be in actions.md now is in actions-java.md also when listing the files all languages are together so it’s easy to see the ones available. |
This is great. fwiw, it looks like I have the same OCD as Carlos; I'd also put an action prefix on all the files so that an 'ls' grouped them nicely. |
hehe ok. I named them as I did for tab completion but I will rename. |
Renamed the files. @akrabat thanks for flagging the broken links - I'll fix these in the next pass. I tried to address the flow in the parent doc per your comment. |
@bdelacretaz I added a commit to introduce init and run, cold vs warm start. |
@akrabat I've fixed the links and made a pass to update all the docs for the runtimes as well while at it. |
docs/actions-php.md
Outdated
use the dependencies in your action code. | ||
|
||
Note that if you don't include your own `vendor` folder, then the runtime will include one for you. | ||
The following PHP extensions are available in addition to the standard ones: |
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.
Need to separate PHP extensions list from the Composer info as they aren't the same thing. Composer manages PHP components, PHP extensions are compiled C libraries that are loaded by the language and the the user cannot add to or remove them.
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.
thanks @akrabat for the review - I think addressed in my last commit if you can kindly look again.
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.
Yes. That's great. Thanks.
❤️ the move of references to each runtime language |
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.
LGTM 🎉
* Refactor actions markdown so each lang/runtime is its own doc file.
This PR introduces a language-agnostic (mostly) basic introduction to working with actions. And it splits the language/runtime specific tutorials and references into their own markdowns. This is based on discussion with @csantanapr and @akrabat. All feedback appreciated and welcomed.
Description
Related issue and scope
My changes affect the following components
Types of changes
Checklist: