axem-solutions / dem Goto Github PK
View Code? Open in Web Editor NEWContainerized Development Environment Manager for embedded development
License: Other
Containerized Development Environment Manager for embedded development
License: Other
The requests.get() functions now wait for 1 sec before timeout. This value should come from the config file.
Something has changed in the Docker Hub API. When DEM tries to load the repositories from the saved Docker Hub registries many other non-relevant repositories are loaded. This affects all commands that load the repositories.
The communication with Docker Hub must be fixed, so the proper repositories are loaded.
Prerequisite: at least one Docker Hub registry should be added to DEM, for example axemsolutions.
dem create test
Prerequisite: at least one Docker Hub registry should be added to DEM, for example axemsolutions.
dem create test
Currently, when the user creates a new Dev Env, they can only select from the “supported” tool types. The DEM doesn’t accept any Dev Env descriptor that is not included in the supported tool type list.
This behavior should be changed because it limits the usability for no reason.
The DEM should not check whether the tool type is supported or not. Any name can be given for a tool type.
The “supported” tool types are stored in the DevEnv class’s supported_tool_types class variable.
Describe the bug
If there is any additional parameter, the DEM raises an error, except if the --help option is used.
To Reproduce
Currently, if I try to execute
dem list --help asd
dem ignores the extra asd parameter and gives back the expected result of the
dem list --help
but if I try to execute
dem list --all --env asd
I get back an error message highlighting there is an unexpected argument.
The DEM should raise an error if any additional parameter has been added with the --help option.
Test all the commands with the --help option.
dem list-host
List the available hosts from the config file.
If there is no host in the config file, inform the user that no remote host availalbe.
Describe the bug
The DEM should not accept any whitespace in the name of a Dev Env.
To Reproduce
dem create " "
The DEM should notify the user that the name of the Dev Env can’t contain any spaces.
Is your Documentation request related to a problem? Please describe.
A user always frustrated when trying to find specific parts of readme
Describe the solution you'd like
A Table of content
Additional context
Add Table of Content and Contributors to Readme
would love to work, please assign
Describe the bug
An unclear error message is presented when the path for the export
command is ““ or “
To Reproduce
dem export DEV_ENV_NAME ""
or
dem export DEV_ENV_NAME "
After the execution of the export
command with ““ or “ as the path input parameter, the DEM should report: Error: Invalid input path.
In the output of the dem list-tools
command using the color #8f64eb highlight the following text:
Local Tool Images
In the output of the dem list-tools --reg
command using the color #8f64eb highlight the following text:
Available Tool Images from all registries
The user should be able to enable the pager mechanism for the dem list-tools
and dem list-tools --reg
commands.
This should be an entry in the config file.
dem clone DEV_ENV_NAME
dem del-host NAME
Deletes the host from the config file.
If the NAME is an empty string, the DEM should raise an error. (Handled by typer).
If the DEM can’t find the NAME in the list of the available hosts, it should raise an error and abort.
The DEM should autocomplete the NAME with the already available host names from the config file.
In the Dev Env settings panel, if the user selects the host, its value gets saved to the dev_env.json.
The installer should install the following dependencies if not yet available:
The user should be able to add a repository path to the Dev Env, which is located in a registry unknown to DEM.
Prerequisite: The rust Docker Hub registry has not been added to DEM.
dem create test
rust/rust:bookworm
.The repo with the given tag should be also added to the available tool images to search from in the Dev Env Settings Window.
TBD: How to remove such an item from the list?
User shall be able to modify single images of the Env by a command:
dem modify DEV_ENV_NAME TOOL_TYPE TOOL_IMAGE
Where
DEM should handle at minimum the following error cases:
The DEM should autocomplete the command and the arguments:
dem uninstall DEV_ENV_NAME
Implement the dem init [PATH] command.
The .axem directory
Project-specific DEM settings should be placed in the project’s root under the .axem directory. The .axem directory can contain a dev_env_descriptor.json file. This file describes a template Dev Env that can be used for the project. The dev_env_descriptor.json should have the same format as the available Dev Envs from a catalog or an exported Dev Env descriptor (with the export command).
Input parameters
PATH:
To learn more about autocompletion: Link
_When the user types in dem and presses tab, then all the available commands should be listed. When the user starts to type in the name of the command, and presses the tab, only the matching commands should be listed.
These commands should be covered: info, list, create, rename, modify, delete, export, load, list-cat, add-cat, del-cat, list-reg, add-reg, del-reg._
dem info DEV_ENV_NAME
Auto complete for the DEV_ENV_NAME. Should list all the local and catalog Dev Envs.
dem list
Auto complete for the options: local, all, env, tool
dem rename DEV_ENV_NAME NEW_DEV_ENV_NAME
Auto complete for the DEV_ENV_NAME with the list of the locally available Dev Envs.
dem modify DEV_ENV_NAME
Auto complete for the DEV_ENV_NAME with the list of the locally available Dev Envs.
dem delete DEV_ENV_NAME
Auto complete for the DEV_ENV_NAME with the list of the locally available Dev Envs.
dem export DEV_ENV_NAME
Auto complete for the DEV_ENV_NAME with the list of the locally available Dev Envs.
dem del-cat NAME
Auto complete for the NAME with the list of the added catalogs.
dem del-reg NAME
Auto complete for the NAME with the list of the added registries.
dem add-host NAME ADDRESS
The user should be able to add a host.
NAME: name of the host
ADDRESS: IP or hostname of the host
The DEM should save this information in the ~/.home/axem/dem/config.json file:
"hosts": [{
"name": "host name",
"address": "host address"
}]
Example:
"hosts": [{
"name": "strong",
"address": "192.168.1.70"
},
{
"name": "CI/CD",
"address": "10.0.0.1"
},
{
"name": "cloud",
"address": "169.254.7.137"
}
]
If the NAME is already takes, the DEM should ask the use if they would like to overwrite it or not.
If either the NAME or the ADDRESS command is empty the DEM should raise an error. (Handled by type).
The user can’t install a Dev Env that requires a tool image located in a registry, which is not added to DEM. Meaning, for example, if someone would like to install a Dev Env from axem’s open catalog, they also must add the registries that are not yet added.
This is possible because Dev Env descriptors contain the registries where the images are stored.
This approach is problematic though, because if the user would like to modify the Dev Env, all the required images with repositories not added to DEM will report an error.
DEM should check if a cloned Dev Env’s tool images are located in repositories that have not yet been added and then add them. The newly added repository names should be reported to the user.
The check should happen after the clone
, create
, and modify
commands.
Add the crops
repository:
dem add-reg crops https://registry.hub.docker.com
Create a new Dev Env:
dem create yocto
Delete the crops
repo:
dem del-reg crops
Install the Dev Env:
dem install yocto
Now you should see the following error:
Platform error: The crops/poky:ubuntu-22.04 image is not available.
When trying to modify the Dev Env (dem modify yocto
):
The crops/poky:ubuntu-22.04 is not available anymore.
By continuing, the missing tool images will be removed from the Development Environment. [y/N]:
Expected behaviour
The user should be able to install the Dev Env even if a repo is not added. The DEM should add the missing repo.
After the Dev Env Settings Window has been loaded, the input field should be the active UI item. If the input field is active, the '*' (asterisk) cursor should disappear.
The input field should implement a simple search functionality:
As the user types into the search field, the item list should be filtered accordingly, after every keypress.
If the user presses enter, the cursor should appear again, but in the filtered list. The list should become the active UI item.
Pressing 'esc' should clear the search.
The user should be able to navigate between the UI items by pressing the ‘tab’ or ‘shift’ + ‘tab’ keys.
The Dev Env Settings window should look like this:
Is your feature request related to a problem? Please describe.
The Dev Env Settings Window utilizes the rich
library to create UI elements. These UI elements are implemented in the menu.py file. It's tedious and redundant to implement these components because other Python libraries already provide them.
Describe the solution you'd like
Rewrite the Dev Env Settings Window using Textual
. Textual provides textual UI elements.
Everything should look and work the same as now, so the current UI can be used as a reference for validation.
This is how the Dev Env Settings Window looks like:
Easiest way to reach this UI is by the
dem create
command.
The functionality of the window should remain the same, but the sizes of the upper two panels should change. In v0.6.x the upper two panels dynamically changed with the number of items included in them. For the new layout, these two panels should always take all the available sizes regardless of the number of items listed in them.
Describe alternatives you've considered
Alternative libraries might also be used instead of Textual, but please let's discuss your recommendation before you jump into the implementation.
Additional context
The two affected files: menu.py and dev_env_settings_window.py
The not-fitting items are simply cut off if the list can’t fit in the Tool Image selector panel.
Describe the solution you'd like
Implement the scrolling feature, so the not-fitting items are also accessible.
If the cursor reaches the last list item and the user presses the down arrow or 'j' the cursor should jump back to the beginning of the list. If the cursor is at the first item, pressing the up arrow or 'k' should move the cursor to the last list item.
A scrollbar indicating where the cursor is in the whole list is nice to have but not mandatory.
Additional context
First, the #199 issue should be implemented.
The Textual module has scrollable container objects.
dem delete DEV_ENV_NAME
Deletes the Dev Env descriptor from the dev_env.json and removes all required unused tools images.
dem install DEV_ENV_NAME
"installed": "True",
The dem clone command will have a new purpose: it will copy the selected Dev Env descriptor from the catalog and save it in the local dev_env.json.
The new dem cp command should have the same functionality as the current dem clone one, meaning there is no need to modify the command logic.
Documentation: Commands - dem
The expected behavior (this is already implemented as the clone
command):
In the Dev Env settings panel, if the user selects the host, its value gets saved to the dev_env.json.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.