Skip to content

Add colorless menu #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2025
Merged

Add colorless menu #6

merged 3 commits into from
Jun 19, 2025

Conversation

arzzen
Copy link
Member

@arzzen arzzen commented Jun 17, 2025

No description provided.

@arzzen arzzen linked an issue Jun 17, 2025 that may be closed by this pull request
@tomice
Copy link
Collaborator

tomice commented Jun 19, 2025

Hey @arzzen ! Thanks for doing this! Let's do a few tweaks to get this going.

  1. Install ruff (sudo snap install ruff if on Ubuntu)
  2. Install black (sudo apt install black if on Ubuntu)

Next, onto the code changes:

  1. Exported command line options are located in config.py. I see you changed the menu.py to create the colorless menu. However, it isn't getting correctly set. Look at the # _MENU_THEME area towards the bottom of the file. You'll need an elif there for the none menu theme. Verify this gets set correctly by doing an export _MENU_THEME=none before running python3 -m git_py_stats.main. It should show up with no colors. You can also try _MENU_THEME=legacy for another sanity check.
  2. There are some duplicate tests. You can see where they are in the CI builder. Or you can simply run ruff check git_py_stats --fix. This will also automatically fix the whitespace issue and tell you where the duplicate tests are. Remove any duplicate tests.
  3. Adjust the extra long line that ruff check git_py_stats --fix is reporting. One of the lines exceeds what PEP8 likes
  4. Run black . to auto format everything neatly (This will probably automatically fix the issue in step 3 if you want to run this first)
  5. Do one last sanity check by doing python3 -m unittest discover -s git_py_stats/tests -v and make sure it says "Ok".
  6. Push and see if it passes the CI builder.

The CI builder is very opinionated in this project since it's a bit more complicated overall compared to the parent project written in bash. It is both a good thing and a bad thing. It allows for the project to have a unified coding standard, but it requires a bit more work to get commits to pass so they can be merged.

Let me know if you need any other assistance!

@arzzen
Copy link
Member Author

arzzen commented Jun 19, 2025

Hi @tomice , thanks for the clarification, I'll look into it and fix it (btw my setup is ubuntu so it should be easy).

@arzzen arzzen requested a review from tomice June 19, 2025 16:05
Copy link
Collaborator

@tomice tomice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@tomice tomice merged commit fed7a09 into main Jun 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add colorless menu
2 participants