Skip to content

Conversation

@skshetry
Copy link
Collaborator

@skshetry skshetry commented Jan 16, 2022

How to test:

The plugins directory contains a reference dvc hello subcommand.

  1. check out this PR, and chdir to root of the repo.
  2. pip install -e "." if required.
  3. Invoke dvc as:
 dvc --plugins plugins [hello]

You can add more files to this directory while testing, or in a new separate directory. The only thing that you need to implement in the file is register_command() as done in hello.py.

If you want to test out with a real project, you can also try by creating a simple python project. Here's a simple script to run previous hello example as a package:

mkdir dvc-hello
cp plugins/hello.py dvc-hello
pushd dvc-hello
cat << EOF > setup.py
from setuptools import setup
setup(name="dvc-hello", entry_points={"dvc": ["hello = hello"]}, py_modules=["hello"])
EOF
pip install -e "."
popd
dvc --help
dvc hello

@skshetry skshetry force-pushed the pluggy-custom-commands branch 3 times, most recently from 1a7024a to 3940b94 Compare January 16, 2022 14:37
@skshetry skshetry mentioned this pull request Jan 19, 2022
2 tasks
@skshetry skshetry force-pushed the pluggy-custom-commands branch from 3940b94 to c32e381 Compare January 19, 2022 14:10
@skshetry skshetry closed this Jan 20, 2022
@skshetry skshetry deleted the pluggy-custom-commands branch January 21, 2022 05:17
@skshetry skshetry restored the pluggy-custom-commands branch April 27, 2022 03:55
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 this pull request may close these issues.

1 participant