Commit Graph

67 Commits

Author SHA1 Message Date
Ellwood Zwovic
956b72b684 Add pytest .cache dirs to gitignore 2017-07-14 16:13:30 -07:00
Ellwood Zwovic
35a108ac4b Remove old code 2017-07-14 16:12:35 -07:00
Ellwood Zwovic
fe7d38252d Add baseurl option to make_repo and actually set package urls
Also actually use said URL when calling 'install' operator
2017-07-14 00:56:34 -07:00
Ellwood Zwovic
bbaa928c2b Basic filtering for package browser 2017-07-14 00:23:26 -07:00
Ellwood Zwovic
745331a927 Sort packagelist 2017-07-13 22:32:51 -07:00
Ellwood Zwovic
29e2db8952 Basic package browsing UI 2017-07-13 22:32:21 -07:00
Ellwood Zwovic
2e45bf637a Send repolist to blender and list contents 2017-07-13 19:06:31 -07:00
Ellwood Zwovic
67b1857e58 Repository downloading 2017-07-13 16:33:14 -07:00
Ellwood Zwovic
058b5a802f Address comments on previous commit 2017-07-13 11:16:31 -07:00
Ellwood Zwovic
915c38c326 Make install procedure overwrite existing addons
However, back them up first and restore them if anything goes wrong
2017-07-12 20:07:20 -07:00
Ellwood Zwovic
4df177e397 Only check root files for conflicts 2017-07-12 15:03:12 -07:00
Ellwood Zwovic
7d7be711d3 Basic install function 2017-07-11 22:47:39 -07:00
Ellwood Zwovic
f411c68115 Some stuff from old exception-based error handling approach 2017-07-09 18:59:36 -07:00
Ellwood Zwovic
d4a01350fd Merge branch 'master' of git.blender.org:blender-package-manager-addon 2017-07-09 17:31:36 -07:00
337a5f352c Added bpkg_manager package that can download packages in a subprocess
Also contains a SubprocMixin mix-in class that can help to write
operators that run & monitor subprocesses.

Messages sent back & forth between Blender and the subprocess MUST subclass
either BlenderMessage or SubprocMessage.
2017-07-10 01:44:54 +02:00
Ellwood Zwovic
24b1a19409 Also raise exception on child process, to get a traceback for debugging
I initially thought I could pass the traceback with the exception, but
it seems transmitting exceptions around with their tracebacks intact is
not so easy. There's a library which does this:

https://github.com/ionelmc/python-tblib

But this doesn't seem important enough to introduce a dependency..
2017-07-09 15:10:13 -07:00
gandalf3
a4a1f69cd1 Note reasoning behind call order 2017-07-09 14:59:08 -07:00
gandalf3
32f0d9fdb6 Add docstrings 2017-07-09 14:49:34 -07:00
gandalf3
8cc606b263 Add decorator for handing child-process side of pipe 2017-07-09 14:40:56 -07:00
gandalf3
1188f91b7b Subprocess management: use a decorator
Use a decorator instead of a mixin to handle subprocess spawning and
monitoring
2017-07-08 17:54:45 -07:00
gandalf3
fcf90a0e75 Split addon code up by purpose 2017-07-07 17:56:49 -07:00
gandalf3
bbc1c8b3bf Rename "blenderpack" module to "bpackage"
Also split code into files by class
2017-07-06 22:58:17 -07:00
gandalf3
bc6f5bcdd4 Move blenderpack into own package 2017-07-06 22:22:58 -07:00
gandalf3
6db5a2d190 Update tests for previous commit 2017-07-06 22:12:43 -07:00
gandalf3
0f96cd4852 Add Repository and Package classes 2017-07-06 22:11:43 -07:00
gandalf3
b144e6a025 Remove unneccesary bulk of code in addons used for testing 2017-07-06 00:00:43 -07:00
gandalf3
f20264c963 Cleanup: Changes suggested by @sybren 2017-07-05 18:40:32 -07:00
gandalf3
1cefb4eab6 First test for conditional requests
Involves lots of mocking. Part of the issue is that there is no way (?) to
know where repo.json is stored when blender isn't running the show.
2017-07-05 02:45:30 -07:00
gandalf3
3847cc877f Improve make_repo.py
This cleans up make_repo.py a bit, using file extensions to determine
file type.

This also loosens the testing repo generation, as the existing
test required matching a predifed expected output which had to be
updated on every change (essentially making it a moot test, as the
reference output was obtained from the functions output).
The new test just checks if the output has the same number of packages
as the input dir has addons.

Tips on how best to test these sorts of "higher level" functions (if at
all) would be welcome :)
2017-07-04 23:56:19 -07:00
gandalf3
12533268fc Remove old commented code 2017-07-04 03:06:34 -07:00
gandalf3
7ce5bd2010 Add UIlist for repositories (and make reloadable) 2017-07-04 02:11:03 -07:00
gandalf3
e509559c22 Terminology: Update -> Upgrade, Fetch -> Refresh 2017-07-02 18:47:15 -07:00
gandalf3
5ad139ac13 Quick hack to handle case of non-text, non-python files 2017-07-02 18:39:58 -07:00
gandalf3
9f0ff11421 Get all tests for make_repo.py passing 2017-07-02 16:55:17 -07:00
gandalf3
8baacc366b Split repo generation functionality out of blenderpack.py
Moved repo.json generation to make_repo.py
Package/addon parsing is getting a bit messy, this can be
cleaned up when we have a clearer idea of what a package is.

For now just make it work.
2017-07-02 15:15:48 -07:00
gandalf3
6a538a4264 Repo generation: add more testcases 2017-06-30 20:10:33 -07:00
gandalf3
354523f26b Write repo.json to current working directory 2017-06-30 15:08:07 -07:00
gandalf3
89ca306299 Cleanup: Remove commented code, use logging 2017-06-29 21:44:18 -07:00
gandalf3
1418c45a8a GUI: demonstrate that blender has recieved results of the request 2017-06-29 21:11:43 -07:00
gandalf3
0b506d8759 Save repo.json after we've downloaded it 2017-06-29 19:55:35 -07:00
gandalf3
9dfd58671e Asynchronous IPC: Initial implementation
This commit adds a mixin which sets up a modal operator which:
* Starts a subprocess
* Polls for messages from that subprocesses
2017-06-29 18:16:44 -07:00
gandalf3
2268925733 Testing: use try/finally to ensure repo.json is always cleaned up 2017-06-29 02:18:52 -07:00
gandalf3
5a0aba8a56 Cleanup: take advantage of pathlib
* Use / syntax for concating pathlib paths in tests
* Use .name for getting last component of pathlib path
2017-06-29 02:11:43 -07:00
gandalf3
172353bbbb A bit of documentation 2017-06-29 01:11:12 -07:00
2debd7fa98 Add test runner script 2017-06-23 20:05:55 -07:00
4b7feeebb1 Switch to pathlib 2017-06-23 20:05:10 -07:00
8d8c3b84fd Repo generation: log and keep going on error
* Delete old report() functions, use logging instead
* Skip addons which have problems (but give a warning)
2017-06-23 19:10:26 -07:00
d06af2fed0 Clean up tests
No need to test on complete addons.
This commit adds a few test cases and some automated test
generation.
2017-06-23 18:53:07 -07:00
1ff2b055a6 Make 'version' required 2017-06-23 13:23:11 -07:00
5a9a3db016 Initial implementation of repo generation tool 2017-06-22 20:04:15 -07:00