- Student Developer Info
- Project Overview
- Communication and Work Management
- Primary features/components I worked on
- Other Contributions
- Future Scope of the project
- Things I learned while contributing
- Acknowledgements
- Important Links
Name: Namit Chandwani (@namit-chandwani)
Organisation: JBoss Community
Project: Develop a Golang-based framework (Charmil) to enhance Knative’s functionalities
-
Charmil offers an ecosystem for developing production-ready command-line tools based on the Cobra Framework.
-
It includes an SDK that enables the construction of command-line interface (CLI) applications that all conform to a similarly organized design by giving a level of flexibility to add and/or remove a plugin CLI or a subset of commands from a plugin CLI to a primary 'host' CLI.
-
This allows developers to create several fragmented CLIs in separate repositories and then integrate them into a single host CLI.
-
-
This is the component responsible for constructing modular, multi-repo Golang CLIs with Cobra while providing a variety of high-level solutions for typical challenges like configuration, authentication, and internationalization.
-
These multi-repo CLIs can then be embedded into host CLIs at compile time.
-
-
-
Charmil Validator provides many rules that developers may use to test and regulate various elements of cobra commands.
-
The following rules are provided as of now:
- LengthRule: To control lengths of strings in different attributes of a cobra command.
- MustExistRule: To ensure that a cobra command contains the specified attributes.
- UseMatchesRule: To compare the
Use
attribute of a cobra command with the regular expression specified by the user. - ExampleMatchesRule: To ensure that a cobra command is well-documented and includes appropriate examples.
- PunctuationRule: To verify a cobra command for punctuation errors in accordance with industry standards.
-
-
-
The Charmil Starter Template allows users to quickly create plugins and host commands that make use of the features offered by Charmil.
-
This template includes all of the tools and solutions needed to create a command-line utility.
-
-
-
Charmil offers its own command-line interface (CLI) that allows developers to construct their new Charmil project with additional support for other templates, allowing them to focus on more essential aspects of their project.
-
This is the easiest way to incorporate Charmil into a project.
-
As of now, the Charmil Generator CLI offers 3 commands:
- init: Initializes a project boilerplate by using the Charmil Starter Template.
- add: Adds a new command into the CLI.
- crud: Helps developers generate CRUD commands for their CLI.
-
-
- The Charmil Command Registry will allow developers to create an external index of command-line tools that can be dynamically installed and integrated into their host CLI.
- The entire project is hosted on the Charmil repository under the Aerogear organization on Github.
- Before implementing any new feature, we used Github Discussions to discuss our approach with the mentors and other contributors.
- In the Aerogear discord server, a dedicated channel was created for this project to settle any doubts, ideas, and comments for speedier coordination.
- Some live coding/discussion sessions were conducted on the Aerogear discord server with the mentors and other contributors.
- Charmil CRUD generator command:
- With the help of the
charmil crud
command, developers can eliminate a lot of boilerplate in CLIs containing multiple services that perform standard CRUD operations. - Using a set of pre-defined templates, this command generates CRUD command packages in the directory specified by the
crudpath
flag as well as its corresponding language file in the directory specified by thelocalepath
flag. - These generated files can then be modified by developers to fit their own needs.
- With the help of the
- Config Management Package:
- The Charmil Config package offers a convenient mechanism for both host and plugin developers to manage configurations in their CLI applications.
- Helps in maintaining all available configurations in a single, centralized local config file.
- Provides the host CLI developers with a set of methods to read/write configurations from/to a local config file.
- Provides the plugin developers with functionality to load/save their CLI configurations from/to the host CLI local config file with ease.
- Some refactors on Starter templates
- Feature Flags (Idea discontinued)
- Making the RHOAS CLI repo use Charmil Validator
- Provide POC on how Charmil can be used to integrate case study repositories
- Implementing the Charmil Command Registry component
- Investigating shared authentication between host and plugin CLIs
- Learning new technologies on a regular basis: In the past, I would solely work on technologies that I was previously familiar with and base all of my projects on them. During GSoC, I learned that we should select technologies/languages/dependencies that properly match our use case, not just those that we're familiar with.
- Working with huge codebases: I wasn't used to working with large codebases before, and it took me a while to get used to it.
- Debugging large codes, identifying the cause, and fixing it. Also got to learn about some debugging tools.
- Developer Workflow: Got familiar with the iterative process of first
Picking an issue
⮕Having discussions around it
⮕Implementing it
⮕Creating a PR
⮕Asking for Reviews
⮕Applying suggestions based on reviews
⮕Getting it merged
. - Adapting with contributors across different timezones.
- Understanding, reviewing, and modifying others contributors' code.
- Implementing error handling wherever possible in code, to assist users in determining the source of any issue.
- Writing clean and well-documented code: Prior to GSoC, I had never given much thought to code quality. But after working with my mentors, I realized that it is the most significant and vital characteristic of any excellent codebase.
I would like to express my heartfelt gratitude to:
- All my mentors: Wojciech Trocki (@wtrocki), Dimitri Saridakis (@dimakis), Jack Delahunt (@jackdelahunt), JJ Kiely (@jjkiely), Ramakrishna Pattnaik (@rkpattnaik780) and Maksym Vavilov (@makslion), for always believing in me and devoting time to provide impeccable guidance and motivation while contributing.
- Ankit Hans (@ankithans) for being an amazing collaborator throughout this journey.
- The entire JBoss Community for their welcoming support and assistance.