Code Monkey home page Code Monkey logo

labelord's People

Contributors

wilson194 avatar

Watchers

 avatar  avatar  avatar

labelord's Issues

Setup.py feedback

In READMEs and setup.py is information that license is "GNU", but actually "GNU" has more licenses: GNU GPL, GNU LGPL, GNU FDL (+ version). It might be better to tell which one (although GPL is the most known one)...

Also there is typo in author's name in setup.py...

CLI not usable/importable because of web app

With v0.2 it is not possible to import cli (all tests from tests_cli ends with an error) nor use CLI anymore when default config is not available:

% python labelord.py --help
No webhook secret has been provided

It is caused because you check the configuration when initializing the module variable app. The check of configuration should be postponed (when needed or before first request and every time when reload_config is called = explicit "config is ready").

Other stuff seems to work well and this fix is just changing few calls.

Docs feedback

I give you 4.5+1 points because:

  1. you should inform about necessary installation in order to be able to build docs otherwise people can end up with sphinx-build: command not found

by the way... it is not PiPy but PyPI (Python Package Index)

Tests feedback

  1. No new version @ TestPyPI as required at the end of task assignment
  2. Why do you install it on Travis CI with requirements.txt and not with setup.py? Is it necessary?

Other seems OK to me, please fix this minor thing so I can give you 5 points.

Wrong exit codes when there is no config.cfg

See MarekSuchanek/labelord_tests#6

Running tests from MarekSuchanek/labelord_tests@c995942

$ LABELORD_SESSION_SPY=off python -m pytest -v tests/
============================================== test session starts ==============================================
platform linux -- Python 3.6.2, pytest-3.2.3, py-1.4.34, pluggy-0.4.0 -- /home/churchyard/ownCloud/Škola/171/students/__labelord_venv__/bin/python
cachedir: .cache
rootdir: /home/churchyard/ownCloud/Škola/171/students/horacj10__Wilson194/MI-PYT-DU1, inifile:
plugins: betamax-0.8.0
collected 81 items                                                                                               

...
tests/test_run_tricky.py::test_help_list_labels[True] FAILED
tests/test_run_tricky.py::test_help_list_labels[False] FAILED
tests/test_run_tricky.py::test_help_list_repos[True] FAILED
tests/test_run_tricky.py::test_help_list_repos[False] FAILED
tests/test_run_tricky.py::test_help_list_run[True] FAILED
tests/test_run_tricky.py::test_help_list_run[False] FAILED
...
tests/test_run_tricky.py::test_precedence_template_repo FAILED
...

=================================================== FAILURES ====================================================
__________________________________________ test_help_list_labels[True] __________________________________________

invoker_norec = <function invoker.<locals>.invoker_inner at 0x7f9686736d08>, isolated = True

    @pytest.mark.parametrize('isolated', [True, False])
    def test_help_list_labels(invoker_norec, isolated):
        # There must be standard click help describing options
        # and commands (you should write description for each)
        #
        # Local default config is not required (no token for help is OK)!
        #
        # It could look like this (help text may differ):
        # Usage: labelord.py list_labels [OPTIONS] REPOSITORY
        #
        # Listing labels of desired repository.
        #
        # Options:
        #   --help  Show this message and exit.
        invocation = invoker_norec('list_labels', '--help', isolated=isolated)
    
>       assert invocation.result.exit_code == 0
E       assert 3 == 0
E        +  where 3 = <Result SystemExit(3,)>.exit_code
E        +    where <Result SystemExit(3,)> = <conftest.LabelordInvocation object at 0x7f96867007f0>.result

tests/test_run_tricky.py:117: AssertionError
_________________________________________ test_help_list_labels[False] __________________________________________

invoker_norec = <function invoker.<locals>.invoker_inner at 0x7f9686736bf8>, isolated = False

    @pytest.mark.parametrize('isolated', [True, False])
    def test_help_list_labels(invoker_norec, isolated):
        # There must be standard click help describing options
        # and commands (you should write description for each)
        #
        # Local default config is not required (no token for help is OK)!
        #
        # It could look like this (help text may differ):
        # Usage: labelord.py list_labels [OPTIONS] REPOSITORY
        #
        # Listing labels of desired repository.
        #
        # Options:
        #   --help  Show this message and exit.
        invocation = invoker_norec('list_labels', '--help', isolated=isolated)
    
>       assert invocation.result.exit_code == 0
E       assert 3 == 0
E        +  where 3 = <Result SystemExit(3,)>.exit_code
E        +    where <Result SystemExit(3,)> = <conftest.LabelordInvocation object at 0x7f9686761cf8>.result

tests/test_run_tricky.py:117: AssertionError
__________________________________________ test_help_list_repos[True] ___________________________________________

invoker_norec = <function invoker.<locals>.invoker_inner at 0x7f96867097b8>, isolated = True

    @pytest.mark.parametrize('isolated', [True, False])
    def test_help_list_repos(invoker_norec, isolated):
        # There must be standard click help describing options
        # and commands (you should write description for each)
        #
        # Local default config is not required (no token for help is OK)!
        #
        # It could look like this (help text may differ):
        # Usage: labelord.py list_repos [OPTIONS]
        #
        # Listing accessible repositories.
        #
        # Options:
        #   --help Show this message and exit.
        invocation = invoker_norec('list_repos', '--help', isolated=isolated)
    
>       assert invocation.result.exit_code == 0
E       assert 3 == 0
E        +  where 3 = <Result SystemExit(3,)>.exit_code
E        +    where <Result SystemExit(3,)> = <conftest.LabelordInvocation object at 0x7f968688e1d0>.result

tests/test_run_tricky.py:137: AssertionError
__________________________________________ test_help_list_repos[False] __________________________________________

invoker_norec = <function invoker.<locals>.invoker_inner at 0x7f9686771488>, isolated = False

    @pytest.mark.parametrize('isolated', [True, False])
    def test_help_list_repos(invoker_norec, isolated):
        # There must be standard click help describing options
        # and commands (you should write description for each)
        #
        # Local default config is not required (no token for help is OK)!
        #
        # It could look like this (help text may differ):
        # Usage: labelord.py list_repos [OPTIONS]
        #
        # Listing accessible repositories.
        #
        # Options:
        #   --help Show this message and exit.
        invocation = invoker_norec('list_repos', '--help', isolated=isolated)
    
>       assert invocation.result.exit_code == 0
E       assert 3 == 0
E        +  where 3 = <Result SystemExit(3,)>.exit_code
E        +    where <Result SystemExit(3,)> = <conftest.LabelordInvocation object at 0x7f96867158d0>.result

tests/test_run_tricky.py:137: AssertionError
___________________________________________ test_help_list_run[True] ____________________________________________

invoker_norec = <function invoker.<locals>.invoker_inner at 0x7f9686794a60>, isolated = True

    @pytest.mark.parametrize('isolated', [True, False])
    def test_help_list_run(invoker_norec, isolated):
        # There must be standard click help describing options
        # and commands (you should write description for each)
        #
        # Local default config is not required (no token for help is OK)!
        #
        # It could look like this (types and help texts may differ):
        # Usage: labelord.py run [OPTIONS] <update|replace>
        #
        # Run labels processing.
        #
        # Options:
        #   -r, --template-repo TEXT  Repository which serves as labels template.
        #   -d, --dry-run             Proceed with just dry run.
        #   -v, --verbose             Really exhaustive output.
        #   -q, --quiet               No output at all.
        #   -a, --all-repos           Run for all repositories available.
        #   --help                    Show this message and exit.
        invocation = invoker_norec('run', '--help', isolated=isolated)
    
>       assert invocation.result.exit_code == 0
E       assert 3 == 0
E        +  where 3 = <Result SystemExit(3,)>.exit_code
E        +    where <Result SystemExit(3,)> = <conftest.LabelordInvocation object at 0x7f9686758048>.result

tests/test_run_tricky.py:162: AssertionError
___________________________________________ test_help_list_run[False] ___________________________________________

invoker_norec = <function invoker.<locals>.invoker_inner at 0x7f96867369d8>, isolated = False

    @pytest.mark.parametrize('isolated', [True, False])
    def test_help_list_run(invoker_norec, isolated):
        # There must be standard click help describing options
        # and commands (you should write description for each)
        #
        # Local default config is not required (no token for help is OK)!
        #
        # It could look like this (types and help texts may differ):
        # Usage: labelord.py run [OPTIONS] <update|replace>
        #
        # Run labels processing.
        #
        # Options:
        #   -r, --template-repo TEXT  Repository which serves as labels template.
        #   -d, --dry-run             Proceed with just dry run.
        #   -v, --verbose             Really exhaustive output.
        #   -q, --quiet               No output at all.
        #   -a, --all-repos           Run for all repositories available.
        #   --help                    Show this message and exit.
        invocation = invoker_norec('run', '--help', isolated=isolated)
    
>       assert invocation.result.exit_code == 0
E       assert 3 == 0
E        +  where 3 = <Result SystemExit(3,)>.exit_code
E        +    where <Result SystemExit(3,)> = <conftest.LabelordInvocation object at 0x7f96868787b8>.result

tests/test_run_tricky.py:162: AssertionError
_________________________________________ test_precedence_template_repo _________________________________________

invoker = <function invoker.<locals>.invoker_inner at 0x7f9686709a60>
utils = <conftest.Utils object at 0x7f968672f278>

    def test_precedence_template_repo(invoker, utils):
        # repo4 is empty and has higher precedence than repo3
        # in the config
        invocation = invoker('-c', utils.config('config_templaterepo'),
                             'run', 'update', '-r', 'MarekSuchanek/repo4',
                             session_expectations={
                                 'get': 3,
                                 'post': 0,
                                 'patch': 0,
                                 'delete': 0
                             })
        lines = invocation.result.output.split('\n')
    
>       assert invocation.result.exit_code == 0
E       assert 2 == 0
E        +  where 2 = <Result SystemExit(2,)>.exit_code
E        +    where <Result SystemExit(2,)> = <conftest.LabelordInvocation object at 0x7f968672fbe0>.result

tests/test_run_tricky.py:198: AssertionError
====================================== 7 failed, 74 passed in 0.76 seconds ======================================

Use v0.1.1 etc. tags if you will provide next iteration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.