micro-ROS / micro-ROS/system_modes

UserWarning: Unknown distribution option: 'tests_require'

Offen
#101 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
C++
Sterne
45
Forks
13
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie mit setup.py im Paket launch_system_modes und reproduzieren Sie die gemeldete Ausgabe von colcon build und colcon test unter Verwendung der angegebenen Versionen von ROS, Ubuntu, Python und setuptools. Vergleichen Sie die aktuelle tests_require-Konfiguration mit der gemeldeten extras_require-Änderung und verwenden Sie anschließend launch_system_modes.log und das build-Verzeichnis, um festzustellen, ob die Warnung, die Testausführung und die pytest.xml-Ausgabe behoben sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system, testing
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.