How is google summer of code going with aerogears(RedHat)
How is GSoC going?
My experience with Google Summer of Code and my organisation Aerogear(JBoss) has been so great till now, learning new things everyday has really became a part of my life.
It has been almost 2 months since I got into the program, but it feels like tomorrow! When I started contributing or writing proposal, I was like zero in golang, but comparing then and now, it’s different. In this journey I got to know about some great concepts in golang and again many yet to be explored!
My favorite part about the Google Summer of Code is you work on projects are are used or will be used in the industry, and this feeling makes you keep going. We have integrated some features and are planning to integrate Charmil framework with the RHOAS and Apicurio CLI’s.
Need to achieve much bigger targets/goals in coming coding period! Let’s hope for the best 🤞
Again and Refined — What is Charmil?
I have talked about Charmil ie. my GSoC project, in my previous blog, but this framework keeps on refining each day and there are some info’s that needs to be updated.
So Charmil is a Framework for building command line plugins on the top of Cobra Golang library.
Cobra is standard and very famous in the CLI industry and is being used in many industry projects such as Kubernetes, rhoas, gh-cli, etc. To make the development process easier we introduced Charmil.
Charmil solves many problems/issues faced by developers during development of CLI’s. The major feature that Charmil brings on the table is the ability to develop multiple fragmented CLI’s, maintained/working in separate repositories, and later embed/combine them in a single Host CLI.
Charmil Components in brief
- Charmil SDK — For building mutlirepo CLI’s
- Charmil Validator — Cobra Testing Library
- Charmil CLI — Creating starter and managing CLI project
- Charmil Command Registry — Install CLI plugins with binary from maintained registry
For detailed description visit Charmil
This is the charmil library for testing and controlling many aspects of cobra commands. Like to test react components we have react-testing-library, similar to that to test cobra commands with some given set of customizable rules, we have charmil validator.
Validator provides a customizable set of config attributes, for example -
Rules provided by validator -
It is recommended to use Charmil Validator while writing unit tests for the cobra commands. Validator can check if the commands are providing proper and latest documentation, length and presence of attributes, regex matching for command names etc. It also provides the feature to skip some command or skip including children for validation.
Skipping commands for validation is very easy. To skip a single command just provide the CommandPath and to skip the entire chain of commands(including subcommands/children) use a asterik sign immediately after CommandPath
Hence validator is very customizable and easy to use for developer productivity! For detailed documentation of charmil validator, visit Charmil Validator Docs
Here is a small diagram to show how is validator working under the hood.
Would like to sync?
- We are keeping all the communications open, so that everyone can sync and is free to contribute. So if you have any feature/bugs suggestions about anything please donot hesitate to open up an issue
- You can join Aerogear’s discord server to participate in the discussions happening
I have been maintaining a Project Tracker to record the entire process in GSoC and making up of Charmil framework from scratch. Feel free to check it out at https://ankithans.github.io/gsoc21/
What I have learnt or still learning
Some of these I got from my mentor’s feedbacks and others are just my experiences
- Communicate more and more, even if you are stuck somewhere for long. Communication is the key here
- Regularly push code and ask for reviews
- Focus more on the end users and problems, not just code it first then think. Try to follow docs first approach
- Again Communicate more before PR’s
Originally published at https://ankithans.github.io.