Skip to content
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

Alternative command runner to make (tasks/just/duty) #120

Open
dalito opened this issue Aug 19, 2024 · 0 comments · May be fixed by #121
Open

Alternative command runner to make (tasks/just/duty) #120

dalito opened this issue Aug 19, 2024 · 0 comments · May be fixed by #121

Comments

@dalito
Copy link
Contributor

dalito commented Aug 19, 2024

Make is problematic for Window users because it is typically not available. It is also quite challenging to write cross-platform shell commands and get escaping right. Make as a full build tool is naturally more complex than required for a simple command runner. Since we only need a command runner here, we may consider some alternatives.

I looked at

  • tasks (written in go, cross-platform, yaml-syntax for task-definitions)
  • just (written in rust, cross-platform, makefile-like syntax for task-definitions)
  • duty (written in Python, cross-platform, python-file syntax for task-definitions, similar to invoke)

For just and tasks binaries are available for all platforms and installation is straight-forward (also on Windows). duty as a Python tool can be installed by pipx. Since linkML-project-cookiecutter users are already instructed to use pipx for cruft the installation of duty as command runner is the simplest one.

The syntax of tasks and just can be learned relatively fast, but I found it clearly more time-consuming than learning to define tasks in Python for duty. In duty I already know how to deal with cross-platform compatibility and have all great Python features like f-strings or path-manipulation available. So my favorite is duty.

I wrote a duties.py file that mostly matches the current makefile. - PR to come...

What do you think in general about this? Does it help? Does it add or reduce complexity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant