yamlex


Nameyamlex JSON
Version 1.0.13 PyPI version JSON
download
home_pagehttps://github.com/dynatrace-extensions/dt-extensions-yaml-assembler
SummaryCommand-line tool to simplify development of Dynatrace Extensions with big YAML
upload_time2024-06-19 12:20:37
maintainerVagiz Duseev
docs_urlNone
authorVagiz Duseev
requires_python<4.0,>=3.9
licenseApache-2.0
keywords dynatrace cli extensions
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Yamlex

<p>
  <a href="https://pypi.org/pypi/yamlex"><img alt="Package version" src="https://img.shields.io/pypi/v/yamlex?logo=python&logoColor=white&color=blue"></a>
  <a href="https://pypi.org/pypi/yamlex"><img alt="Supported python versions" src="https://img.shields.io/pypi/pyversions/yamlex?logo=python&logoColor=white"></a>
</p>

The `yamlex` command-line tool is here to assist you in development of
an oversized `extension.yaml`, when working with Dynatrace 2.0 Extensions.

It can `split` your original `extension.yaml` into carefully structured 
parts, which are easier to work with. It can then assembe the
`extension.yaml` back from the individual parts using the `join` command.

The Extension Framework only cares about the final assembled
`extension.yaml`. Any extension would be considered invalid without it.
However, it is recommended to commit both the individual parts and
the assembled `extension.yaml` file into the code repository of your
extension, because individual parts are your "code" and the assembled 
file is your artifact. 

With `yamlex`, your development workflow changes in such a way that
you only modify the individual parts and never really touch the artificial 
`extension.yaml`. Before you build the extension, you run `yamlex join`
to assemble the parts into the main file.

*Important: you don't need `yamlex` to develop Dynatrace Extensions.
It's only here to simplify the work when it comes to really
big extensions.*

## Installation

```shell
pip install yamlex
```

## Usage

```
$ yamlex --help
                                                                                
 Usage: yamlex [OPTIONS] COMMAND [ARGS]...                                      
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --version  -v                                                                │
│ --help     -h        Show this message and exit.                             │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ join    Join individual components into a single extension.yaml file.        │
│ map     Map JSON schema to YAML files in VS Code settings.                   │
│ split   Split extension.yaml file into individual components.                │
╰──────────────────────────────────────────────────────────────────────────────╯

```

**TL;DR:**

When you start:

1. Go into the directory with your extension.
1. Run `yamlex split` to split your `extension.yaml` into individual parts.
1. Back up the original `extension.yaml` by renaming it to `extension.yaml.bckp` or something.
1. Run `yamlex join` to assemble `extension.yaml` back from split parts.

*Good!*

As you continue:

1. Modify whichever part you want.
1. And build the main `extension.yaml` file again using `yamlex join`.
1. Repeat last two steps as you continue developing the extension.

*Congratulations! You rock!*

### Join

Assemble `extension.yaml` from parts

**Usage**

```shell
# Normal call
$ yamlex join

# Shorthand
$ yamlex j

# More options
$ yamlex join --source extension/src --target extension/extension.yaml --force

# Generate the "dev" version of the extension with 'custom:' prefix in its name
# and the version explicitly specified in the generated extension.yaml
$ yamlex j --dev
```

**Help**

```
$ yamlex join --help
                                                                                
 Usage: yamlex join [OPTIONS]                                                   
                                                                                
 Join individual components into a single extension.yaml file.                  
 Assembles all files from the --source directory in a hierarchical order.       
 As if the folder structure of the source directory represents a YAML           
 structure.                                                                     
                                                                                
 How it works                                                                   
                                                                                
 - Any folder or file within the --source directory is considered to be         
   a field within the final extension.yaml. For example, a file called          
   name.yaml will become a field called name: and its content will be           
   put into that field.                                                         
                                                                                
 - Nesting level of the included file or folder matches its                     
   indentation level within the resulting file.                                 
                                                                                
 - If a folder contains a special file called index.yaml, then the              
   content of that file is added on the same level as the folder. For           
   example,                                                                     
                                                                                
 - If any of the items within the folder start with the minus sign "-" in       
   their name, then the whole folder is considered to be an array.              
                                                                                
 - If a folder name starts with a plus sign "+", then the folder is             
   considered to be a grouper folder and yamlex behaves as if that folder       
   does not add any additional level of nesting at all.                         
                                                                                
 - If a folder or a file starts with the exclamation mark symbol "!", then      
   it will be ignored, as if it doesn't exist at all.                           
                                                                                
 Full example:                                                                  
                                                                                
 Source folder structure:          Content of files on the left:                
                                                                                
 source:                                                                        
 ├── metadata.yaml                 name: My name is yamlex                      
 ├── folder                                                                     
 │   ├── query.sql                 SELECT * FROM DUAL                           
 │   ├── !some.yaml                text: This file will be skipped              
 │   └── index.yaml                group: My Query                              
 ├── +grouper                                                                   
 │   └── normal.yaml               present: value                               
 └── array                                                                      
     ├── -item_1.yaml              call: fus                                    
     ├── -item_2.yaml              call: roh                                    
     └── -item_3                                                                
          └── index.yaml           call: dah                                    
                                                                                
 Resulting extension.yaml:                                                      
                                                                                
 metadata:                                                                      
   name: My name is yamlex                                                      
 folder:                                                                        
   group: My Query                                                              
   query: SELECT * FROM DUAL                                                    
 present: value                                                                 
 array:                                                                         
   - call: fus                                                                  
   - call: roh                                                                  
   - call: dah                                                                  
                                                                                
 Overwriting existing extension.yaml (--no-comment and --force)                 
                                                                                
 Yamlex tries to be cautious not to accidentally overwrite a manually           
 created extension.yaml. If that file contains the "Generated with              
 yamlex" line in it, then yamlex overwrites it without hesitation.              
 However, when extension.yaml does not contain that line, yamlex                
 does not overwrite it. You can alter this behaviour using --force flag.        
                                                                                
 When yamlex generates the extension.yaml from parts, it adds the               
 same comment at the top: # Generated by yamlex                                 
 If you would like to disable this behaviour, use the --no-comment flag.        
                                                                                
 Development mode                                                               
                                                                                
 When you add the --dev flag, yamlex will add the "custom:" prefix to the       
 name of your extension and will put an explicit version into the final         
 extension.yaml.                                                                
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --source      -s      DIRECTORY  Path to the directory where individual      │
│                                  source component files are stored.          │
│                                  [default: ([default: source or              │
│                                  src/source])]                               │
│ --target      -t      FILE       Path to the target extension.yaml file that │
│                                  will be assembled from parts.               │
│                                  [default: ([default:                        │
│                                  extension/extension.yaml or                 │
│                                  src/extension/extension.yaml])]             │
│ --dev         -d                 Add 'custom:' prefix and explicit version   │
│                                  when producing extension.yaml.              │
│ --keep        -k                 Keep formatting and indentation when adding │
│                                  non-yaml files into extension.yaml.         │
│                                  [default: True]                             │
│ --version     -v      TEXT       Explicitly set the version in the           │
│                                  extension.yaml.                             │
│ --no-comment  -C                 Do not add the 'generated by yamlex'        │
│                                  comment at the top of the file.             │
│ --force       -f                 Overwrite target files even if they were    │
│                                  created manually.                           │
│ --verbose                        Enable verbose output.                      │
│ --quiet                          Disable any informational output. Only      │
│                                  errors.                                     │
│ --help        -h                 Show this message and exit.                 │
╰──────────────────────────────────────────────────────────────────────────────╯

```

### (optional) `map`

Enable YAML validation and auto-completion.

By invoking `yamlex map` you can map the extension JSON schema files to the
future YAML parts of the split  `extension.yaml`.
This will ensure proper validation and auto-completion 
for each and every part and not just for the `extension.yaml`.

Before you execute the `map` command, make sure relevant JSON schema
files for extensions are downloaded and are placed in the right folder.
By default, `yamlex` expects the relevant schema folder to be placed in
the current directory under the `schema/` name.

**Usage**

```shell
# Normal help
$ yamlex map

# More options
$ yamlex map .vscode/settings.json --json schema/ --source extension/src --root . --extension-yaml extension/extension.yaml
```

**Help**

```
$ yamlex map --help
                                                                                
 Usage: yamlex map [OPTIONS] [SETTINGS]                                         
                                                                                
 Map JSON schema to YAML files in VS Code settings.                             
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   settings      [SETTINGS]  Path to the VS Code settings.json file.          │
│                             [default: .vscode/settings.json]                 │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --json            -j      DIRECTORY  Path to directory with valid extensions │
│                                      JSON schema files.                      │
│                                      [default: schema]                       │
│ --source          -s      DIRECTORY  Path to directory where YAML source     │
│                                      files will be stored.                   │
│                                      [default: ([default: source or          │
│                                      src/source])]                           │
│ --root            -r      DIRECTORY  Root directory relative to which the    │
│                                      paths in settings file will be mapped.  │
│                                      [default: .]                            │
│ --extension-yaml  -e      FILE       Path to output extension.yaml file.     │
│                                      [default: ([default:                    │
│                                      extension/extension.yaml or             │
│                                      src/extension/extension.yaml])]         │
│ --verbose                            Enable verbose output.                  │
│ --quiet                              Disable any informational output. Only  │
│                                      errors.                                 │
│ --help            -h                 Show this message and exit.             │
╰──────────────────────────────────────────────────────────────────────────────╯

```

### (optional) `split`

Split the `extension.yaml` in parts.

This command will split the `extension.yaml` into individual components.
It is useful when you only just start using `yamlex` with an existing
extension.

**Usage**

```shell
# Normal syntax
$ yamlex split

# Shorthand
$ yamlex s

# More options
$ yamlex split --source extension/extension.yaml --target extension/src
```

**Help**

```
$ yamlex split --help
                                                                                
 Usage: yamlex split [OPTIONS]                                                  
                                                                                
 Split extension.yaml file into individual components.                          
 Performs a "best effort" opinionated splitting. This operation does not        
 affect the original extension.yaml file. Instead, it extracts components       
 from it and places them into individual files within the --target folder.      
                                                                                
 Splitting multiple times:                                                      
                                                                                
 Theoretically, you only split once. But in practice you can do it over         
 and over (not very well tested). When performing consequent splitting,         
 the operation overwrites any previously generated split files, if they         
 have the 'Generated by yamlex' line within them. If the target file            
 does not have the comment, it is considered to be manually created and is      
 not overwritten. You can still force the overwrite using the --force flag.     
                                                                                
 Do not add 'Generated with yamlex' to files when splitting:                    
                                                                                
 When splitting, you can choose to not add the 'Generated by yamlex'            
 comment to the generated files by using the --no-comment flag.                 
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --source      -s      FILE       Path to source extension.yaml file.         │
│                                  [default: ([default:                        │
│                                  extension/extension.yaml or                 │
│                                  src/extension/extension.yaml])]             │
│ --target      -t      DIRECTORY  Path to directory where split YAML source   │
│                                  files will be stored.                       │
│                                  [default: ([default: source or              │
│                                  src/source])]                               │
│ --no-comment  -C                 Do not add the 'generated by yamlex'        │
│                                  comment at the top of the file.             │
│ --force       -f                 Overwrite target files even if they were    │
│                                  created manually.                           │
│ --verbose                        Enable verbose output.                      │
│ --quiet                          Disable any informational output. Only      │
│                                  errors.                                     │
│ --help        -h                 Show this message and exit.                 │
╰──────────────────────────────────────────────────────────────────────────────╯

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dynatrace-extensions/dt-extensions-yaml-assembler",
    "name": "yamlex",
    "maintainer": "Vagiz Duseev",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": "vagiz.duseev@dynatrace.com",
    "keywords": "dynatrace, cli, extensions",
    "author": "Vagiz Duseev",
    "author_email": "vagiz.duseev@dynatrace.com",
    "download_url": "https://files.pythonhosted.org/packages/a3/39/e147a19cb9a1b1f74cfe4261cd46b264f5af8de9c72b4be07657e019902b/yamlex-1.0.13.tar.gz",
    "platform": null,
    "description": "# Yamlex\n\n<p>\n  <a href=\"https://pypi.org/pypi/yamlex\"><img alt=\"Package version\" src=\"https://img.shields.io/pypi/v/yamlex?logo=python&logoColor=white&color=blue\"></a>\n  <a href=\"https://pypi.org/pypi/yamlex\"><img alt=\"Supported python versions\" src=\"https://img.shields.io/pypi/pyversions/yamlex?logo=python&logoColor=white\"></a>\n</p>\n\nThe `yamlex` command-line tool is here to assist you in development of\nan oversized `extension.yaml`, when working with Dynatrace 2.0 Extensions.\n\nIt can `split` your original `extension.yaml` into carefully structured \nparts, which are easier to work with. It can then assembe the\n`extension.yaml` back from the individual parts using the `join` command.\n\nThe Extension Framework only cares about the final assembled\n`extension.yaml`. Any extension would be considered invalid without it.\nHowever, it is recommended to commit both the individual parts and\nthe assembled `extension.yaml` file into the code repository of your\nextension, because individual parts are your \"code\" and the assembled \nfile is your artifact. \n\nWith `yamlex`, your development workflow changes in such a way that\nyou only modify the individual parts and never really touch the artificial \n`extension.yaml`. Before you build the extension, you run `yamlex join`\nto assemble the parts into the main file.\n\n*Important: you don't need `yamlex` to develop Dynatrace Extensions.\nIt's only here to simplify the work when it comes to really\nbig extensions.*\n\n## Installation\n\n```shell\npip install yamlex\n```\n\n## Usage\n\n```\n$ yamlex --help\n                                                                                \n Usage: yamlex [OPTIONS] COMMAND [ARGS]...                                      \n                                                                                \n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --version  -v                                                                \u2502\n\u2502 --help     -h        Show this message and exit.                             \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 join    Join individual components into a single extension.yaml file.        \u2502\n\u2502 map     Map JSON schema to YAML files in VS Code settings.                   \u2502\n\u2502 split   Split extension.yaml file into individual components.                \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n**TL;DR:**\n\nWhen you start:\n\n1. Go into the directory with your extension.\n1. Run `yamlex split` to split your `extension.yaml` into individual parts.\n1. Back up the original `extension.yaml` by renaming it to `extension.yaml.bckp` or something.\n1. Run `yamlex join` to assemble `extension.yaml` back from split parts.\n\n*Good!*\n\nAs you continue:\n\n1. Modify whichever part you want.\n1. And build the main `extension.yaml` file again using `yamlex join`.\n1. Repeat last two steps as you continue developing the extension.\n\n*Congratulations! You rock!*\n\n### Join\n\nAssemble `extension.yaml` from parts\n\n**Usage**\n\n```shell\n# Normal call\n$ yamlex join\n\n# Shorthand\n$ yamlex j\n\n# More options\n$ yamlex join --source extension/src --target extension/extension.yaml --force\n\n# Generate the \"dev\" version of the extension with 'custom:' prefix in its name\n# and the version explicitly specified in the generated extension.yaml\n$ yamlex j --dev\n```\n\n**Help**\n\n```\n$ yamlex join --help\n                                                                                \n Usage: yamlex join [OPTIONS]                                                   \n                                                                                \n Join individual components into a single extension.yaml file.                  \n Assembles all files from the --source directory in a hierarchical order.       \n As if the folder structure of the source directory represents a YAML           \n structure.                                                                     \n                                                                                \n How it works                                                                   \n                                                                                \n - Any folder or file within the --source directory is considered to be         \n   a field within the final extension.yaml. For example, a file called          \n   name.yaml will become a field called name: and its content will be           \n   put into that field.                                                         \n                                                                                \n - Nesting level of the included file or folder matches its                     \n   indentation level within the resulting file.                                 \n                                                                                \n - If a folder contains a special file called index.yaml, then the              \n   content of that file is added on the same level as the folder. For           \n   example,                                                                     \n                                                                                \n - If any of the items within the folder start with the minus sign \"-\" in       \n   their name, then the whole folder is considered to be an array.              \n                                                                                \n - If a folder name starts with a plus sign \"+\", then the folder is             \n   considered to be a grouper folder and yamlex behaves as if that folder       \n   does not add any additional level of nesting at all.                         \n                                                                                \n - If a folder or a file starts with the exclamation mark symbol \"!\", then      \n   it will be ignored, as if it doesn't exist at all.                           \n                                                                                \n Full example:                                                                  \n                                                                                \n Source folder structure:          Content of files on the left:                \n                                                                                \n source:                                                                        \n \u251c\u2500\u2500 metadata.yaml                 name: My name is yamlex                      \n \u251c\u2500\u2500 folder                                                                     \n \u2502   \u251c\u2500\u2500 query.sql                 SELECT * FROM DUAL                           \n \u2502   \u251c\u2500\u2500 !some.yaml                text: This file will be skipped              \n \u2502   \u2514\u2500\u2500 index.yaml                group: My Query                              \n \u251c\u2500\u2500 +grouper                                                                   \n \u2502   \u2514\u2500\u2500 normal.yaml               present: value                               \n \u2514\u2500\u2500 array                                                                      \n     \u251c\u2500\u2500 -item_1.yaml              call: fus                                    \n     \u251c\u2500\u2500 -item_2.yaml              call: roh                                    \n     \u2514\u2500\u2500 -item_3                                                                \n          \u2514\u2500\u2500 index.yaml           call: dah                                    \n                                                                                \n Resulting extension.yaml:                                                      \n                                                                                \n metadata:                                                                      \n   name: My name is yamlex                                                      \n folder:                                                                        \n   group: My Query                                                              \n   query: SELECT * FROM DUAL                                                    \n present: value                                                                 \n array:                                                                         \n   - call: fus                                                                  \n   - call: roh                                                                  \n   - call: dah                                                                  \n                                                                                \n Overwriting existing extension.yaml (--no-comment and --force)                 \n                                                                                \n Yamlex tries to be cautious not to accidentally overwrite a manually           \n created extension.yaml. If that file contains the \"Generated with              \n yamlex\" line in it, then yamlex overwrites it without hesitation.              \n However, when extension.yaml does not contain that line, yamlex                \n does not overwrite it. You can alter this behaviour using --force flag.        \n                                                                                \n When yamlex generates the extension.yaml from parts, it adds the               \n same comment at the top: # Generated by yamlex                                 \n If you would like to disable this behaviour, use the --no-comment flag.        \n                                                                                \n Development mode                                                               \n                                                                                \n When you add the --dev flag, yamlex will add the \"custom:\" prefix to the       \n name of your extension and will put an explicit version into the final         \n extension.yaml.                                                                \n                                                                                \n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --source      -s      DIRECTORY  Path to the directory where individual      \u2502\n\u2502                                  source component files are stored.          \u2502\n\u2502                                  [default: ([default: source or              \u2502\n\u2502                                  src/source])]                               \u2502\n\u2502 --target      -t      FILE       Path to the target extension.yaml file that \u2502\n\u2502                                  will be assembled from parts.               \u2502\n\u2502                                  [default: ([default:                        \u2502\n\u2502                                  extension/extension.yaml or                 \u2502\n\u2502                                  src/extension/extension.yaml])]             \u2502\n\u2502 --dev         -d                 Add 'custom:' prefix and explicit version   \u2502\n\u2502                                  when producing extension.yaml.              \u2502\n\u2502 --keep        -k                 Keep formatting and indentation when adding \u2502\n\u2502                                  non-yaml files into extension.yaml.         \u2502\n\u2502                                  [default: True]                             \u2502\n\u2502 --version     -v      TEXT       Explicitly set the version in the           \u2502\n\u2502                                  extension.yaml.                             \u2502\n\u2502 --no-comment  -C                 Do not add the 'generated by yamlex'        \u2502\n\u2502                                  comment at the top of the file.             \u2502\n\u2502 --force       -f                 Overwrite target files even if they were    \u2502\n\u2502                                  created manually.                           \u2502\n\u2502 --verbose                        Enable verbose output.                      \u2502\n\u2502 --quiet                          Disable any informational output. Only      \u2502\n\u2502                                  errors.                                     \u2502\n\u2502 --help        -h                 Show this message and exit.                 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n### (optional) `map`\n\nEnable YAML validation and auto-completion.\n\nBy invoking `yamlex map` you can map the extension JSON schema files to the\nfuture YAML parts of the split  `extension.yaml`.\nThis will ensure proper validation and auto-completion \nfor each and every part and not just for the `extension.yaml`.\n\nBefore you execute the `map` command, make sure relevant JSON schema\nfiles for extensions are downloaded and are placed in the right folder.\nBy default, `yamlex` expects the relevant schema folder to be placed in\nthe current directory under the `schema/` name.\n\n**Usage**\n\n```shell\n# Normal help\n$ yamlex map\n\n# More options\n$ yamlex map .vscode/settings.json --json schema/ --source extension/src --root . --extension-yaml extension/extension.yaml\n```\n\n**Help**\n\n```\n$ yamlex map --help\n                                                                                \n Usage: yamlex map [OPTIONS] [SETTINGS]                                         \n                                                                                \n Map JSON schema to YAML files in VS Code settings.                             \n                                                                                \n\u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502   settings      [SETTINGS]  Path to the VS Code settings.json file.          \u2502\n\u2502                             [default: .vscode/settings.json]                 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --json            -j      DIRECTORY  Path to directory with valid extensions \u2502\n\u2502                                      JSON schema files.                      \u2502\n\u2502                                      [default: schema]                       \u2502\n\u2502 --source          -s      DIRECTORY  Path to directory where YAML source     \u2502\n\u2502                                      files will be stored.                   \u2502\n\u2502                                      [default: ([default: source or          \u2502\n\u2502                                      src/source])]                           \u2502\n\u2502 --root            -r      DIRECTORY  Root directory relative to which the    \u2502\n\u2502                                      paths in settings file will be mapped.  \u2502\n\u2502                                      [default: .]                            \u2502\n\u2502 --extension-yaml  -e      FILE       Path to output extension.yaml file.     \u2502\n\u2502                                      [default: ([default:                    \u2502\n\u2502                                      extension/extension.yaml or             \u2502\n\u2502                                      src/extension/extension.yaml])]         \u2502\n\u2502 --verbose                            Enable verbose output.                  \u2502\n\u2502 --quiet                              Disable any informational output. Only  \u2502\n\u2502                                      errors.                                 \u2502\n\u2502 --help            -h                 Show this message and exit.             \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n\n### (optional) `split`\n\nSplit the `extension.yaml` in parts.\n\nThis command will split the `extension.yaml` into individual components.\nIt is useful when you only just start using `yamlex` with an existing\nextension.\n\n**Usage**\n\n```shell\n# Normal syntax\n$ yamlex split\n\n# Shorthand\n$ yamlex s\n\n# More options\n$ yamlex split --source extension/extension.yaml --target extension/src\n```\n\n**Help**\n\n```\n$ yamlex split --help\n                                                                                \n Usage: yamlex split [OPTIONS]                                                  \n                                                                                \n Split extension.yaml file into individual components.                          \n Performs a \"best effort\" opinionated splitting. This operation does not        \n affect the original extension.yaml file. Instead, it extracts components       \n from it and places them into individual files within the --target folder.      \n                                                                                \n Splitting multiple times:                                                      \n                                                                                \n Theoretically, you only split once. But in practice you can do it over         \n and over (not very well tested). When performing consequent splitting,         \n the operation overwrites any previously generated split files, if they         \n have the 'Generated by yamlex' line within them. If the target file            \n does not have the comment, it is considered to be manually created and is      \n not overwritten. You can still force the overwrite using the --force flag.     \n                                                                                \n Do not add 'Generated with yamlex' to files when splitting:                    \n                                                                                \n When splitting, you can choose to not add the 'Generated by yamlex'            \n comment to the generated files by using the --no-comment flag.                 \n                                                                                \n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --source      -s      FILE       Path to source extension.yaml file.         \u2502\n\u2502                                  [default: ([default:                        \u2502\n\u2502                                  extension/extension.yaml or                 \u2502\n\u2502                                  src/extension/extension.yaml])]             \u2502\n\u2502 --target      -t      DIRECTORY  Path to directory where split YAML source   \u2502\n\u2502                                  files will be stored.                       \u2502\n\u2502                                  [default: ([default: source or              \u2502\n\u2502                                  src/source])]                               \u2502\n\u2502 --no-comment  -C                 Do not add the 'generated by yamlex'        \u2502\n\u2502                                  comment at the top of the file.             \u2502\n\u2502 --force       -f                 Overwrite target files even if they were    \u2502\n\u2502                                  created manually.                           \u2502\n\u2502 --verbose                        Enable verbose output.                      \u2502\n\u2502 --quiet                          Disable any informational output. Only      \u2502\n\u2502                                  errors.                                     \u2502\n\u2502 --help        -h                 Show this message and exit.                 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Command-line tool to simplify development of Dynatrace Extensions with big YAML",
    "version": "1.0.13",
    "project_urls": {
        "Documentation": "https://github.com/dynatrace-extensions/dt-extensions-yaml-assembler",
        "Homepage": "https://github.com/dynatrace-extensions/dt-extensions-yaml-assembler",
        "Repository": "https://github.com/dynatrace-extensions/dt-extensions-yamlex"
    },
    "split_keywords": [
        "dynatrace",
        " cli",
        " extensions"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "835f829ecc63fedb310ad610951da8979c89c74a063e6a4811b15c65839c9c3e",
                "md5": "2df84269fd2637bbcd11e88b9c5b9cfc",
                "sha256": "63e965a04254975ce20ea147208266a5f59cc1ae3adb4ea38266699fe59e9d5d"
            },
            "downloads": -1,
            "filename": "yamlex-1.0.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2df84269fd2637bbcd11e88b9c5b9cfc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 25249,
            "upload_time": "2024-06-19T12:20:33",
            "upload_time_iso_8601": "2024-06-19T12:20:33.105824Z",
            "url": "https://files.pythonhosted.org/packages/83/5f/829ecc63fedb310ad610951da8979c89c74a063e6a4811b15c65839c9c3e/yamlex-1.0.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a339e147a19cb9a1b1f74cfe4261cd46b264f5af8de9c72b4be07657e019902b",
                "md5": "c8dc943b1081d661152f22950fd85194",
                "sha256": "52845354fe2c5c2a8ecc4046f3ee0ad3234b33d8f0ecdcaae0b9f89e585b3f42"
            },
            "downloads": -1,
            "filename": "yamlex-1.0.13.tar.gz",
            "has_sig": false,
            "md5_digest": "c8dc943b1081d661152f22950fd85194",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 23126,
            "upload_time": "2024-06-19T12:20:37",
            "upload_time_iso_8601": "2024-06-19T12:20:37.153874Z",
            "url": "https://files.pythonhosted.org/packages/a3/39/e147a19cb9a1b1f74cfe4261cd46b264f5af8de9c72b4be07657e019902b/yamlex-1.0.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-19 12:20:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dynatrace-extensions",
    "github_project": "dt-extensions-yaml-assembler",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "yamlex"
}
        
Elapsed time: 0.62665s