j-sokol / filabel Goto Github PK
View Code? Open in Web Editor NEWTool for labeling PRs at GitHub by globs.
License: MIT License
Tool for labeling PRs at GitHub by globs.
License: MIT License
After successful installation, an error occurs with web templates (version v0.3.1
):
> raise TemplateNotFound(template)
E jinja2.exceptions.TemplateNotFound: template.html
__venv__/lib64/python3.6/site-packages/flask/templating.py:86: TemplateNotFound
Caused by no templates installed:
% ll env/lib/python3.6/site-packages/filabel_sokolja2-0.3.1.3-py3.6.egg/filabel/
total 28
-rw-rw-r--. 1 sushi sushi 3038 Nov 5 09:06 cli.py
-rw-rw-r--. 1 sushi sushi 318 Nov 5 09:06 config.py
-rw-rw-r--. 1 sushi sushi 5558 Nov 5 09:06 github.py
-rw-rw-r--. 1 sushi sushi 67 Nov 5 09:06 __init__.py
-rw-rw-r--. 1 sushi sushi 48 Nov 5 09:06 __main__.py
drwxrwxr-x. 2 sushi sushi 160 Nov 5 09:06 __pycache__/
-rw-rw-r--. 1 sushi sushi 3596 Nov 5 09:06 web.py
There are some important things uncovered by tests:
Also, you should try to avoid DeprecationWarning
. You are using parametrized session, where it is not suitable. Long "static data" in code are not nice - it should be in fixtures.
When recording my own cassettes, it will make some tests fail probably because you are using hardcoded j-sokol/mi-pyt-test-repo
...
___________________________________________________________ test_post_labels ___________________________________________________________
betamax_parametrized_session = <requests.sessions.Session object at 0x7f52f1f845f8>
def test_post_labels(betamax_parametrized_session):
"""Test whether filabel posts a label"""
github = filabel.github.GitHub(token, session=betamax_parametrized_session)
slug = 'j-sokol/mi-pyt-test-repo'
> ret = github.post_label(slug, '5', 'ddd')
test/test_internals.py:109:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <filabel.github.GitHub object at 0x7f52f1f84710>, slug = 'j-sokol/mi-pyt-test-repo', pull_request_number = '5', label = 'ddd'
def post_label(self, slug, pull_request_number, label):
response = self.session.post("{0}/repos/{1}/issues/{2}/labels".format(github_api_url, slug, pull_request_number, label), json=[label])
# print( response.status_code, response.text)
if response.status_code != 200:
> raise Exception('POSTing label failed.')
E Exception: POSTing label failed.
filabel/github.py:74: Exception
__________________________________________________________ test_delete_labels __________________________________________________________
betamax_parametrized_session = <requests.sessions.Session object at 0x7f52f1f3e898>
def test_delete_labels(betamax_parametrized_session):
"""Test whether filabel posts a label"""
github = filabel.github.GitHub(token, session=betamax_parametrized_session)
slug = 'j-sokol/mi-pyt-test-repo'
> ret = github.delete_label(slug, '5', 'ddd')
test/test_internals.py:119:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <filabel.github.GitHub object at 0x7f52f1f3e860>, slug = 'j-sokol/mi-pyt-test-repo', pull_request_number = '5', label = 'ddd'
def delete_label(self, slug, pull_request_number, label):
response = self.session.delete("{0}/repos/{1}/issues/{2}/labels/{3}".format(github_api_url, slug, pull_request_number, label))
if response.status_code != 200:
> raise Exception('DELETing label failed.')
E Exception: DELETing label failed.
filabel/github.py:66: Exception
Line 204 in 58a3a69
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.