-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor project with builds and scripts
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
- Loading branch information
Showing
10 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Integrations CLI | ||
|
||
## Description | ||
|
||
This is a CLI tool for creating, validating, and maintaining OpenSearch Dashboard Integrations. | ||
The tool has three main functions: | ||
|
||
- `create` a new integration with a specified configuration. | ||
- `check` an integration for validity | ||
- `package` an integration to be upload to an OpenSearch Integrations instance | ||
|
||
## Installation | ||
|
||
The project is managed with [Poetry](https://python-poetry.org/). | ||
After installing Poetry, install dependencies: | ||
|
||
```sh | ||
$ poetry install | ||
Installing dependencies from lock file | ||
``` | ||
|
||
## Usage | ||
|
||
The CLI can be run with: | ||
|
||
```sh | ||
$ poetry run cli | ||
Usage: cli.cmd [OPTIONS] COMMAND [ARGS]... | ||
``` | ||
|
||
If you don't want to prefix everything | ||
|
||
## Development | ||
|
||
For development, there are a few scripts to help: | ||
|
||
```sh | ||
$ poetry run test | ||
... | ||
OK | ||
|
||
$ poetry run format | ||
... | ||
All done! | ||
``` | ||
|
||
## License | ||
|
||
This project, like the rest of the OpenSearch projects, is licensed under the Apache 2.0 License. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import subprocess | ||
|
||
|
||
def test(): | ||
""" | ||
Run all unittests. Equivalent to: | ||
`poetry run python -u -m unittest discover` | ||
""" | ||
subprocess.run(["python", "-u", "-m", "unittest", "discover"]) | ||
|
||
|
||
def format(): | ||
""" | ||
Reformat all code. Equivalent to: | ||
`poetry run black .` | ||
""" | ||
subprocess.run(["black", "."]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters