Skip to content
Snippets Groups Projects

Draft: feat: autocreate cube and instance

Merged Noé Gaumont requested to merge topic/default/auto-cubicweb into branch/default
2 unresolved threads

Il reste à mettre le fichier ~/etc/cubicweb.d/instance/source pour mettre sqlite

Edited by Noé Gaumont

Merge request reports

Merge request pipeline #88897 failed

Merge request pipeline failed for e4fdd626

Merged by Fabien AmargerFabien Amarger 3 years ago (Oct 19, 2021 1:46pm UTC)

Merge details

  • Changes merged into with e4fdd626.
  • Deleted the source branch.

Pipeline #88900 canceled

Pipeline canceled for e4fdd626 on branch/default

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 164
    165 # should pip install the cube
    166 create_cube = f'pip install -e cubicweb-{cube_name}'
    167 subprocess.run(create_cube, shell=True, check=True, capture_output=True)
    168
    169 print(f'creating the instance {args.instance_name}. The parameter are in ~/etc/cubicweb.d/{args.instance_name}/')
    170 create_instance = f'CW_DB_DRIVER=sqlite cubicweb-ctl create {args.instance_name} {args.instance_name} -a'
    171 res = subprocess.run(create_instance, shell=True, capture_output=True)
    172 if res.returncode != 0 :
    173 print(res.stdout.decode())
    174 print(res.stderr.decode())
    175 exit(1)
    176
    177 # The source file has to be modified to include sqlite
    178
    179 print(f'Congratulation ! You can run your instance with : `cubicweb-ctl pyramid -D -l info {args.instance_name}` ')
  • 14 14 author = "Fabien Amarger"
    15 15 author_email = "famarger@logilab.fr"
    16 16 requires = {
    17 "cubicweb": ">=3.30",
  • That's a really nice feature, :D thank you very much !

  • Noé Gaumont marked this merge request as draft

    marked this merge request as draft

  • Noé Gaumont removed review request for @bram

    removed review request for @bram

  • Author Maintainer

    I'm also not sure on how to add test for this.

  • Noé Gaumont added 1 commit

    added 1 commit

    Compare with previous version

  • Noé Gaumont added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading