pybind / pybind/pybind11

[FR]: Integrated ctest and other project improvements

Open
#5,095 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
C++
Stars
18k
Forks
2.3k
Avg merge
5d 17h
Merged PRs (30d)
10

Description

Problem description

When trying to work on https://github.com/pybind/pybind11/pull/5094, I have encountered a few issues:

  • The project does not use ctest. This makes it quite hard for packagers to find and run tests. In principle it should use ctest --build-and-test to test native CMake projects. For some inspiration, here is a template I have.
  • Building and testing from sdist is not possible, i.e.: python3 -m build + pytest
  • Usage of custom Find<Package>.cmake when there are upstream packaging available with good CMake support: catch, eigen3
  • In general, the CMake project can be improved among a few things: inverting the version detection to be defined in CMake, making the CMakeLists.txt files more readable

I am using the ci.yaml to fill in the gaps about how to the testing, but it would be much appreciated if the project can use standardized tools.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the project CMakeLists.txt files and ci.yaml to understand the current build and test paths. Try the reported python3 -m build plus pytest workflow and inspect how CTest could cover the native project. Done would require a decided scope covering standardized testing and the selected CMake or packaging improvements.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, python
Domain
build-system, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.