tecoholic/asdf-tutor

An asdf/mise plugin for managing Open edX Tutor versions

★ 1Forks 0ShellGitHub ↗Compare

README

asdf-tutor Build Lint

tutor plugin for the asdf version manager.

Contents

Dependencies

Install

mise

Install asdf-tutor plugin

mise plugins install https://github.com/tecoholic/asdf-tutor.git
mise plugins list
# Verify that `tutor` is listed

Installing tutor versions

# Install tutor nightly
mise install tutor@nightly

# Install the latest version
mise install tutor@latest

# Install a specific version
mise install [email protected]

# Install a specific major version
mise install tutor@17

Check installed versions

$ mise ls tutor
Tool   Version  Config Source              Requested
tutor  nightly
tutor  18.1.3   ~/.config/mise/config.toml 18

Update tutor-nightly to latest changes

mise install tutor@nightly --force

asdf

Caution

I don't use asdf and created this plugin to primarily use it with mise. The following docs are from the default README. If it doesn't work, kindly raise a PR with fixes if you can.

Plugin:

asdf plugin add tutor
# or
asdf plugin add tutor https://github.com/tecoholic/asdf-tutor.git

tutor:

# Show all installable versions
asdf list-all tutor

# Install specific version
asdf install tutor latest

# Set a version globally (on your ~/.tool-versions file)
asdf global tutor latest

# Now tutor commands are available
tutor --version

Check asdf readme for more instructions on how to install & manage versions.

Usage (mise)

Tutor version management

Depending on the project, running mise use tutor@<version> inside the project dir will create a .mise.toml file pointing to the right executable which would run from it's own virtual environment. Every time you switch to the project directory and run tutor commands, it would run the right tutor.

Tip

Unlike TVM, there is no activation or deactivation. Mise simply does it for you automatically.

2 Projects

Project Management

Managing tutor versions is only half the battle in a Open edX project. We would also need to deal with the tutor config and plugins to get the right setup for the right deployment. Make use of mise environment to automatically set those too.

cd project-dir
mise set TUTOR_ROOT=$(pwd)
# Mise would ask your approval to trust this folder
mise trust
# Now you can verify tutor's config dir
$ tutor config printroot
/you/project-dir

# Similarly tutor plugins can be isolated as well
mise set TUTOR_PLUGINS_ROOT=$(pwd)/plugins

Set Config Root

After this we should have a fully isolated environment for our projects, with no mental load. Just cd to your project dir and hack away.

Contributing

Contributions of any kind welcome! See the contributing guide.

Thanks goes to these contributors!

License

See LICENSE © Arunmozhi

Contributors

tecoholicgithub-actions[bot]dependabot[bot]

Issues