Skip to content

feat: add sorting and skip_summary parameters - #562

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

oleole39 wants to merge 17 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. Default value is contribution_count.
  • SORT_ORDER = asc | desc. Default value is desc.
  • SKIP_SUMMARY = True | False. Default value is False.

Until now the contributors table was ordered by pseudo-random order coming straight from GitHub API. With the addition of this feature, the default order becomes by contribution count in descending order.

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

This comment was marked as resolved.

@oleole39

This comment was marked as resolved.

@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.

@jmeridth jmeridth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 (summary)

Thanks for this, oleole39! The sorting and skip-summary options are a nice addition, and the test coverage is thorough. There's one blocker below: the call in main() passes the new arguments out of order, so every run hits a TypeError. The rest are smaller questions.

The Docker build failure isn't from your change. It's a stale libc6-dev pin that's already fixed on main, so rebasing should clear it. On your pylint question, a # pylint: disable=too-many-public-methods on the test class seems fine to me rather than dropping a test.

Comment thread contributors.py Resolved
Comment thread test_contributors.py Resolved
Comment thread markdown.py Resolved
Comment thread markdown.py Resolved
Comment thread env.py Resolved
Comment thread json_writer.py Resolved
oleole39 and others added 5 commits November 25, 2026 05:38
Bumps the dependencies group with 1 update: [mypy-extensions](https://github.com/python/mypy_extensions).


Updates `mypy-extensions` from 1.1.0 to 1.2.0
- [Commits](python/mypy_extensions@1.1.0...1.2.0)

---
updated-dependencies:
- dependency-name: mypy-extensions
  dependency-version: 1.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…nity-projects#563)

Bumps the dependencies group with 4 updates: [step-security/harden-runner](https://github.com/step-security/harden-runner), [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/analyze](https://github.com/github/codeql-action) and [github/codeql-action/upload-sarif](https://github.com/github/codeql-action).


Updates `step-security/harden-runner` from 2.22.3 to 2.22.4
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@46b06ce...1d88384)

Updates `github/codeql-action/init` from 4.39.1 to 4.39.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@9b32540...33d7b85)

Updates `github/codeql-action/analyze` from 4.39.1 to 4.39.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@9b32540...33d7b85)

Updates `github/codeql-action/upload-sarif` from 4.39.1 to 4.39.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@9b32540...33d7b85)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.22.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: github/codeql-action/init
  dependency-version: 4.39.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.39.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.39.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-community-projects#566)

* chore(deps): bump pylint from 4.1.3 to 4.1.4 in the dependencies group

Bumps the dependencies group with 1 update: [pylint](https://github.com/pylint-dev/pylint).


Updates `pylint` from 4.1.3 to 4.1.4
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](pylint-dev/pylint@v4.1.3...v4.1.4)

---
updated-dependencies:
- dependency-name: pylint
  dependency-version: 4.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(docker): bump libc6-dev pin to 2.41-12+deb13u5

## What/Why

Debian trixie replaced libc6-dev 2.41-12+deb13u4 with +deb13u5, so the
pinned apt install fails and the Docker build breaks on every PR.

## Proof it works

Checked the trixie, trixie-updates, and trixie-security Packages
indexes. libc6-dev is at 2.41-12+deb13u5. The gcc, libffi-dev, and git
pins still match. `make test` and `make lint` pass. The Docker build
was not run locally; CI verifies it.

## Risk

Low. A glibc point release for the build stage only. The runtime image
uses the base image's libc.

## AI role

Claude Opus 5.5 diagnosed the failed run, looked up the package
versions, and wrote the change. jmeridth reviewed it.

## Review focus

Whether to keep exact apt pins, given this will recur on the next
Debian point release.

Signed-off-by: jmeridth <jmeridth@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: jmeridth <jmeridth@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jmeridth <jmeridth@gmail.com>
Bumps the dependencies group with 1 update in the / directory: python.


Updates `python` from 3.15.0-slim to 3.15.2-slim

---
updated-dependencies:
- dependency-name: python
  dependency-version: 3.15.2-slim
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@oleole39
oleole39 requested a review from jmeridth November 25, 2026 04:47

@jmeridth jmeridth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 (summary)

Thanks for the quick turnaround! Two things still block CI: the lint issue on the sort key, and pylint's too-many-public-methods check on test_env.py. A # pylint: disable=too-many-public-methods on that test class works for us.

Comment thread markdown.py Resolved
Comment thread markdown.py Resolved
Comment thread test_markdown.py Resolved
@oleole39
oleole39 requested a review from jmeridth November 26, 2026 05:07

@jmeridth jmeridth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 (summary)

Nice work on this round. Tests and Docker are green now. What's left is super-linter (ruff, markdownlint, prettier, codespell) and one README sentence. After that this looks ready from my side.

Comment thread sort.py Outdated
sorted_collaborators (list): A list of objects of the same format as the one received as argument.

"""
is_reverse = not sort_order == "asc" # defaults to descending order if invalid

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 (medium)

Super-linter's ruff step still fails with 13 errors. Here it wants sort_order != "asc" (SIM201). The rest are in test_sort.py (import order, the class-level list, getattr with a constant name) and env.py (List from typing instead of list). ruff check --fix handles most of them.

@oleole39 oleole39 Nov 27, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Code is now passing ruff check with d09a86f

Note that ruff check --fix also modified few things related to timezone which are not supposed to be in the scope of this PR. I guess it does not harm?

EDIT: pylint was complaining from ruff fixes, but further force-pushed edits do not raise complaint anymore from either of the two.

Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread markdown.py Resolved
Comment thread sort.py Resolved
@oleole39
oleole39 requested a review from jmeridth November 27, 2026 15:10
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.

2 participants