Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Yunohost App Generator (alias Yologen) #1799

Merged
merged 38 commits into from
Apr 2, 2024

Conversation

lapineige
Copy link
Contributor

A flask webapp to generate a basic (for now) & working Yunohost app using no more than a web form.

@lapineige
Copy link
Contributor Author

One thing that will require some discussion : where should this (flask app) be hosted ?

Right now people willing to try it can use my own hosting, that is not intended to be the final public version. Please contact me (for instance in the matrix room) to get it.

@tituspijean
Copy link
Contributor

We will host it on one of our servers. 😉

@lapineige
Copy link
Contributor Author

lapineige commented Oct 25, 2023

Small bugs to fix:

  • config panel file and conf files have a wrong name
  • in manifest, "not relevant" is not between quotes, and multi-instance "false" is "False"
  • python setting is broken
  • python option needs python3-venv package

tools/app_generator/templates/change_url.j2 Outdated Show resolved Hide resolved
tools/app_generator/templates/config.j2 Outdated Show resolved Hide resolved
tools/app_generator/templates/remove.j2 Outdated Show resolved Hide resolved
tools/app_generator/templates/restore.j2 Outdated Show resolved Hide resolved
tools/app_generator/templates/upgrade.j2 Outdated Show resolved Hide resolved
tools/app_generator/templates/backup.j2 Outdated Show resolved Hide resolved
tools/app_generator/templates/install.j2 Outdated Show resolved Hide resolved
lapineige and others added 11 commits October 29, 2023 15:44
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
…pdownload with two submit buttons mapped to the same route
@YunoHost YunoHost deleted a comment from lapineige Nov 12, 2023
@alexAubin

This comment has been minimized.

@lapineige

This comment has been minimized.

@orhtej2
Copy link
Contributor

orhtej2 commented Jan 21, 2024

default restore script restores $install_dir while backup does not declare it for well you know... backup.

@tituspijean
Copy link
Contributor

tituspijean commented Jan 23, 2024

  • "Sources" field should be optional (Python app can only rely on pip to download sources)
  • "multi_instance" and "ldap" fields end up on the same line (and should not be quoted if true or false)
  • Newline missing before "[resources.apt]" and "[resources.database]"
  • Config filename is still "some_config_file" in the upgrade script
  • Restore script does not restart the service
  • No _common.sh file is created

@lapineige

This comment has been minimized.

@lapineige
Copy link
Contributor Author

implement i18n using Flask-Babel

That's a big step and I think it's needed to have at least an English version for the release.
I don't have enough time to do this myself, but I might like to do it with someone else if there is someone interested (for a voice call ? :).

@lapineige

This comment has been minimized.

@lapineige

This comment has been minimized.

@tituspijean tituspijean marked this pull request as ready for review March 9, 2024 21:14
@tituspijean tituspijean marked this pull request as draft March 9, 2024 21:15
@tituspijean

This comment has been minimized.

@lapineige

This comment has been minimized.

@tituspijean

This comment has been minimized.

@lapineige

This comment has been minimized.

@lapineige
Copy link
Contributor Author

lapineige commented Mar 10, 2024

Things starts to be messy, so here is the new TODO list:

  • python setting is broken
  • python option needs python3-venv package
  • open the first panel on first load.
  • add ISSUE_TEMPLATE.md / PULL_REQUEST_TEMPLATE.md
  • While using logrotate, one can't choose a specific logfile.
  • "Sources" field should be optional (Python app can only rely on pip to download sources)
  • Newline missing before "[resources.apt]" and "[resources.database]" (Fixed ?)
  • Restore script does not restart the service
  • yarn is not even installed (Fixed ?)
  • yarn custom installation setup is reset to default
  • add a systemd.conf?
  • python setting is broken
  • python option needs python3-venv package
  • The "main app technology" panel doesn't reset when set to "other"
  • Better support for all kind of underlying programming language (ex: implement those python/pip custom helpers ?). Not sure of the status of this, it requires testing :)

Lots of very small steps in the list that should be accessible to newcomers. Contributions welcome 🙂 !


Big steps in the roadmap (imho) for a first official release:

  • try packaging a couple apps (that may or may not be already packaged) to check if the output is decent and if there's any obvious stuff that should be taken care of. Ongoing work, more testers always needed ! :)
  • make sure there is no security issue in the field that receive some text (are they sanitized enough ?)
  • Check if my dirty CSS to have panels that (un)fold is accessible / not buggy (there are already some situations where it doesn't adapt to the new panel size)
  • implement i18n using Flask-Babel (I'd reserve that for v0.9 as a major new version)
  • deploy on yunohost's infrastructure ?
    • This requires to fix the Flask_ynh app.
  • Announce a beta version and get more testing
  • Do all needed fixes, and when confident release an official version (v1 ?)

And a kind of meta functionality that could be done at any time and maybe speed up some of the previous steps

  • To ease the testing phase, one could complete the auto form filling functionality to make it generate a "real" app (such as example_ynh ?) that one could deploy directly to test the packaging

@lapineige
Copy link
Contributor Author

To anyone willing to test the tool as it is right now (similar to that PR code), please contact me to get the link ;)

@lapineige
Copy link
Contributor Author

Translations with Babel where added, but there are not working well, there is some debug to do.

@alexAubin alexAubin marked this pull request as ready for review April 2, 2024 21:12
@alexAubin alexAubin merged commit ff14b4a into YunoHost:master Apr 2, 2024
2 checks passed
@lapineige
Copy link
Contributor Author

Translations with Babel where added, but there are not working well, there is some debug to do.

For your information I found the issue with translations not done for every fields: lazy_gettext should be used instead of gettext fonction, at least for fields (tittles are doing fine with gettext).

@orhtej2
Copy link
Contributor

orhtej2 commented Apr 21, 2024

A handful more:

  • Non is not translated
  • Lack of autoupdater is curiously labelled Non
  • Accordion sometimes does not expand fully starting from section 6 (you have to collapse previous sections and reopen the failing one)
  • LDAP and SSO questions have answers in different order 🤣
  • If you contract accordion form validation will not show which field is incorrectly filled
  • You need to provide French description, even if you don't have one

@lapineige
Copy link
Contributor Author

If you contract accordion form validation will not show which field is incorrectly filled

For that particular one, I don't know how to solve it, it's quite a pain 😅

@orhtej2
Copy link
Contributor

orhtej2 commented Apr 23, 2024

Couple more:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
6 participants