New release - utopian-cli 0.4.2
A few days ago I released utopian-cli 0.3.1, and now I'm back again with the new and improved utopian-cli 0.4.2. I've added quite a lot of features in this update, so I will try and condense it as much as possible and give an overview of everything below! Use the following command to upgrade if you have already installed it
pip install utopian --upgrade
otherwise use the command to install it
pip install utopian
Features overview
The "performance" command has been updated; I've added a few options and also changed/updated already existing ones. I've also added the new command "project" which allows you to see an overview of a project on GitHub! In general I've also cleaned up the code a bit, removed some duplicate code and made some functions more dynamic (can see all the changes here).
I will go over all the changes one by one below! You can also check out the usage of all commands on the README.
Improved features
Performance
I've changed the account
argument to an option (it's obviously still required). It can now also take multiple accounts, which you can easily specify like this for example: -a amosbastian -a roj
. This gives an overview of all the given accounts combined. After implementing support for multiple accounts I also added the --supervisor
option, which allows you to see an overview of a supervisor's team, like so
I also added the ability to sort the returned tables using the --sort
option. This option can take the following three options: accepted, rejected and total. An example of sorting by rejected and accepted respectively is shown in the GIF below
Of course there is also error checking for everything that I added. It makes sure the given accounts are all moderators / supervisors, if that account type was specified respectively. As mentioned above I also removed some functions after I combined them into a somewhat more dynamic function. This cleaned up the code a bit (there is still a lot of cleaning up left to do!), making it a bit easier to add commands in the future. The new documentation for the "performance" command can be found here.
New features
Project
I added the command "project" which allows you to see an overview of a project, e.g. utopian-io/utopian.io. This has similar options as the "performance" command, but instead of specifying an account you can specify a GitHub repository. Just like the "performance" command you can then specify a date or an amount of days using the --date
and --days
options respectively. The default table is an overview of the contributions to that project per category, with their total reviewed contributions, total accepted contributions and total rejected contributions respectively (and of course the reward)!
There is also a --details
option that allows you to see an overview of the contributors of a project. Of course there is also a --limit
option which allows you to limit the --details
table to the top N contributors.
Finally I added the options --sort
, --author
and --category
. The --sort
option lets you to sort the table by accepted contributions, rejected contributions and total contributions. The --author
option lets you sort a project by authors, so you only see an overview of contributions made by them. The --category
option lets you sort a project by categories, so you only see an overview of contributions made to that category. An example of these options is shown in the image below
The documentation for the "project" command can be found here.
How was it implemented?
For the new "project" command I use the GitHub API to get the project's ID. I can then use this ID to get the contributions made to it from the Utopian.io API. After this it simply checks the options to see which functions it needs to execute (like filtering by authors for example), and once this is done it uses the same functions as the "performance" command to show the table. For the "performance" command's option --supervisor
I create a supervisor's team simply by looking at who each moderator's referrer is. Since both commands support multiple authors I also had to change some code around so this would work, but it was pretty straight-forward to do so. If anyone wants to know how something was implemented specifically then just check the code or ask in the comments and I'll get back to you!
Roadmap
Still the same as last time! I'm definitely getting more used to using Click so my coding efficiency has gone up a lot, so whenever I think of something to implement it goes pretty quick and all kinds of new ideas pop into my head! Will have to see what the next thing that pops into my head will be...
How to contribute?
- Fork the repository
- Create a feature branch with
git checkout -b your-feature
- Code and document your feature
- Commit your changes with
git commit -m "add my features"
- Push to your branch with
git push origin your-feature
- Create a new pull request
Anything you can add to the project is valuable to me, be it bug reports, suggestions etc. so please don't hesitate!
Posted on Utopian.io - Rewarding Open Source Contributors
YASS!
Today I wished I was able to use it on my mobile, (is there a way to port it on iPhone :D)
It really answers to my questions.. And I'm thankful for adding "projects" into it.
_o_
Maybe someday haha.
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Thanks!
Great work @amosbastian.
Thanks for the kind words!
Hey @amosbastian I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x