/datagalaxy-toolbox

Toolbox allows you to perform admin operations on DataGalaxy.

Primary LanguagePythonMIT LicenseMIT

Toolbox

Build status

Toolbox allows you to perform admin operations on DataGalaxy.

Features

  • Copy attributes from a source client space to a target client space.
  • Delete attributes on client space.
  • Copy glossary properties from a workspace to another.
  • Copy usages from a workspace to another.

Installation

For now we provide an executable file datagalaxy-toolbox.exe which makes Toolbox usable only on Windows. You can download it from the Assets section of the Releases page. If you want to use Toolbox on Mac or Linux you need to build a binary file following the development section.

Usage

CLI

Flags
  • [optional arguments] -h, --help- show help message
  • --url - URL
  • --token - Integration token
  • --url-source- URL source environnement
  • --url-target - URL target environnement
  • --token-source - Integration token from source environnement
  • --token-target - Integration token from target environnement
  • --workspace-source - Workspace source name
  • --workspace-target - Workspace target name

delete-attributes

Toolbox checks that there is no identical attribute on the target client space before running the copy from the source. It raises an exception and stops the program if it finds duplicate attributes. To delete attributes from the target client space to allow copying run:

datagalaxy-toolbox.exe delete-attributes [-h] --url URL --token TOKEN

copy-attributes

datagalaxy-toolbox.exe copy-attributes [-h] --url-source URL_SOURCE --url-target URL_TARGET --token-source TOKEN_SOURCE --token-target TOKEN_TARGET

copy-glossary

datagalaxy-toolbox.exe copy-glossary [-h] --url-source URL_SOURCE --token-source TOKEN_SOURCE [--url-target URL_TARGET] [--token-target TOKEN_TARGET] --workspace-source WORKSPACE_SOURCE --workspace-target WORKSPACE_TARGET

--url-target and --token-target are optional if the copy is made on the same client space.

copy-usages

datagalaxy-toolbox.exe copy-usages [-h] --url-source URL_SOURCE --token-source TOKEN_SOURCE [--url-target URL_TARGET] [--token-target TOKEN_TARGET] --workspace-source WORKSPACE_SOURCE --workspace-target WORKSPACE_TARGET

--url-target and --token-target are optional if the copy is made on the same client space.

Development

Prerequisites

Toolbox requires:

  • Python >= 3.9
  1. Clone the repository
  2. Create a virtual env in the .venv folder
python -m venv .venv
  1. activate the virtual env
source .venv/bin/activate
  1. Install packages
pip install -r requirements.txt

Testing

To run tests

python -m pytest

Linter

We use Flake8 as a linter

python -m flake8 .

Build a binary file

run the command

pyinstaller -n datagalaxy-toolbox --onefile --console toolbox/__main__.py

This creates a dist folder with the binary file.

run the binary

./dist/datagalaxy-toolbox --help

Contributing

This project welcomes contributions and suggestions. Please have a look at our Guidelines for contributing.

License

See the LICENCE file for details.