-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move jobs to pyproject.toml using poethepoet #1161
Conversation
This reverts commit 71253fd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried a few commands, but I'm having trouble with sync-dev
on windows:
Poe => uv pip install -e '.[dev,docs]'
Using Python 3.12.0 environment at: C:\Users\drabstej\Anaconda3\envs\hawc-3.12
Audited 1 package in 4.32s
Poe => uv pip install -e client
Using Python 3.12.0 environment at: C:\Users\drabstej\Anaconda3\envs\hawc-3.12
Audited 1 package in 120ms
Poe => yarn --cwd frontend
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Scripts\poe.exe\__main__.py", line 7, in <module>
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\__init__.py", line 54, in main
result = app(cli_args=sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\app.py", line 130, in __call__
return self.run_task(task) or 0
^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\app.py", line 181, in run_task
return task.run(context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\task\base.py", line 464, in run
return self._handle_run(context, task_env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\task\sequence.py", line 145, in _handle_run
task_result = subtask.run(context=context, parent_env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\task\base.py", line 464, in run
return self._handle_run(context, task_env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\task\cmd.py", line 60, in _handle_run
return self._get_executor(context, env).execute(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\executor\base.py", line 134, in execute
return self._execute_cmd(cmd, input=input, use_exec=use_exec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\executor\base.py", line 164, in _execute_cmd
return self._exec_via_subproc(cmd, input=input, env=env, shell=shell)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\site-packages\poethepoet\executor\base.py", line 238, in _exec_via_subproc
proc = Popen(cmd, **popen_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\drabstej\Anaconda3\envs\hawc-3.12\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 193] %1 is not a valid Win32 application
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not replicate Danny's issue, and the other commands worked fine for me as well. Worth investigating his problem but LGTM otherwise.
I too couldn't recreate this issue on Windows. I re-ran everything one more time on mac and windows, and it all worked for me. I'll move forward w/ merging; let me know if this continues to fail for you and is causing issues. |
@rabstejnek re-requesting review to merge. |
This package removes the
Makefile
andmake.bat
files to run routine tasks and instead uses poethepoet which specifies tasks in pyproject.toml. In the future, its likely that we can switch to use uv and remove this additional dependency, but this switch should make that easier in the future.To call tasks, instead of running
make test
, you'd runpoe test
. The commandpoe
shows all available tasks.I also updated the github actions to use uv and poe.
I added two new tasks:
run-py
: start the django runserverrun-js
: start the npm webserverAnd removed two tasks,
make dev
,test-refresh
.This allows us to maintain a single set of tests that work on all operating systems.