1046

Data Generator Beta Available

Comments for “Data Generator Beta Available”
 

Posted by Dom on Thursday 21st March 2024 at 18:55 GMT

The first real beta version of the data generator that I've been working on is now ready for people to play with.

It resides here https://github.com/domsinclair/vtl_gen

I'm indebted to Simon (aka DaFa ) for some invaluable assistance.

There is an inbuilt help file (based on markdown if you're interested).

Currently the one main restriction is that data won't be generated for module tables where that module does not have an api associated with it. There are a couple of features I still want to add and I don't doubt the odd bug or two that needs to be ironed out (I'd be grateful if bugs or issues were reported on github as it's easier to keep track of them.

Hope it proves useful.
Level One Member

Dom

User Level: Level One Member

Date Joined: 12/01/2024

Posted by DaFa on Friday 22nd March 2024 at 03:51 GMT

Hi Dom,

Thanks for sharing your data_faker. I had some issues with the opening line
require_once __DIR__ . '/../assets/parsedown/Parsedown.php';
as it doesn't exist in the shared files/ folders. I presume because it is missing the assets folder off 'vtl_gen'
├───vtl_gen
│   ├───controllers
│   ├───views
│   └───vtl_faker
│       ├───assets
│       │   └───vendor
│       │       ├───composer
│       │       ├───fakerphp
│       │       │   └───faker
│       │       │       └───src
│       │       │           └───Faker
│       │       │               ├───Calculator
│       │       │               ├───Container
│       │       │               ├───Core
│       │       │               ├───Extension
│       │       │               ├───Guesser
│       │       │               ├───ORM
│       │       │               │   ├───CakePHP
│       │       │               │   ├───Doctrine
│       │       │               │   ├───Mandango
│       │       │               │   ├───Propel
│       │       │               │   ├───Propel2
│       │       │               │   └───Spot
│       │       │               └───Provider
│       │       │                   ├───ar_EG
│       │       │                   ├───ar_JO
│       │       │                   ├───ar_SA
│       │       │                   ├───at_AT
│       │       │                   ├───bg_BG
│       │       │                   ├───bn_BD
│       │       │                   ├───cs_CZ
│       │       │                   ├───da_DK
│       │       │                   ├───de_AT
│       │       │                   ├───de_CH
│       │       │                   ├───de_DE
│       │       │                   ├───el_CY
│       │       │                   ├───el_GR
│       │       │                   ├───en_AU
│       │       │                   ├───en_CA
│       │       │                   ├───en_GB
│       │       │                   ├───en_HK
│       │       │                   ├───en_IN
│       │       │                   ├───en_NG
│       │       │                   ├───en_NZ
│       │       │                   ├───en_PH
│       │       │                   ├───en_SG
│       │       │                   ├───en_UG
│       │       │                   ├───en_US
│       │       │                   ├───en_ZA
│       │       │                   ├───es_AR
│       │       │                   ├───es_ES
│       │       │                   ├───es_PE
│       │       │                   ├───es_VE
│       │       │                   ├───et_EE
│       │       │                   ├───fa_IR
│       │       │                   ├───fi_FI
│       │       │                   ├───fr_BE
│       │       │                   ├───fr_CA
│       │       │                   ├───fr_CH
│       │       │                   ├───fr_FR
│       │       │                   ├───he_IL
│       │       │                   ├───hr_HR
│       │       │                   ├───hu_HU
│       │       │                   ├───hy_AM
│       │       │                   ├───id_ID
│       │       │                   ├───is_IS
│       │       │                   ├───it_CH
│       │       │                   ├───it_IT
│       │       │                   ├───ja_JP
│       │       │                   ├───ka_GE
│       │       │                   ├───kk_KZ
│       │       │                   ├───ko_KR
│       │       │                   ├───lt_LT
│       │       │                   ├───lv_LV
│       │       │                   ├───me_ME
│       │       │                   ├───mn_MN
│       │       │                   ├───ms_MY
│       │       │                   ├───nb_NO
│       │       │                   ├───ne_NP
│       │       │                   ├───nl_BE
│       │       │                   ├───nl_NL
│       │       │                   ├───pl_PL
│       │       │                   ├───pt_BR
│       │       │                   ├───pt_PT
│       │       │                   ├───ro_MD
│       │       │                   ├───ro_RO
│       │       │                   ├───ru_RU
│       │       │                   ├───sk_SK
│       │       │                   ├───sl_SI
│       │       │                   ├───sr_Cyrl_RS
│       │       │                   ├───sr_Latn_RS
│       │       │                   ├───sr_RS
│       │       │                   ├───sv_SE
│       │       │                   ├───th_TH
│       │       │                   ├───tr_TR
│       │       │                   ├───uk_UA
│       │       │                   ├───vi_VN
│       │       │                   ├───zh_CN
│       │       │                   └───zh_TW
│       │       ├───psr
│       │       │   └───container
│       │       │       └───src
│       │       └───symfony
│       │           └───deprecation-contracts
│       └───controllers


** Update - I managed to reconstruct the missing assets folder, downloaded the Parsedown class from https://github.com/erusev/parsedown and copied over the README.md as help.md and all is fine 🤓
├───vtl_gen
│   │   README.md
│   │
│   ├───assets
│   │   ├───help
│   │   │       help.md
│   │   │
│   │   └───parsedown
│   │           composer.json
│   │           LICENSE.txt
│   │           Parsedown.php
│   │           README.md
│   │
│   ├───controllers
│   │       settings.php
│   │       Vtl_gen.php
│   │
│   ├───views
│   │       help.php
│   │       vtl_gen.php


Well done! I'll do some testing and give you some feedback soon.

Other than that, you should bundle it up and upload it to the Trongate Module Market via https://trongate.io/module_market/your_items

This comment was edited by DaFa on Friday 22nd March 2024 at 04:28 GMT

Founding Member

DaFa

User Level: Founding Member

Date Joined: 30/11/2018

Posted by Dom on Friday 22nd March 2024 at 08:17 GMT

Hi Simon

Thank you for that. I've no idea why that happened but I suspect I simply didn't setup the git repo properly in the first place. I had the devil's own job just setting up the repo for a single folder and i suspect I got the process wrong from the outset.

I have merged your pull request and added the real help.md file so that there are proper instructions.

Creating a proper module will be the next stage. I need to work out how that is done (especially if one were to add a theme of sorts to go with it (I would love to see default Trongate themes automatically follow system prefs and have an auto dark mode)). Hopefully I'll have worked that out reasonably soon.

I also need to improve some of the data generation for types. if it can work with a field name it's easier to get more realistic data.
Level One Member

Dom

User Level: Level One Member

Date Joined: 12/01/2024

Posted by Dom on Friday 22nd March 2024 at 12:49 GMT

I have now added to the internal documentation for this and included it on the front of the github readme.

Included is some advice on how you can customise the actual generation itself if you need to. Remember that this is a development tool so it's rather assumed that you have an idea about how to write code! You'll find that an IDE like phpStorm will provide some excellent intellisense for this.

I'm currently having an issue with turning this into a module, the trongate site itself is not playing ball and I don't know why.
Level One Member

Dom

User Level: Level One Member

Date Joined: 12/01/2024

Posted by Dom on Friday 22nd March 2024 at 17:11 GMT

Revised the way that table fields are shown (essentially removing auto incremented primary keys and provided a means to select all rows for data generation at once. Corrected a couple of glaring typos as well.

Github main ranch updated.
Level One Member

Dom

User Level: Level One Member

Date Joined: 12/01/2024

Posted by Dom on Monday 25th March 2024 at 20:28 GMT

New repo created here

https://github.com/domsinclair/vtl_gen

same basic instructions as before. You can now create and delete data. You can also create and delete indexes.
Level One Member

Dom

User Level: Level One Member

Date Joined: 12/01/2024

Posted by DaFa on Tuesday 26th March 2024 at 09:13 GMT

I'll check it out and if I can help out will send in a few pull requests soon 👍

This comment was edited by DaFa on Saturday 30th March 2024 at 23:41 GMT

Founding Member

DaFa

User Level: Founding Member

Date Joined: 30/11/2018

Posted by Dom on Thursday 28th March 2024 at 20:25 GMT

Basic ability to export a database is now included
Level One Member

Dom

User Level: Level One Member

Date Joined: 12/01/2024

×