micro-ROS / micro-ROS/system_modes

UserWarning: Unknown distribution option: 'tests_require'

オープン
#101 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C++
スター
45
フォーク
13
PR マージ指標
30日以内にマージされた PR はありません

説明

- 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:

[launch_system_modes.log](https://github.com/user-attachments/files/21450880/launch_system_modes.log)

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!

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

launch_system_modes パッケージの setup.py から始め、指定された ROS、Ubuntu、Python、setuptools のバージョンを使用して、報告された colcon build と colcon test の出力を再現します。現在の tests_require 設定と、報告された extras_require の変更を比較し、その後 launch_system_modes.log と build ディレクトリを使用して、警告、テストの実行、および pytest.xml の出力が解決されているかどうかを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system, testing
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。