Skip to content

Scaffolding #50

Closed
Closed

Description

@alecandido

At the moment, we need a given hierarchy of folders to run.

Unfortunately, this may complicate the usage for a new user (or any non-developer in general), since you have to be manage part of the structure manually, but then it has to respect some constraints.

To improve UX, I propose to implement to following features, keeping them simple, but useful:

  • a unique subcommand to manage a project structure, let's call it pineko scaffold (name to decide, take it as a placeholder)
  • a command to setup a new project pineko scaffold new (possibly aliased to pineko new for simplicity)
    • it should create all the directories, and possibly download some stuffs (e.g. yamldb)
  • a function to verify correctness of the project structure, since it should be declared in the config file pineko.toml, check_folders()
    • it should be run by every subcommand of pineko scaffold before running (simple to implement in click, we just need to put the call in the group function)
    @command.group("scaffold")
    def subcommand():
        check_folders()
  • a subcommand pineko scaffold check to just run check_folders() (and print a simple and nice report if something goes wrong)

Since paths here are crucial, this is related to #51

Optionally:

  • a subcommand pineko scaffold update to download a new version of remote resources (e.g. yamldb)
    • in case, better to keep the old one as backup (put in a .old-data folder somewhere, and mangle with a timestamp)
  • a subcommand pineko scaffold repair, to fix the structure according to the current one spelled out in pineko.toml

Activity

  1. added
    enhancement
    on Dec 6, 2022
  2. felixhekhorn commented on Dec 6, 2022

    @felixhekhorn
    Contributor
    1. this has to be scoped under theory - since this refers to the "theory" mode of pineko (remember there is also the "file" mode, which is handy from time to time). We may reconsider our choice of scoping "theory commands" and keep "file commands" global (such as compare)
    2. if Scope op card template in theory #67 gets accepted we may also want to generate a default template operator card
  3. alecandido commented on Feb 13, 2023

    @alecandido
    CollaboratorAuthor

    We may reconsider our choice of scoping "theory commands" and keep "file commands" global (such as compare)

    Definitely: it looks to me that the theory mode is by now more useful than the file mode. But we can discuss :)

    @felixhekhorn @andreab1997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions