{"id":26367633,"url":"https://github.com/jwizard-bot/jwizard-tools","last_synced_at":"2025-03-16T21:18:07.217Z","repository":{"id":260684573,"uuid":"882032288","full_name":"jwizard-bot/jwizard-tools","owner":"jwizard-bot","description":"Automation scripts, statistical analysis. Used in CI/CD pipelines and standalone JWizard runtime environments.","archived":false,"fork":false,"pushed_at":"2025-03-13T19:20:58.000Z","size":194,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-13T20:30:15.930Z","etag":null,"topics":["automation-scripts","ci-cd-automation","db-migrator","jwizard-bot","python","statistical-analysis"],"latest_commit_sha":null,"homepage":"https://jwizard.pl","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwizard-bot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["jwizard-bot","milosz08"]}},"created_at":"2024-11-01T18:29:50.000Z","updated_at":"2025-03-13T19:21:02.000Z","dependencies_parsed_at":"2024-11-23T01:17:35.131Z","dependency_job_id":"ec5cae70-4a08-4a63-b081-c8603ba1f16f","html_url":"https://github.com/jwizard-bot/jwizard-tools","commit_stats":null,"previous_names":["jwizard-bot/jwizard-tools"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwizard-bot%2Fjwizard-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwizard-bot%2Fjwizard-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwizard-bot%2Fjwizard-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwizard-bot%2Fjwizard-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwizard-bot","download_url":"https://codeload.github.com/jwizard-bot/jwizard-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933443,"owners_count":20370988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation-scripts","ci-cd-automation","db-migrator","jwizard-bot","python","statistical-analysis"],"created_at":"2025-03-16T21:18:06.737Z","updated_at":"2025-03-16T21:18:07.199Z","avatar_url":"https://github.com/jwizard-bot.png","language":"Python","funding_links":["https://github.com/sponsors/jwizard-bot","https://github.com/sponsors/milosz08"],"categories":[],"sub_categories":[],"readme":"![](.github/banner.png)\n\n[[About project](https://jwizard.pl/about)]\n\nJWizard is an open-source Discord music bot handling audio content from various multimedia sources\nwith innovative web player. This repository contains scripts that automate operations in the CI/CD\npipelines of other JWizard projects, as well as standalone scripts used in various JWizard projects.\n\n## Table of content\n\n* [Project modules](#project-modules)\n* [Clone and install](#clone-and-install)\n* [Create migration](#create-migration)\n* [Project arguments](#project-arguments)\n* [License](#license)\n\n## Project modules\n\n| Name             | Description                                                                                |\n|------------------|--------------------------------------------------------------------------------------------|\n| packages_grabber | Parsing and persisting packages used in all JWizard projects.                              |\n| db_migrator      | Database migrator framework, modifying structure and data via YAML files with SQL content. |\n| cache_version    | Update deployment cache (project version and time) in DB.                                  |\n\n## Clone and install\n\n1. Make sure you have at least Python 3 (tested on 3.14) at your machine.\n2. Clone this repository via:\n\n```bash\n$ git clone https://github.com/jwizard-bot/jwizard-tools\n```\n\n3. Create `.env` file based `example.env` with following properties:\n\n```properties\nENV_VAULT_TOKEN=\u003ctoken\u003e\n```\n\n4. Prepare Python virtual environment via:\n\n```bash\n$ python -m venv .venv\n```\n\n5. Activate environment via:\n\n* for UNIX environments:\n\n```bash\n$ source .venv/bin/activate\n```\n\n* for Windows environments:\n\n```cmd\n.\\.venv\\bin\\Activate.ps1\n```\n\n\u003e [!TIP]\n\u003e If you have an execution policy error, try to execute\n\u003e `Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser` in PowerShell.\n\n\u003e [!TIP]\n\u003e If you don't have `bin` directory, change path to `.venv/Scripts/activate` and\n\u003e `.\\.venv\\Scripts\\Activate.ps1` for UNIX and Windows environments respectively.\n\n6. Install project-related dependencies via:\n\n```bash\n$ (venv) pip install -r requirements.txt\n```\n\n7. Run script via:\n\n```bash\n$ (venv) python src/\u003cproject name\u003e.py \u003carguments\u003e\n```\n\nWhere `\u003cproject name\u003e` is name of the project (defined in *name* column in **Project modules**\ntable).\n\n\u003e [!TIP]\n\u003e If `python` command not working in UNIX-like shells (ex. ZSH), try run via `python3` command.\n\n### Alternative, only for UNIX environments:\n\nMake sure you have required permissions:\n\n```bash\n$ sudo chmod +x exec/prepare\n$ sudo chmod +x exec/run\n```\n\n1. Prepare virtual environment and install dependencies via:\n\n```bash\n$ exec/prepare\n```\n\n2. Run via:\n\n```bash\n$ exec/run \u003cproject name\u003e \u003cadditional arguments\u003e\n```\n\nWhere `\u003cproject name\u003e` is name of the project (defined in *name* column in **Project modules**\ntable).\n\n## Create migration\n\nTo create migration template file (in UNIX environments), type:\n\n```bash\n$ sudo chmod +x exec/create-migration\n$ exec/create-migration \u003cmigration name\u003e \u003cpipeline\u003e \u003cauthor\u003e\n```\n\nwhere:\n\n* `\u003cmigration name\u003e` is the self descriptive name of the migration file,\n* `\u003cpipeline\u003e` is one of the migration base directory (see `--pipeline` argument for `db_migrator`\n  project),\n* `\u003cauthor` is migration author persisted in DB. By default, gets author from git property\n  `user.name`. Not required.\n\nThis script will automatically created new migration template with current date, incremented\nmigration number and base migration script copied from `migrations/template.yml` file.\n\n## Project arguments\n\n* For `packages_grabber` project:\n\n```js\n--repo(required)     // Github repository name and organization: owner/name.\n```\n\n* For `db_migrator` project:\n\n```js\n--pipeline(required) // Determine from which directory migrator execute migrations (take: 'infra'\n                     // and 'self'). Used for separate migration executions for JWizard Tools and\n                     // JWizard Infra (Core and API).\n```\n\n* For `cache_version` project:\n\n```js\n--repo(required)     // Github repository name and organization: owner/name.\n```\n\n* For `project_analyzer` project:\n\n```js\n--repo(required)     // Github repository name and organization: owner/name.\n```\n\n## License\n\nThis project is licensed under the AGPL-3.0 License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwizard-bot%2Fjwizard-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwizard-bot%2Fjwizard-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwizard-bot%2Fjwizard-tools/lists"}