Johnfreeman/issue66 standardization v2#71
Conversation
… src/druncschema and removing version specifications from pyproject.toml
…enerate_protos.py
… python_not_for_dunedaq/druncschema to src/druncschema
… out of the Python-package part of druncschema, as this is meant to be used as a developer tool in a work area
…a daq-cmake-installed script
…in practice means add pytest coverage and add the refactoring suggestions section of Ruff
|
Also worth noting: yesterday a test build was made with this branch ( |
I like this, this is a very good idea that I have added to the previous standardization document, which I am maintaining as a reference point |
|
Pawel's given the go-ahead in the CCM meeting, so I'll now merge. |
Description
Addresses issue #66
This PR addresses standardizes the structure of this package as a
pip install-able Python package (DUNE-DAQ/daq-deliverables#191) as well as ensures that any standard tooling which wasn't yet in place has been added (DUNE-DAQ/daq-deliverables#192).Compared to other Python package standardizations, this was a bit more complex than usual since
druncschemaserves as both apip install-able Python package AND adbt-buildable C++ package (CMakeLists.txt,dummy.cpp). I'll break down the major changes here.python_not_for_dunedaq/druncschemaand intosrc/druncschemapyproject.toml- e.g., versions of dependencies have been removed as they're centralized indaq-release; furthermore the version of the package itself is now defined inpyproject.tomlrather than being put in an__init__.pyfilepytestcoverage calculation; also added theR(refactor) Ruff checkssrc/druncschema/apps/__main_generate_protos__. pycode is no longer treated as apip installed application. This is because it's meant to be run in a development context with theschema/druncschema/*.protofiles available (e.g., you can't run it if youdbt-setup-release). Now it's simply a script which is made available viadbt-build. Notice also the name change; it's justgenerate_protos.py.Type of change
Key checklist
python -m pytest)pre-commit run --all-files)There are no tests to pass/fail, and while I get a warning for a missing docstring in
src/druncschema/__init__.pyI'm not sure what to put there.Further checks
(Indicate issue here: # (issue))
It would be a good idea for someone to add tests here; also, I didn't look at the code itself since this PR tackles package standardization.