Skip to content

feat: add sorting and skip_summary parameters - #562

Open
oleole39 wants to merge 2 commits into
github-community-projects:mainfrom
oleole39:table_sort
Open

oleole39 wants to merge 2 commits into
github-community-projects:mainfrom
oleole39:table_sort

Conversation

@oleole39

@oleole39 oleole39 commented Nov 10, 2026 •

Copy link
Copy Markdown

Pull Request

Proposed Changes

This PR adds 2 features:

  • Allow to hide the summary table (the one including total contributions statistics)
  • Sort contributors table by chosen column name (username, contribution_count or new_contributor) and chosen order (ascending or descending).

They are to be set by the following environment variables:

  • SORT_COLUMN = username | contribution_count | new_contributor
  • SORT_ORDER = asc | desc
  • SKIP_SUMMARY = True | False

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

@oleole39
oleole39 marked this pull request as draft November 10, 2026 04:26
@oleole39

Copy link
Copy Markdown
Author

tests missing

@oleole39

oleole39 commented Nov 10, 2026 •

Copy link
Copy Markdown
Author

Tests added.

One lint issue remains due to adding the test test_get_env_vars_with_absent_or_invalid_sort_and_skip_summary_params to test_env.py:

************* Module test_env
test_env.py:10:0: R0904: Too many public methods (21/20) (too-many-public-methods)

Please consider whether you'd rather remove this test or increase the limit so that the lint succeeds.

@oleole39
oleole39 marked this pull request as ready for review November 10, 2026 06:46
@oleole39

oleole39 commented Nov 10, 2026 •

Copy link
Copy Markdown
Author

Also FYI, var skip_summary is described in function's param descriptions in comments as a string (e.g. there for instance), even though it is meant to be a boolean. This has been done so to stick with other booleans in the list which are described as string too. Not sure whether it is meant so, but that's just comments anyway, so no functional impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant