https://github.com/jwizard-bot/jwizard-tools
Automation scripts, statistical analysis. Used in CI/CD pipelines and standalone JWizard runtime environments.
https://github.com/jwizard-bot/jwizard-tools
automation-scripts ci-cd-automation db-migrator jwizard-bot python statistical-analysis
Last synced: about 1 year ago
JSON representation
Automation scripts, statistical analysis. Used in CI/CD pipelines and standalone JWizard runtime environments.
- Host: GitHub
- URL: https://github.com/jwizard-bot/jwizard-tools
- Owner: jwizard-bot
- License: agpl-3.0
- Created: 2024-11-01T18:29:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-13T19:20:58.000Z (over 1 year ago)
- Last Synced: 2025-03-13T20:30:15.930Z (over 1 year ago)
- Topics: automation-scripts, ci-cd-automation, db-migrator, jwizard-bot, python, statistical-analysis
- Language: Python
- Homepage: https://jwizard.pl
- Size: 189 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README

[[About project](https://jwizard.pl/about)]
JWizard is an open-source Discord music bot handling audio content from various multimedia sources
with innovative web player. This repository contains scripts that automate operations in the CI/CD
pipelines of other JWizard projects, as well as standalone scripts used in various JWizard projects.
## Table of content
* [Project modules](#project-modules)
* [Clone and install](#clone-and-install)
* [Create migration](#create-migration)
* [Project arguments](#project-arguments)
* [License](#license)
## Project modules
| Name | Description |
|------------------|--------------------------------------------------------------------------------------------|
| packages_grabber | Parsing and persisting packages used in all JWizard projects. |
| db_migrator | Database migrator framework, modifying structure and data via YAML files with SQL content. |
| cache_version | Update deployment cache (project version and time) in DB. |
## Clone and install
1. Make sure you have at least Python 3 (tested on 3.14) at your machine.
2. Clone this repository via:
```bash
$ git clone https://github.com/jwizard-bot/jwizard-tools
```
3. Create `.env` file based `example.env` with following properties:
```properties
ENV_VAULT_TOKEN=
```
4. Prepare Python virtual environment via:
```bash
$ python -m venv .venv
```
5. Activate environment via:
* for UNIX environments:
```bash
$ source .venv/bin/activate
```
* for Windows environments:
```cmd
.\.venv\bin\Activate.ps1
```
> [!TIP]
> If you have an execution policy error, try to execute
> `Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser` in PowerShell.
> [!TIP]
> If you don't have `bin` directory, change path to `.venv/Scripts/activate` and
> `.\.venv\Scripts\Activate.ps1` for UNIX and Windows environments respectively.
6. Install project-related dependencies via:
```bash
$ (venv) pip install -r requirements.txt
```
7. Run script via:
```bash
$ (venv) python src/.py
```
Where `` is name of the project (defined in *name* column in **Project modules**
table).
> [!TIP]
> If `python` command not working in UNIX-like shells (ex. ZSH), try run via `python3` command.
### Alternative, only for UNIX environments:
Make sure you have required permissions:
```bash
$ sudo chmod +x exec/prepare
$ sudo chmod +x exec/run
```
1. Prepare virtual environment and install dependencies via:
```bash
$ exec/prepare
```
2. Run via:
```bash
$ exec/run
```
Where `` is name of the project (defined in *name* column in **Project modules**
table).
## Create migration
To create migration template file (in UNIX environments), type:
```bash
$ sudo chmod +x exec/create-migration
$ exec/create-migration
```
where:
* `` is the self descriptive name of the migration file,
* `` is one of the migration base directory (see `--pipeline` argument for `db_migrator`
project),
* `