micro-ROS / micro-ROS/system_modes
UserWarning: Unknown distribution option: 'tests_require'
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 45
- Fork
- 13
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
- 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!
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Iniziate da setup.py nel pacchetto launch_system_modes e riproducete l’output segnalato di colcon build e colcon test utilizzando le versioni indicate di ROS, Ubuntu, Python e setuptools. Confrontate la configurazione attuale di tests_require con la modifica segnalata a extras_require, quindi utilizzate launch_system_modes.log e la directory build per determinare se l’avviso, l’esecuzione dei test e l’output di pytest.xml sono stati risolti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- build-system, testing
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100