UserWarning: Unknown distribution option: 'tests_require'
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system, testing
Research direction
Start with setup.py in the launch_system_modes package and reproduce the reported colcon build and colcon test output using the stated ROS, Ubuntu, Python, and setuptools versions. Compare the current tests_require configuration with the reported extras_require change, then use launch_system_modes.log and the build directory to determine whether the warning, test execution, and pytest.xml output are resolved.
Written by the indexing model from the issue text.
Description
-
ROS Version: Humble
-
OS Version: Ubuntu22.04
-
Python Version: 3.10.12
-
setuptools Version: 75.2.0
Hello, when I build this project from source, some warnings occurred.
Hers is the output of the command colcon build:
Starting >>> launch_system_modes
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: launch_system_modes
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
---
Finished <<< launch_system_modes [1.53s]
These warnings show the tests_require option is expired. But the python is the default package with ubuntu 22.04 and setuptools is installed by pip.
And then I use colcon test to test this project, there were also some warnings.
Here is the output about the command colcon test:
Starting >>> launch_system_modes
/home/qiguanxiao/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: launch_system_modes
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
---
Finished <<< launch_system_modes [0.72s]
It seems like that there were no python testing programs to run and no result file pytest.xml was generated in build directory.
Then I tried to modify the setup.py file in package launch_system_modes and replaced the option tests_require with extras_require.
Finally it can be built and test correctly.
Here is the modified content in setpu.py file:
tests_require=['pytest'], # remove
extras_require={
'test': ['pytest'],
}, # add
But there are some format errors after running colcon test. Here is the result:
Now the python and setuptools version are updated very quickly, could you tell me if it is necessary to replace the tests_require option to adapt to the current environment.
Thanks!
- Dominant language
- C++
- Stars
- 45
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micro-ROS/system_modes
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/system_modes#99 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
micro-ROS/system_modes#98 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/system_modes#97 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/system_modes#96 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/system_modes#95 · 2 comments ·
All issues in micro-ROS/system_modes
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100