Skip to content

Commit 4e91433

Browse files
author
Jeff Gollnick
committed
Update local fork
2 parents 21cfdb9 + 7ad6a0c commit 4e91433

3,075 files changed

Lines changed: 252710 additions & 38996 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Code Example Bug
3+
about: Report a problem with an existing code example
4+
title: "[BUG] <<Path to affected code file(s) in this repository>>"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**What is the issue?**
11+
12+
[Summarize the issue here.]
13+
14+
**How can someone reproduce this issue (if applicable)?**
15+
16+
1.
17+
1.
18+
1.
19+
20+
**What is the actual result when the preceding steps are followed (if applicable)?**
21+
22+
[Describe the actual result here.]
23+
24+
**What was the result you expected instead (if applicable)?**
25+
26+
[Describe the expected result here.]
27+
28+
**Environment details to help us try to reproduce the issue (if applicable)**
29+
30+
- **Operating system and version:** [Windows 10 | OSX Mojave | Ubuntu 18.04.2 | etc. ]
31+
- **SDK or tool name:** [AWS SDK for Java | AWS CLI | etc.]
32+
- **SDK or tool version:** [1.16.113 | 2.7.33 | etc.]
33+
34+
**Any other related details we should know about?**
35+
36+
[Provide any additional details here.]
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
name: Pull Request
3+
about: Add new Code Examples to Catalog
4+
title: "[NEW EXAMPLE] <<Language>> <<Service>> <<Description of Examples>>"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Each example should contain the following metadata. Some of the fields like keyword and service can be used multiple times as needed. For snippet-service, use the AWS Service Namespace as listed in our [General Reference](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces). If the example uses multiple services, be sure to include each service on a seperate line.
11+
12+
Use comment denotations appropriate for each langague.
13+
Example Metadata and License:
14+
15+
```
16+
/**
17+
* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
18+
*
19+
* This file is licensed under the Apache License, Version 2.0 (the "License").
20+
* You may not use this file except in compliance with the License. A copy of
21+
* the License is located at
22+
*
23+
* http://aws.amazon.com/apache2.0/
24+
*
25+
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
26+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
27+
* specific language governing permissions and limitations under the License.
28+
*/
29+
// snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.]
30+
// snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
31+
// snippet-service:[<<ADD SHORT SERVICE NAME>>]
32+
// snippet-sourcesyntax:[<<LANGUAGE>>]
33+
// snippet-keyword:[<<LANGUAGE>>]
34+
// snippet-keyword:[<<ADD FULL SERVICE NAME>>]
35+
// snippet-keyword:[Code Sample]
36+
// snippet-keyword:[<<API OPERATION>>]
37+
// snippet-sourcetype:[snippet] or snippet-sourcetype:[full-example]
38+
// snippet-sourcedate:[YYYY-MM-DD]
39+
// snippet-sourceauthor:[<<YOUR USERNAME>>]
40+
// snippet-start:[service.language.unique_name.complete]
41+
42+
<your code>
43+
44+
// snippet-end:[service.language.unique_name.complete]
45+
```
46+
47+
48+
Please answer the following questions about the examples submitted to help us process the Pull request efficently.
49+
50+
**Did you add the metadata as described above?**
51+
52+
53+
**How were these examples tested?**
54+
55+
56+
**If necessary, how do I build/compile the example?**
57+
58+
59+
**If necessary, how do I run the example?**
60+
61+
62+
**Are there any required inputs?**
63+
64+
65+
**What output should I expect?**
66+
67+
68+
**Are there any hard-coded values that might need changing?**
69+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: New Code Example Request
3+
about: 'Propose a new code example.'
4+
title: "[NEW EXAMPLE REQUEST] <<Provide a title for this proposal>>"
5+
labels: code sample request
6+
assignees: ''
7+
8+
---
9+
10+
**What are you trying to accomplish?**
11+
12+
[Provide a clear and brief description of what the code example should do. For example, "I want to upload a file to the cloud."]
13+
14+
**Which AWS services, if known, should this code example use?**
15+
16+
[List the [AWS service(s)](https://aws.amazon.com/products/) that this code example should use, if you know them.]
17+
18+
*
19+
*
20+
*
21+
22+
**Which AWS SDKs or tools, if known, should this code example use?**
23+
24+
[List the [AWS SDKs or tools](https://aws.amazon.com/tools/) that this code example should use, if you know them.]
25+
26+
*
27+
*
28+
*
29+
30+
**Are there any similar code examples that could be leveraged?**
31+
32+
[List any similar code examples that already exist in the [Code Catalog](https://docs.aws.amazon.com/code-samples/latest/catalog/welcome.html), if you know of any.]
33+
34+
*
35+
*
36+
*
37+
38+
**Any other related details we should know about?**
39+
40+
[Provide any additional details here.]

.gitignore

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
build_dir/
2-
target/
3-
README.html
4-
*.swp
5-
.DS_Store
6-
launch.json
7-
.idea
8-
.classpath
9-
.project
10-
.settings
11-
Gemfile
12-
Gemfile.lock
13-
.gitignore
14-
.metadata
15-
.recommenders
16-
php/example_code/Find_replace_confirm changes.py
1+
build_dir/
2+
target/
3+
README.html
4+
*.swp
5+
.DS_Store
6+
launch.json
7+
.idea
8+
.classpath
9+
.project
10+
.settings
11+
Gemfile
12+
Gemfile.lock
13+
.gitignore
14+
.metadata
15+
.recommenders
16+
php/example_code/Find_replace_confirm changes.py
1717
*.phar
18+
._*
19+
cpp/.vs/
20+
*.iml
21+
.vscode
22+
__pycache__
23+
venv
24+
composer.*
25+
vendor/
26+
main.zip

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: python
22
python:
33
- "3.6"
4-
script: python check_metadata.py -q
4+
script: python -m scripts.checkin_tests --quiet

CONTRIBUTING.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The AWS documentation source files on GitHub aren't published directly to the of
1212

1313
We look forward to receiving your pull requests for:
1414

15-
* New content you'd like to contribute (such as new code samples or tutorials)
15+
* New content you'd like to contribute (such as new code examples or tutorials)
1616
* Inaccuracies in the content
1717
* Information gaps in the content that need more detail to be complete
1818
* Typos or grammatical errors
@@ -37,11 +37,26 @@ Before you send us a pull request, please be sure that:
3737

3838
For contributions that will take a significant amount of time, [open a new issue](https://github.com/awsdocs/aws-doc-sdk-examples/issues/new) to pitch your idea before you get started. Explain the problem and describe the content you want to see added to the documentation. Let us know if you'll write it yourself or if you'd like us to help. We'll discuss your proposal with you and let you know whether we're likely to accept it. We don't want you to spend a lot of time on a contribution that might be outside the scope of the documentation or that's already in the works.
3939

40+
## Guidelines for contributing code examples
41+
42+
Help us raise the bar for code examples, so that your code example will provide the most value it can to users.
43+
44+
When you submit a new code example to us, we strongly encourage you to include the following:
45+
46+
* Provide a README.md file at the root level of your submission to help users save time and effort when they work with your example. At a minimum, your README.md file should describe what your example demonstrates, call out any prerequisites needed to run it, and then tell users how to run it. [Here's a good example](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/python/example_code/lambda/scheduled_lambda/README.md) of a useful README.md file.
47+
* Write your code in a modular style to help users more easily copy and reuse it in their own solutions. By "modular," we mean that your code should accept inputs from the caller and return outputs to the caller. Provide comments in the code that describe these inputs and outputs. Also, don't hard-code input values in modularized code. Instead, provide these values through your unit tests, as described in the next point. [Here's a good example]( https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/python/example_code/lambda/scheduled_lambda/lambda_util.py) of code written in a modular style.
48+
* Add some type of [unit tests](https://en.wikipedia.org/wiki/Unit_testing ) to help users more easily run your example. These unit tests can use hard-coded input values (or input values provided by the user) to call your example code. [Here's a good example](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/python/example_code/lambda/scheduled_lambda/scheduled_lambda.py) of unit tests that use hard-coded input values.
49+
* Add standard error or exception handling to your code to enable easier troubleshooting and recovery. [Here's a good example]( https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/python/example_code/lambda/scheduled_lambda/lambda_util.py) of standard error/exception handling.
50+
51+
If your code example submission is missing any of these things, we might ask you to include them before we merge.
52+
53+
Although many older code examples in this repo don't contain all of these things, we're working to ensure that all newer ones do.
54+
4055
## Finding contributions to work on
4156

4257
If you'd like to contribute, but don't have a project in mind, look at the [open issues](https://github.com/awsdocs/aws-doc-sdk-examples/issues) in this repository for some ideas. Any issues with the [help wanted](https://github.com/awsdocs/aws-doc-sdk-examples/labels/help%20wanted) or [enhancement](https://github.com/awsdocs/aws-doc-sdk-examples/labels/enhancement) labels are a great place to start.
4358

44-
In addition to written content, we really appreciate new examples and code samples for our documentation, such as examples for different platforms or environments, and code samples in additional languages.
59+
In addition to written content, we really appreciate new examples for our documentation, such as examples for different platforms or environments, and examples in additional programming languages.
4560

4661
## Code of conduct
4762

0 commit comments

Comments
 (0)