Skip to content

Normalize recipes: quote all versions as strings and consolidate tests under tests/ directory#96

Merged
ndonkoHenri merged 2 commits into
mainfrom
normalize
Jul 3, 2026
Merged

Normalize recipes: quote all versions as strings and consolidate tests under tests/ directory#96
ndonkoHenri merged 2 commits into
mainfrom
normalize

Conversation

@ndonkoHenri

Copy link
Copy Markdown

What & why

Two repo-wide consistency fixes across all recipes:

1. package.version is always a quoted string

Every recipe's meta.yaml now declares version: as an explicit double-quoted string (e.g. version: "3.14.0"). Previously most were bare values. While YAML happened to parse today's values as strings (all had ≥2 dots), a bare single-dot value like 1.10 would silently coerce to the float 1.1. Quoting removes that foot-gun and makes the field uniform. Jinja-templated ('{{ version }}') recipes are unchanged.

Note: this is independent of the version variable used in Jinja conditionals (numpy/pandas/pillow) — that comes from the CLI --version override in package.py, not from this field, so the comparisons are unaffected.

2. Tests live in tests/ — one layout, no exceptions

Recipe tests were split across three conventions: tests/, a singular test/ dir, and loose test_<name>.py in the recipe root. All are now consolidated under recipes/<name>/tests/:

  • loose test_<name>.pytests/test_<name>.py
  • pillow/test/pillow/tests/ (carries its font/image fixtures)
  • removed two stale, never-run test.py duplicates (google-crc32c, kiwisolver)

The staging script (stage_recipe.sh) and the CI detect-tests step now look only at tests/, so the old layouts can't silently creep back — a misplaced test fails loudly instead of being skipped. Docs in tests/recipe-tester/ updated to match.

Copilot AI left a comment

Copy link
Copy Markdown

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 standardizes recipe metadata and test discovery across mobile-forge by (1) ensuring every package.version in meta.yaml is an explicitly quoted string and (2) enforcing a single recipe test layout under recipes/<name>/tests/, with CI and staging updated to only recognize that directory.

Changes:

  • Quote package.version values in many recipes/**/meta.yaml files to avoid YAML numeric coercion edge-cases.
  • Consolidate recipe tests under recipes/<name>/tests/ (including moving previously root-level test_*.py / test/ layouts and removing stale duplicates).
  • Update the recipe-tester staging script, docs, and CI “detect-tests” logic to only consider tests/.

Reviewed changes

Copilot reviewed 95 out of 161 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/build-wheels-version.yml Detects tests exclusively via recipes/<pkg>/tests/ directory presence.
tests/recipe-tester/README.md Updates recipe-tester documentation to reflect tests/-only layout.
tests/recipe-tester/main.py Updates runtime description to reflect tests/-only layout.
tests/recipe-tester/stage_recipe.sh Stages tests only from recipes/<name>/tests/ and errors otherwise.
recipes/aiohttp/meta.yaml Quotes package.version.
recipes/aiohttp/tests/test_aiohttp.py Adds aiohttp smoke tests under tests/.
recipes/argon2-cffi-bindings/meta.yaml Quotes package.version.
recipes/argon2-cffi-bindings/tests/test_argon2_cffi.py Adds argon2 bindings smoke test under tests/.
recipes/astropy/meta.yaml Quotes package.version.
recipes/astropy/tests/test_astropy.py Adds astropy smoke tests under tests/.
recipes/bcrypt/meta.yaml Quotes package.version.
recipes/bcrypt/tests/test_bcrypt.py Adds bcrypt smoke test under tests/.
recipes/bitarray/meta.yaml Quotes package.version.
recipes/bitarray/tests/test_bitarray.py Adds bitarray smoke test under tests/.
recipes/blis/meta.yaml Quotes package.version.
recipes/blis/tests/test_blis.py Adds blis smoke tests under tests/.
recipes/brotli/meta.yaml Quotes package.version.
recipes/brotli/tests/test_brotli.py Adds brotli smoke test under tests/.
recipes/cffi/meta.yaml Quotes package.version.
recipes/cffi/tests/test_cffi.py Adds cffi smoke test under tests/.
recipes/contourpy/meta.yaml Quotes package.version.
recipes/contourpy/tests/test_contourpy.py Adds contourpy smoke tests under tests/.
recipes/coolprop/meta.yaml Quotes package.version.
recipes/cryptography/meta.yaml Quotes package.version for the active branch of the conditional.
recipes/cryptography/tests/test_cryptography.py Adds cryptography smoke tests under tests/.
recipes/cymem/meta.yaml Quotes package.version.
recipes/duckdb/meta.yaml Quotes package.version.
recipes/faiss-cpu/tests/test_faiss_cpu.py Adds faiss-cpu smoke test under tests/.
recipes/fiona/meta.yaml Quotes package.version.
recipes/fiona/tests/test_fiona.py Adds fiona smoke tests under tests/.
recipes/flet-libcpp-shared/meta.yaml Quotes package.version.
recipes/flet-libcrc32c/meta.yaml Quotes package.version.
recipes/flet-libfreetype/meta.yaml Quotes package.version.
recipes/flet-libgeos/meta.yaml Quotes package.version.
recipes/flet-libjpeg/meta.yaml Quotes package.version.
recipes/flet-libomp/meta.yaml Quotes package.version.
recipes/flet-libpng/meta.yaml Quotes package.version.
recipes/flet-libpyjni/meta.yaml Quotes package.version.
recipes/flet-libyaml/meta.yaml Quotes package.version.
recipes/gdal/meta.yaml Quotes package.version.
recipes/gdal/tests/test_gdal.py Adds GDAL smoke tests under tests/.
recipes/google-crc32c/meta.yaml Quotes package.version.
recipes/google-crc32c/test.py Removes stale legacy test file at recipe root.
recipes/google-crc32c/tests/test_google_crc32c.py Adds google-crc32c smoke tests under tests/.
recipes/greenlet/meta.yaml Quotes package.version.
recipes/greenlet/tests/test_greenlet.py Adds greenlet smoke tests under tests/.
recipes/grpcio/meta.yaml Quotes package.version.
recipes/grpcio/tests/test_grpcio.py Adds grpcio smoke tests under tests/.
recipes/jiter/meta.yaml Quotes package.version.
recipes/jiter/tests/test_jiter.py Adds jiter smoke tests under tests/.
recipes/jq/meta.yaml Quotes package.version.
recipes/jq/tests/test_jq.py Adds jq smoke tests under tests/.
recipes/kiwisolver/meta.yaml Quotes package.version.
recipes/kiwisolver/test.py Removes stale legacy test file at recipe root.
recipes/kiwisolver/tests/test_kiwisolver.py Adds kiwisolver smoke tests under tests/.
recipes/lru-dict/meta.yaml Quotes package.version.
recipes/lru-dict/tests/test_lru_dict.py Adds lru-dict smoke test under tests/.
recipes/lxml/tests/test_lxml.py Adds lxml smoke test under tests/.
recipes/markupsafe/meta.yaml Quotes package.version.
recipes/markupsafe/tests/test_markupsafe.py Adds MarkupSafe smoke tests under tests/.
recipes/matplotlib/meta.yaml Quotes package.version.
recipes/matplotlib/tests/test_matplotlib.py Adds matplotlib smoke test under tests/.
recipes/msgpack/meta.yaml Quotes package.version.
recipes/msgpack/tests/test_msgpack.py Adds msgpack smoke tests under tests/.
recipes/msgspec/meta.yaml Quotes package.version.
recipes/msgspec/tests/test_msgspec.py Adds msgspec smoke tests under tests/.
recipes/murmurhash/meta.yaml Quotes package.version.
recipes/numpy/meta.yaml Quotes package.version.
recipes/numpy/tests/test_numpy.py Adds numpy smoke tests under tests/.
recipes/opaque/meta.yaml Quotes package.version.
recipes/opaque/tests/test_opaque.py Adds opaque smoke tests under tests/.
recipes/opencv-python/meta.yaml Quotes package.version.
recipes/opencv-python/tests/test_opencv_python.py Adds opencv-python smoke tests under tests/.
recipes/oracledb/meta.yaml Quotes package.version.
recipes/orjson/meta.yaml Quotes package.version.
recipes/orjson/tests/test_orjson.py Adds orjson smoke tests under tests/.
recipes/ormsgpack/meta.yaml Quotes package.version.
recipes/ormsgpack/tests/test_ormsgpack.py Adds ormsgpack smoke test under tests/.
recipes/pandas/meta.yaml Quotes package.version.
recipes/pandas/tests/test_pandas.py Adds pandas smoke test under tests/.
recipes/pendulum/meta.yaml Quotes package.version.
recipes/pendulum/tests/test_pendulum.py Adds pendulum smoke tests under tests/.
recipes/pillow/meta.yaml Quotes package.version.
recipes/pillow/tests/test_pillow.py Adds Pillow smoke tests + fixtures under tests/.
recipes/polars/meta.yaml Quotes package.version.
recipes/preshed/meta.yaml Quotes package.version.
recipes/primp/meta.yaml Quotes package.version.
recipes/protobuf/meta.yaml Quotes package.version.
recipes/protobuf/tests/test_protobuf.py Adds protobuf smoke tests under tests/.
recipes/psutil/meta.yaml Quotes package.version.
recipes/psycopg2/meta.yaml Quotes package.version.
recipes/pyarrow/meta.yaml Quotes package.version.
recipes/pycryptodome/meta.yaml Quotes package.version.
recipes/pycryptodome/tests/test_pycryptodome.py Adds pycryptodome smoke tests under tests/.
recipes/pycryptodomex/meta.yaml Quotes package.version.
recipes/pycryptodomex/tests/test_pycryptodomex.py Adds pycryptodomex smoke tests under tests/.
recipes/pydantic-core/meta.yaml Quotes package.version.
recipes/pydantic-core/tests/test_pydantic_core.py Adds pydantic-core smoke tests under tests/.
recipes/pyerfa/meta.yaml Quotes package.version.
recipes/pyerfa/tests/test_pyerfa.py Adds pyerfa smoke tests under tests/.
recipes/pyjnius/meta.yaml Quotes package.version.
recipes/pyjnius/tests/test_pyjnius.py Adds pyjnius smoke test under tests/.
recipes/pymongo/meta.yaml Quotes package.version.
recipes/pymongo/tests/test_pymongo.py Adds pymongo smoke tests under tests/.
recipes/pymssql/meta.yaml Quotes package.version.
recipes/pynacl/meta.yaml Quotes package.version.
recipes/pynacl/tests/test_pynacl.py Adds PyNaCl smoke tests under tests/.
recipes/pyobjus/meta.yaml Quotes package.version.
recipes/pyobjus/tests/test_pyobjus.py Adds pyobjus smoke test under tests/.
recipes/pyogrio/meta.yaml Quotes package.version.
recipes/pyogrio/tests/test_pyogrio.py Adds pyogrio smoke tests under tests/.
recipes/pyproj/meta.yaml Quotes package.version.
recipes/pyproj/tests/test_pyproj.py Adds pyproj smoke tests under tests/.
recipes/pysodium/meta.yaml Quotes package.version.
recipes/pysodium/tests/test_pysodium.py Adds pysodium smoke tests under tests/.
recipes/python-magic/meta.yaml Quotes package.version.
recipes/pyxirr/meta.yaml Quotes package.version.
recipes/pyxirr/tests/test_pyxirr.py Adds pyxirr smoke tests under tests/.
recipes/pyyaml/meta.yaml Quotes package.version.
recipes/pyyaml/tests/test_pyyaml.py Adds PyYAML smoke tests under tests/.
recipes/pyzmq/meta.yaml Quotes package.version.
recipes/rasterio/meta.yaml Quotes package.version.
recipes/regex/meta.yaml Quotes package.version.
recipes/regex/tests/test_regex.py Adds regex smoke tests under tests/.
recipes/rpds-py/meta.yaml Quotes package.version.
recipes/rpds-py/tests/test_rpds_py.py Adds rpds-py smoke tests under tests/.
recipes/ruamel.yaml.clib/meta.yaml Quotes package.version.
recipes/ruamel.yaml.clib/tests/test_ruamel_yaml_clib.py Adds ruamel.yaml.clib smoke test under tests/.
recipes/scikit-learn/meta.yaml Quotes package.version.
recipes/scikit-learn/tests/test_scikit_learn.py Adds scikit-learn smoke tests under tests/.
recipes/scipy/meta.yaml Quotes package.version.
recipes/scipy/tests/test_scipy.py Adds scipy smoke tests under tests/.
recipes/selectolax/meta.yaml Quotes package.version.
recipes/selectolax/tests/test_selectolax.py Adds selectolax smoke tests under tests/.
recipes/shapely/meta.yaml Quotes package.version.
recipes/shapely/tests/test_shapely.py Adds shapely smoke tests under tests/.
recipes/spacy/meta.yaml Quotes package.version.
recipes/sqlalchemy/meta.yaml Quotes package.version.
recipes/sqlalchemy/tests/test_sqlalchemy.py Adds SQLAlchemy smoke tests under tests/.
recipes/srsly/meta.yaml Quotes package.version.
recipes/thinc/meta.yaml Quotes package.version.
recipes/tiktoken/meta.yaml Quotes package.version.
recipes/tiktoken/tests/test_tiktoken.py Adds tiktoken smoke tests under tests/.
recipes/time-machine/meta.yaml Quotes package.version.
recipes/time-machine/tests/test_time_machine.py Adds time-machine smoke test under tests/.
recipes/tokenizers/meta.yaml Quotes package.version.
recipes/tornado/meta.yaml Quotes package.version.
recipes/tornado/tests/test_tornado.py Adds tornado smoke tests under tests/.
recipes/ujson/meta.yaml Quotes package.version.
recipes/ujson/tests/test_ujson.py Adds ujson smoke tests under tests/.
recipes/websockets/tests/test_websockets.py Adds websockets smoke tests under tests/.
recipes/xxhash/meta.yaml Quotes package.version.
recipes/xxhash/tests/test_xxhash.py Adds xxhash smoke tests under tests/.
recipes/yarl/meta.yaml Quotes package.version.
recipes/yarl/tests/test_yarl.py Adds yarl smoke test under tests/.
recipes/zope.interface/meta.yaml Quotes package.version.
recipes/zope.interface/tests/test_zope_interface.py Adds zope.interface smoke tests under tests/.
recipes/zstandard/meta.yaml Quotes package.version.
recipes/zstandard/tests/test_zstandard.py Adds zstandard smoke tests under tests/.

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

@ndonkoHenri ndonkoHenri merged commit 05e0a41 into main Jul 3, 2026
7 of 14 checks passed
@ndonkoHenri ndonkoHenri deleted the normalize branch July 3, 2026 13:51
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