Skip to content

[ci] Fix repo stats workflow script path - #122

Open
roberttidball wants to merge 2 commits into
UFund-Me:mainfrom
fxmacrodata:fix-repo-stats-script-path
Open

roberttidball wants to merge 2 commits into
UFund-Me:mainfrom
fxmacrodata:fix-repo-stats-script-path

Conversation

@roberttidball

@roberttidball roberttidball commented Oct 1, 2026 •

Copy link
Copy Markdown

Description

.github/workflows/repo-stats.yml runs python scripts/update_repo_stats.py, but the script is at .github/scripts/update_repo_stats.py. This changes the path in the workflow.

It also pins the job's two dependencies and installs them from wheels only. scripts/requirements.txt does not exist, so the job always fell through to pip install requests matplotlib with no versions, which SonarCloud flags (S8541, S8544) because it can run setup scripts and lets versions drift. requests==2.34.2 and matplotlib==3.10.7 both have Python 3.10 wheels and no open advisories.

Motivation and Context

The scheduled "Repository Statistics Update" job has failed on every run since it was added in 0b55e47, at the "Update repository statistics" step:

python: can't open file '/home/runner/work/Qbot/Qbot/scripts/update_repo_stats.py': [Errno 2] No such file or directory

Two things worth checking on your side, which a PR cannot change:

  • The step passes secrets.SECRET_TOKEN to the script. If that secret is not set, the stats API calls will be unauthenticated. The traffic endpoints need a token with push access.
  • The post-job cleanup also warns fatal: No url found for submodule path 'pyfunds/funds' in .gitmodules. It does not fail the job, but pyfunds/funds is recorded as a submodule without a matching .gitmodules entry.

How Has This Been Tested?

  • Pass the test by running: pytest Qbot/tests/test_all_pipeline.py under upper directory of /.
  • Checked that .github/scripts/update_repo_stats.py exists on main and accepts the --token, --repo and --stats-dir arguments the workflow passes. The job can be run with workflow_dispatch after merge to confirm.

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

The workflow called scripts/update_repo_stats.py, but the script lives in
.github/scripts/, so every scheduled run failed with "No such file or
directory".
@triangle959

triangle959 commented Oct 1, 2026 via email

Copy link
Copy Markdown

scripts/requirements.txt does not exist, so the job always took the
fallback branch and installed unpinned requests and matplotlib, which
allows setup scripts to run. Install pinned versions from wheels only.
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

2 participants