Key Technical Skills
deploy: Manifests, configuration and other resources to deploy
tests: Unitaries tests
docker: Resources for building the container image
migrations: Database migrations scripts
ProdManager: Sources of the application
models: Resource definitions
routes: Flask views and WTForms forms
templates: Jinja2 templates
helpers: Ali baba cave for function and utils
filters: Jinja2 for templates
integrations: Third party integrations source code
Can I create a merge request ?
Yes, you can.
Also, please don't rush or ask for ETA, because I have to understand the merge request, make sure it is no breaking changes and stick to my vision of this project, especially for large merge requests.
I will mark your merge request in the milestones, if I am plan to review and merge it.
- Bug/Security fix
⚠️ Discussion required
- New features
- Large merge requests
❌ Won't Merge
- Do not pass auto test
- Any breaking changes
- Duplicated merge request
- Existing logic is completely modified or deleted for no reason
- A function that is completely out of scope see Project vision
Recommended Merge Request Guideline
Before deep into coding, discussion first is preferred. Creating an empty merge request for discussion would be recommended.
- Fork the project
- Clone your fork repo to local
- Create a new branch
- Create an empty commit
git commit -m "[empty commit] merge request for <YOUR TASK NAME>" --allow-empty
- Push to your fork repo
- Create a merge request
- Write a proper description
- Click "Change to draft"
- Engage a discussion
I personally do not like something need to learn so much and need to config so much before you can finally start the app.
- Easy to install for non-Docker users, no native build dependency is needed (at least for x86_64), no extra config, no extra effort to get it run
- Single container for Docker users, no very complex docker-compose file. Just map the volume and expose the port, then good to go
- Easy to use
- The web UI styling should be consistent and nice.
- 2 spaces indentation
- Function and methods : underscore_type
- Classes : PascalCaseType
- Python >= 3.8
- PostgreSQL >= 10
We can start the application server in one command.
8080 will be used.
It binds to
0.0.0.0:8080 by default.
Flask is used for :
- entry point such as redirecting to pages or the dashboards
- serving the frontend built files (index.html, .js and .css etc.)
- serving internal APIs
- Generate new migration file :
- Upgrade your local instance to test :
- Edit the name and if need the content of the newly created migration file in
API rate limit Tests
A Redis instance is required for API rate limit tests. If not found, tests are skipped.
If you have Docker on your local computer :
Also the Redis connection string used during tests can be overwritten with :
Icons should be downloaded only from Flaticon UIcons library with the
straight setting in
Icons must be placed in ProdManager/templates/icons folder.
Thoses attributes should be added to the
svg block :
Any header or unecessaire block should be removed.
SVG should implement the
SVG/symbol model to use with the
New icons should be loaded in the icons library ProdManager/templates/icons/all.html.
To include an icon in template, you need to use only the
icon macro like :
Code snippet in resource description
Code highlinting theme is generated with pygmentize with the following command :
default theme is used, but other can be found in Pygments the style section
The application has multilang support. This means that every string printed to the final user (except log output) should sould support translation.
Add a new supported language
- Create a new YAML file in the translation folder with language code as file name (
frfor Frensh, ...)
- Duplicate the content of the default language file :
- Make your traduction
Notes: If your traduction file doesn't implement a traduction string, the value of the default language (
en) will be displayed
Add new strings
When you are developping the application, you may encouter the need to display new text to the end user. In order to make that text translatable, you need to add the following abstraction :
In Jinja2 template
You need to use the
_ function like so :
In this example
my_new_title_value is the translation key.
In python code
You need to import the lang manager in you file and use the
lang.get() function like so :
In this example
my_new_text_value is the translation key.
When adding new text, you need to provide the human readable text of the translation key in the default language file
en (see Translation)
If you don't provided translation in the default language a placeholder will be displayed like
APIs are automatically generated if a view is declared with the
/api route prefix : See ProdManager/init.py.
To ensure that routes are accessible through webUI and API,
ProdManager.helpers.template.custom_render_template must be used with a
json attribute like :
OpenID Connect authentication
OpenApi specification can be found here.
- Use SwaggerEditor to update the OpenAPI file
- Use Swagger-CLI to quickly validate of the OpenAPI definition
OpenAPI definition version is independant of the application version. ProdManager can be in version
0.13.0 and API in version
- Update the
- Merge from
- Tag the latest commit of the
masterbranch with the version number
- Wait for CI/CD pipeline to succeed
- Create a Release from the GitLab UI containing the content of the
To make sure that the feature/bugfix you are working on has good performance, you can use the profiling features.
First, start the application with profiling enabled :
Then use snakeviz to review the data :
Documentation is build with MkDocs and MkDocs material. Documentations files are stored in the docs folder. Some other files are links to files outside of the
docs folder :
Test in local :