Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.33 KB

DEVELOPMENT.md

File metadata and controls

50 lines (39 loc) · 1.33 KB

Starting it in Neovim

# start refacto
refacto --port=13302
lua vim.lsp.start({name="refacto", cmd=vim.lsp.rpc.connect("127.0.0.1", 13302)})

Cross platform development

By installing make you can do the following:

$ make help
make install
 - Installs refacto.
make install-all
 - Install refacto, all development and tests dependencies.
make test
 - Runs integration tests and unit tests
make unit-test
 - Runs integration tests
make integration-tests
 - Runs unit tests
make lint
 - Lints your code (black, flake8 and mypy).
make fix
 - Autofixes imports and some formatting.

Developing on Linux

Run helping tools automatically on file change

While the make targets is an okay way to run things, I find it helpful to have my tests and linter running in separate terminal windows to get continous quick feedback.

The command ag is from The Silver Searcher program which can be found here. And the entr program can be found here.

Run unit tests on file change automatically
alias unit="ag -l | entr -c pytest --durations=0 tests/unit_tests"
Run flake8 on file change automatically
alias flakeit="ag -l | entr -c flake8 tests src"