Summary:
This enables a bunch of warnings from Python, about things like
deprecated interfaces. It turns out we are using a deprecated library,
the `imp` module, so we switch to `importlib`.
Reviewers: sean
Differential Revision: https://phabricator.buildinspace.com/D208
Summary:
Ever since the switch from `test.sh` to `test.py`, we've been generating
the `.coverage` file inside `tests/`. Update `.travis.yml` to run
`coveralls` in the right place.
Also, handle the `--with-coverage` flag in a slightly more flexible way.
Test Plan:
Watch the build in my fork and make sure it looks like it's going to
work.
Reviewers: sean
Reviewed By: sean
Differential Revision: https://phabricator.buildinspace.com/D182
Summary:
Remove the third-party/ directory and no longer rely on copies of dependencies
in the repo. When needed, fetch dependencies normally. This can usually be
accomplished via `pip install -r requirements.txt` or `pip install -r
requirements-dev.txt`.
Even though `peru.yaml` is gone, `.peru/` is still in `.gitignore`, because the
tests check for untracked files and will detect `.peru/` as an error.
Test Plan: Successfully ran tests locally and via Travis CI.
Reviewers: jacko
Reviewed By: jacko
Differential Revision: https://phabricator.buildinspace.com/D145
Summary:
We have peru.sh and peru.bat, and also test.sh and test.bat. Rather than
maintaining both of those duplicates to support Windows, just
reimplement them in Python.
There's also validate-third-party.sh, but we never really use that on
Windows. We can port it in a later diff if we feel like it.
Test Plan:
Check that tests actually fail after introducing a bug. (To make sure
we're not actually testing the installed version instead of the repo
version.) Check that the linter fails after dirtying up some code. Check
that the untracked file test fails by creating a random file during
tests.
Reviewers: sean
Reviewed By: sean
Differential Revision: https://phabricator.buildinspace.com/D143
Delete runtime.py. Rewrite plugin.py to shell out to plugins instead of
running them in process, and get rid of the Plugin class. Delete the
old git and path plugins and replace them with the new exe variants. The
parser no longer needs to hold and plugin state, so turn all its methods
into toplevel functions. RemoteModule now just takes a type string
instead of a plugin object.
The idea here is to simplify the interface between peru and its plugins,
and also to make it possible to write plugins in a language other than
Python. In the new model, plugins are invoked on the command line like
this:
path/to/plugin.py COMMAND [COMMAND_ARGS] [PLUGIN_FIELD VAL]*
For example:
./peru/plugins/git_plugin.py fetch /tmp/dest url http://github.com/foo/bar
The other thing the plugin needs is the path where it should do caching,
which is given by the "PERU_PLUGIN_CACHE" environment variable.
The reason for the COMMAND argument is that we're going to want plugins
to support features beyond just fetching, particularly the "reup"
feature, where e.g. the git plugin could update the rev fields in your
git modules based on the state of some remote branch (maybe printing the
new YAML to stdout).
It's not clear how rule imports should work on local modules, especially
with a unified imports tree that should get cleaned up. Remove them for
now unless we find a clear use case for this feature.