PyThermostat: Add entry points to runnable scripts #149
@ -5,6 +5,8 @@ import matplotlib.animation as animation
|
||||
from threading import Thread, Lock
|
||||
from pythermostat.client import Client
|
||||
|
||||
|
||||
def main():
|
||||
TIME_WINDOW = 300.0
|
||||
|
||||
tec = Client()
|
||||
@ -119,7 +121,7 @@ def animate(i):
|
||||
margin_y = 0.01 * (max_y - min_y)
|
||||
ax.set_ylim(min_y - margin_y, max_y + margin_y)
|
||||
|
||||
global legend
|
||||
nonlocal legend
|
||||
legend.remove()
|
||||
legend = ax.legend()
|
||||
|
||||
@ -129,3 +131,7 @@ ani = animation.FuncAnimation(
|
||||
plt.show()
|
||||
quit = True
|
||||
thread.join()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@ -9,4 +9,13 @@ setup(
|
||||
license="GPLv3",
|
||||
install_requires=["setuptools"],
|
||||
packages=find_packages(),
|
||||
entry_points={
|
||||
"gui_scripts": [
|
||||
"thermostat_plot = pythermostat.plot:main",
|
||||
],
|
||||
"console_scripts": [
|
||||
"thermostat_autotune = pythermostat.autotune:main",
|
||||
"thermostat_test = pythermostat.test:main",
|
||||
]
|
||||
},
|
||||
)
|
||||
atse marked this conversation as resolved
Outdated
|
||||
|
Loading…
Reference in New Issue
Block a user
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.