Skip to content

Commit 19c1570

Browse files
authored
Convert README to Markdown (#393)
* Fix reST README (backticks issue) * Convert README to Markdown
1 parent 5631dcb commit 19c1570

File tree

6 files changed

+91
-114
lines changed

6 files changed

+91
-114
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include README.rst
1+
include README.md
22
include LICENSE
33

44
graft src

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# AWS CloudFormation CLI
2+
3+
The CloudFormation CLI (cfn) allows you to author your own resource providers that can be used by CloudFormation.
4+
5+
## Usage
6+
7+
### Documentation
8+
9+
Primary documentation for the CloudFormation CLI can be found at the [AWS Documentation](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-types.html) site.
10+
11+
### Installation
12+
13+
This tool can be installed using [pip](https://pypi.org/project/pip/) from the Python Package Index (PyPI). It requires Python 3. The tool requires at least one language plugin. The language plugins are also available on PyPI and as such can be installed all at once:
14+
15+
```bash
16+
pip install cloudformation-cli cloudformation-cli-java-plugin cloudformation-cli-go-plugin
17+
```
18+
19+
20+
### Command: init
21+
22+
To create a project in the current directory, use the `init` command. A wizard will guide you through the creation.
23+
24+
```bash
25+
cfn init
26+
```
27+
28+
### Command: generate
29+
30+
To refresh auto-generated code, use the `generate` command. Usually, plugins try to integrate this command in the native build flow, so please consult a plugin's README to see if this is necessary.
31+
32+
```bash
33+
cfn generate
34+
```
35+
36+
## Development
37+
38+
For developing, it's strongly suggested to install the development dependencies inside a virtual environment. (This isn't required if you just want to use this tool.)
39+
40+
```bash
41+
python3 -m venv env
42+
source env/bin/activate
43+
pip install -e . -r requirements.txt
44+
pre-commit install
45+
```
46+
47+
You will also need to install a language plugin, such as [the Java language plugin](https://github.com/aws-cloudformation/cloudformation-cli-java-plugin), also via `pip install`. For example, assuming the plugin is checked out in the same parent directory as this repository:
48+
49+
```bash
50+
pip install -e ../cloudformation-cli-java-plugin
51+
```
52+
53+
Linting and running unit tests is done via [pre-commit](https://pre-commit.com/), and so is performed automatically on commit. The continuous integration also runs these checks. Manual options are available so you don't have to commit):
54+
55+
```bash
56+
# run all hooks on all files, mirrors what the CI runs
57+
pre-commit run --all-files
58+
# run unit tests only. can also be used for other hooks, e.g. black, flake8, pylint-local
59+
pre-commit run pytest-local
60+
```
61+
62+
If you want to generate an HTML coverage report afterwards, run `coverage html`. The report is output to `htmlcov/index.html`.
63+
64+
## Plugin system
65+
66+
New language plugins can be independently developed. As long as they declare the appropriate entry point and are installed in the same environment, they can even be completely separate codebases. For example, a plugin for Groovy might have the following entry point:
67+
68+
```python
69+
entry_points={
70+
"rpdk.v1.languages": ["groovy = rpdk.groovy:GroovyLanguagePlugin"],
71+
},
72+
```
73+
74+
Plugins must provide the same interface as `LanguagePlugin` (in `plugin_base.py`). And they may inherit from `LanguagePlugin` for the helper methods - but this is not necessary. As long as the class has the same methods, it will work as a plugin.
75+
76+
### Supported plugins
77+
78+
| Language | Status | Github | PyPI |
79+
| -------- | ----------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
80+
| Java | Available | [cloudformation-cli-java-plugin](https://github.com/aws-cloudformation/cloudformation-cli-java-plugin/) | [cloudformation-cli-java-plugin](https://pypi.org/project/cloudformation-cli-java-plugin/) |
81+
| Go | Available | [cloudformation-cli-go-plugin](https://github.com/aws-cloudformation/cloudformation-cli-go-plugin/) | [cloudformation-cli-go-plugin](https://pypi.org/project/cloudformation-cli-go-plugin/) |
82+
| Python | Developer Preview | [cloudformation-cli-python-plugin](https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/) | N/A |
83+
84+
## License
85+
86+
This library is licensed under the Apache 2.0 License.

README.rst

Lines changed: 0 additions & 108 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# better interactive session, debugger
22
ipython>=7.7.0
33
ipdb>=0.12
4-
# for previewing the README.rst
5-
docutils>=0.14
64

75
# testing tools
86
pylint>=2.3.1

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
license_file = LICENSE
3-
description-file = README.rst
3+
description-file = README.md
44

55
[flake8]
66
exclude =

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def find_version(*file_paths):
2525
name="cloudformation-cli",
2626
version=find_version("src", "rpdk", "core", "__init__.py"),
2727
description=__doc__,
28-
long_description=read("README.rst"),
28+
long_description=read("README.md"),
29+
long_description_content_type="text/markdown",
2930
author="Amazon Web Services",
3031
author_email="[email protected]",
3132
url="https://github.com/aws-cloudformation/aws-cloudformation-rpdk/",
@@ -52,7 +53,7 @@ def find_version(*file_paths):
5253
},
5354
license="Apache License 2.0",
5455
classifiers=[
55-
"Development Status :: 4 - Beta",
56+
"Development Status :: 5 - Production/Stable",
5657
"Environment :: Console",
5758
"Intended Audience :: Developers",
5859
"License :: OSI Approved :: Apache Software License",

0 commit comments

Comments
 (0)