PyThermostat: Add entry points to runnable scripts #149
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "atse/thermostat:pytec-entry-points"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For easier access to the runnable Python scripts for the Thermostat.
autotune
andplot
as entry points 54296c88b4Note: In
plot.py
, a main function didn't exist, so I've simply moved the script contents into one.@ -9,4 +9,11 @@ setup(
license="GPLv3",
install_requires=["setuptools"],
packages=find_packages(),
entry_points={
Maybe silly question, but how can I reproduce it and what result is expected?
You can do
pip install pytec/
, and the entry points would be available in the shell as commands.@ -12,0 +12,4 @@
entry_points={
"gui_scripts": [
"autotune = autotune:main",
"plot = plot:main",
This just creates "autotune" and "plot" Unix commands when installed. Not specific enough and may easily conflict with other programs, you should e.g. add some prefix.
Added the "thermostat_" prefix to the entry points in the force-push to
1fc5f7d5ae
.54296c88b4
to1fc5f7d5ae
@ -12,0 +15,4 @@
"thermostat_plot = plot:main",
]
},
py_modules=["autotune", "plot"],
Isn't there a similar problem here, creating Python modules with nonspecific names "autotune" and "plot"?
Shoudln't they just all be under a "pytec" module?
Also calling it "pytec" is a misnomer, everything else is named around "thermostat" and additionally the device can be used with resistive heaters instead of TECs.
Ok, I'll file them further in the directory tree.
Yes! I was wondering why this naming was like this in the first place. What's worse is that it looks like two completely unrelated
pytec
packages coexist already too, with one of them being on PyPI...I moved the scripts one-level in with #155, and renamed Pytec to PyThermostat in #156.
Those non-specific Python modules are now under the PyThermostat module with #155.
1fc5f7d5ae
toee094241bb
pytec: Set `autotune` and `plot` as entry pointsto PyThermostat: Add entry points to runnable scripts@ -12,0 +18,4 @@
"thermostat_test = test:main",
]
},
py_modules=["autotune", "plot", "test"],
Looks suspicious to me that ARTIQ also has several entry points but does not use
py_modules
and the entry points are prefixed withartiq.
.Fixed, no need for
py_modules
now but depends on #155.ee094241bb
to36d80ebdff