Skip to content

Fix projects - #105

Merged
smythi93 merged 11 commits into
mainfrom
fix-projects
May 25, 2026
Merged

smythi93 merged 11 commits into
mainfrom
fix-projects

Conversation

@smythi93

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and fixes across the codebase, focusing on enhanced configurability for project builds, better environment setup handling, and minor dependency and workflow updates. The most notable changes include adding support for project-specific environment variables during setup, improving the robustness of the pyenv installation process, and updating dependencies and workflow actions for compatibility.

Project build and environment configuration:

  • Added a new setup_env attribute to the Project class in src/tests4py/projects/__init__.py, allowing each project to specify environment variables that will be set during the build/setup phase. This is now used in the build process in src/tests4py/api/default.py to update the environment before running setup commands. [1] [2] [3]
  • For the pandas project, the build process now explicitly checks for GCC 10 and raises an error if it's not available, ensuring compatibility.

Project definitions and test infrastructure:

  • Fixed and standardized test_base and source_base paths in the calculator and markup project definitions, and updated the pysnooper project to use editable installs for consistency. [1] [2] [3]
  • Enhanced the CLI in cloc.py by adding argument parsing for project and bug ID selection, making it easier to run LOC calculations for specific projects or bugs. [1] [2]

Environment and dependency management:

  • Improved the install_pyenv function in src/tests4py/environment.py to handle installation more robustly, especially on Unix-like systems, by correctly passing the installer script to the shell. The function signature was also changed to return None instead of a string. [1] [2]
  • Updated pandas project requirements: downgraded Cython and upgraded pytest for bug_1 to match tested versions. [1] [2]

Workflow and metadata updates:

  • Updated the GitHub Actions workflow to use actions/upload-artifact@v4 for artifact uploads.
  • Bumped the project version in pyproject.toml from 0.0.10 to 0.0.14.

Other:

  • Updated cloc.txt to add a new entry for youtubedl_24.

Copilot AI review requested due to automatic review settings May 25, 2026 07:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Tests4Py project definitions and build pipeline to improve per-project build/setup configurability (via setup-time environment variables), adjusts build steps for specific projects (notably pandas), and refreshes supporting metadata (LOC counts, dependency pins, workflow actions).

Changes:

  • Add setup_env to Project and apply it during the build/setup phase.
  • Adjust project definitions (paths, setup commands, LOC metadata), including pandas-specific build behavior.
  • Update various pinned dependencies and CI workflow action versions; update cloc.py CLI filtering.

Reviewed changes

Copilot reviewed 121 out of 121 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tests4py/sfl/utils.py Adjust default event list construction for SFL config generation.
src/tests4py/projects/youtubedl.py Add LOC metadata for youtubedl bug 24.
src/tests4py/projects/resources/sanic/bug_5/requirements.txt Remove bug-specific pinned requirements for sanic bug 5 (fallback to project-level requirements).
src/tests4py/projects/resources/pandas/requirements.txt Update pandas base pinned dependency versions (Cython).
src/tests4py/projects/resources/pandas/bug_1/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_2/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_3/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_4/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_5/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_6/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_7/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_8/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_9/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_10/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_11/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_12/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_13/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_14/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_15/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_16/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_17/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_18/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_19/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_20/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_21/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_22/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_23/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_24/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_25/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_26/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_27/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_28/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_29/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_30/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_31/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_32/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_33/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_34/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_35/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_36/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_37/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_38/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_39/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_40/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_41/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_42/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_43/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_44/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_45/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_46/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_47/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_48/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_49/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_50/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_51/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_52/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_53/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_54/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_55/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_56/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_57/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_58/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_59/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_60/requirements.txt Update pandas bug environment pins (Cython/pytest).
src/tests4py/projects/resources/pandas/bug_61/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_62/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_63/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_64/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_65/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_66/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_67/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_68/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_69/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_70/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_71/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_72/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_73/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_74/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_75/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_76/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_77/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_78/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_79/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_80/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_81/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_82/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_83/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_84/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_85/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_149/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_150/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_151/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_152/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_153/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_154/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_155/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_156/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_157/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_158/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_159/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_160/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_161/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_162/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_163/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_164/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_165/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_166/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_167/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_168/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/resources/pandas/bug_169/requirements.txt Update pandas bug environment pins (Cython).
src/tests4py/projects/pysnooper.py Switch pysnooper setup install to editable (pip install -e .).
src/tests4py/projects/pandas.py Change pandas setup/build steps, add setup env, refine included/excluded/test metadata, and add LOC entries.
src/tests4py/projects/markup.py Standardize source_base/test_base paths for markup project.
src/tests4py/projects/calculator.py Fix calculator test_base path (tests instead of test).
src/tests4py/projects/init.py Add setup_env to Project model and default it to an empty dict.
src/tests4py/environment.py Make install_pyenv run the downloaded script correctly via stdin; update signature/docs.
src/tests4py/api/default.py Apply setup_env during setup and add a pandas GCC 10 check during build.
pyproject.toml Bump package version.
cloc.txt Update LOC mapping data (currently reduced to a single entry).
cloc.py Add CLI argument parsing to filter LOC calculation by project and bug ID.
.github/workflows/test-tests4py.yml Update GitHub Actions artifact upload action to v4.
Comments suppressed due to low confidence (1)

src/tests4py/projects/resources/sanic/bug_5/requirements.txt:1

  • This file is removed entirely, which means sanic bug_5 will fall back to the project-level resources/sanic/requirements.txt during checkout. Since the deleted file contained a fully pinned dependency set, this changes the environment for bug_5 (potentially affecting reproducibility). If bug_5 needs specific dependency pins, keep a bug-specific requirements file or ensure the default requirements match what bug_5 expects.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tests4py/api/default.py Resolved
Comment thread cloc.txt Resolved
@smythi93
smythi93 merged commit 61d7475 into main May 25, 2026
1 of 2 checks passed
@smythi93
smythi93 deleted the fix-projects branch July 23, 2026 20:06
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