1. 04 Mar, 2022 4 commits
    • Karel Koci's avatar
      Release version 0.9.0 · 84f34719
      Karel Koci authored
      Added
      * `convert` argument for `EUci.get`. It provides a way to convert values
        to any type with custom function.
      
      Changed
      * `list` argument for `EUci.get` is now required to be set to `True` for
        lists otherwise only first value is returned. This is removal of
        auto-detection of lists. The get of list has to be now always
        explictly stated.
      * `dtype` argument for `EUci.get` can now be any type that can be
        initialized with string as a single argument (such as `int("42")`.
      * `default` argument for `EUci.get` now uses object instance `NoDefault`
        to detect that there is no default instead of presence of keyword
        argument.
      
      Removed
      * obsolete "get" methods in `EUci`
      84f34719
    • Karel Koci's avatar
      euci: remove obsolete methods · 4d960527
      Karel Koci authored
      4d960527
    • Karel Koci's avatar
      gitlab-ci: build docker image as part of CI · 7e2d9444
      Karel Koci authored
      This also completely removes Python2.
      7e2d9444
    • Karel Koci's avatar
      euci: change get method and add convert argument · fd7ebd01
      Karel Koci authored
      This is in some corner cases incompatible change.
      
      The incompatible changes here are:
      * The raised exception in case of conversion error is no longer
        ValueError but rather UciExceptionNotFound.
      * The list argument now always has to be specified to `list=True` for
        list of configs. There is no longer a mode when either tuple or value
        is returned. It is one or the other depending on list argument.
      * No default is now detected using dedicated NoDefault object instance
        instead of using presence of the argument. In most cases this affects
        nothing.
      
      The new convert argument adds an easy way to convert values to any type
      by providing lambda function that implements such conversion.
      fd7ebd01
  2. 09 Dec, 2021 1 commit
  3. 04 Dec, 2020 2 commits
  4. 20 Nov, 2020 2 commits
  5. 26 Aug, 2020 3 commits
    • Štěpán Henek's avatar
      euci: report code coverage to gitlab CI · 14f1d351
      Štěpán Henek authored
      14f1d351
    • Karel Koci's avatar
      Release version 0.8 · abb3efae
      Karel Koci authored
      Added
      * EUci support for IP address parsing
      
      Fixed
      * Use of deprecated and in Python 3.9 removed library
      abb3efae
    • Štěpán Henek's avatar
      suppress deprecation warning · ebe462fc
      Štěpán Henek authored and Karel Koci's avatar Karel Koci committed
      ```
      tests/euci_test.py::test_get_string
        /home/stepan/project/pyuci/euci/__init__.py:34: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
          return isinstance(data, collections.Iterable) and not isinstance(data, str)
      ```
      ebe462fc
  6. 15 Jul, 2020 1 commit
  7. 04 Dec, 2019 1 commit
  8. 03 Dec, 2019 1 commit
  9. 26 Nov, 2019 1 commit
  10. 06 Jun, 2019 2 commits
  11. 05 Jun, 2019 1 commit
    • Karel Koci's avatar
      euci: accept any iterable in set method · 064a057e
      Karel Koci authored
      We were checking if argument is list or tuple but that is technically
      wrong. Much better is to just check if it is iterable. Problem is that
      string is also iterable but that we can just do as an exception.
      064a057e
  12. 30 May, 2019 1 commit
  13. 29 May, 2019 6 commits
    • Karel Koci's avatar
      euci: add option to ensure that tupple is returned · 4a110faa
      Karel Koci authored
      Idea of this is that user can set to configuration file instead of list
      option but we want to make sure that even if he does that that we get
      tuple of values. This is exactly for that case. Setting list to True
      ensures that get never returns anything else then list. Where on the
      other hand setting list to False causes it to never return tuple even if
      value is lists (in which case first found list is returned).
      4a110faa
    • Karel Koci's avatar
      euci: add support for getting and settings lists · c1ddf063
      Karel Koci authored
      This fixes handling of lists in euci.
      c1ddf063
    • Karel Koci's avatar
      euci: divide obsolete methods by comment · 5134fd51
      Karel Koci authored
      5134fd51
    • Karel Koci's avatar
      euci: integrace *_default methods to get method · aa8b73ec
      Karel Koci authored
      This is much more versatile and compact syntax. You can optionally set
      default keywords argument and that gives you behavior where
      UciExceptionNotFound is never thrown out.
      This also adds tests for defaults.
      aa8b73ec
    • Karel Koci's avatar
      euci: overload default get and set methods to support types · 7ed4c4a7
      Karel Koci authored
      This drops previous get_t and set_t methods in favor of overloaded get
      and set methods.
      You can optionally add keyword argument dtype to get method to ensure
      that returned data is of specified type. For now only str, int and bool
      are supported.
      set methods now detects value argument type and behaves according to it.
      In general it just converts value to string but in case of bool it
      replaces it with defined value.
      7ed4c4a7
    • Karel Koci's avatar
      euci: implement get_t and set_t method · 4b9ab0a6
      Karel Koci authored
      These are intended to be used as smart wrappers on top of get_* and
      set_* methods. In case of get_t method you can specify type you are
      expecting like a python type (str, bool and int). In case of set_t is
      type autodetected from provided value.
      4b9ab0a6
  14. 22 May, 2019 4 commits
  15. 14 May, 2019 2 commits
  16. 01 Apr, 2019 1 commit
  17. 05 Feb, 2019 2 commits
  18. 31 Jan, 2019 3 commits
  19. 09 Jul, 2018 2 commits