mirror of
https://github.com/gsi-upm/senpy
synced 2025-09-17 12:02:21 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b48730137d | ||
|
f1ec057b16 | ||
|
f6ca82cac8 | ||
|
318acd5a71 | ||
|
c8f6f5613d |
@@ -31,29 +31,19 @@ test-2.7:
|
||||
variables:
|
||||
PYTHON_VERSION: "2.7"
|
||||
|
||||
.image: &image_definition
|
||||
push:
|
||||
stage: push
|
||||
script:
|
||||
- make -e push-$PYTHON_VERSION
|
||||
- make -e push
|
||||
only:
|
||||
- tags
|
||||
- triggers
|
||||
- fix-makefiles
|
||||
|
||||
push-3.5:
|
||||
<<: *image_definition
|
||||
variables:
|
||||
PYTHON_VERSION: "3.5"
|
||||
|
||||
push-2.7:
|
||||
<<: *image_definition
|
||||
variables:
|
||||
PYTHON_VERSION: "2.7"
|
||||
|
||||
push-latest:
|
||||
<<: *image_definition
|
||||
variables:
|
||||
PYTHON_VERSION: latest
|
||||
stage: push
|
||||
script:
|
||||
- make -e push-latest
|
||||
only:
|
||||
- master
|
||||
- triggers
|
||||
|
@@ -22,7 +22,4 @@ else
|
||||
rm $(KEY_FILE)
|
||||
endif
|
||||
|
||||
push:: git-push
|
||||
pull:: git-pull
|
||||
|
||||
.PHONY:: commit tag push git-push git-pull push-github
|
||||
.PHONY:: commit tag git-push git-pull push-github
|
||||
|
@@ -1,17 +1,15 @@
|
||||
makefiles-remote:
|
||||
@git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git 2>/dev/null || true
|
||||
git ls-remote --exit-code makefiles 2> /dev/null || git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git
|
||||
|
||||
makefiles-commit: makefiles-remote
|
||||
git add -f .makefiles
|
||||
git commit -em "Updated makefiles from ${NAME}"
|
||||
|
||||
makefiles-push:
|
||||
git fetch makefiles $(NAME)
|
||||
git subtree push --prefix=.makefiles/ makefiles $(NAME)
|
||||
|
||||
makefiles-pull: makefiles-remote
|
||||
git subtree pull --prefix=.makefiles/ makefiles master --squash
|
||||
|
||||
pull:: makefiles-pull
|
||||
push:: makefiles-push
|
||||
|
||||
.PHONY:: makefiles-remote makefiles-commit makefiles-push makefiles-pull pull push
|
||||
.PHONY:: makefiles-remote makefiles-commit makefiles-push makefiles-pull
|
||||
|
@@ -175,8 +175,8 @@ def parse_params(indict, *specs):
|
||||
parameters=outdict,
|
||||
errors=wrong_params)
|
||||
raise message
|
||||
if 'algorithm' in outdict and not isinstance(outdict['algorithm'], list):
|
||||
outdict['algorithm'] = list(outdict['algorithm'].split(','))
|
||||
if 'algorithm' in outdict and not isinstance(outdict['algorithm'], tuple):
|
||||
outdict['algorithm'] = tuple(outdict['algorithm'].split(','))
|
||||
return outdict
|
||||
|
||||
|
||||
|
@@ -196,7 +196,7 @@ def api_root(plugin):
|
||||
if plugin:
|
||||
plugin = plugin.replace('+', '/')
|
||||
plugin = plugin.split('/')
|
||||
req.parameters['algorithm'] = plugin
|
||||
req.parameters['algorithm'] = tuple(plugin)
|
||||
return current_app.senpy.analyse(req)
|
||||
|
||||
|
||||
|
@@ -74,6 +74,7 @@ class BlueprintsTest(TestCase):
|
||||
The results for a POST request should be the same as for a GET request.
|
||||
"""
|
||||
resp = self.client.post("/api/", data={'i': 'My aloha mohame',
|
||||
'algorithm': 'rand',
|
||||
'with_parameters': True})
|
||||
self.assertCode(resp, 200)
|
||||
js = parse_resp(resp)
|
||||
|
Reference in New Issue
Block a user