Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Make use of the general config section and split the parsers + test coverage #10

Merged
merged 3 commits into from
Aug 13, 2020

Conversation

tumido
Copy link
Member

@tumido tumido commented Aug 7, 2020

Related Issues and Dependencies

#1

This introduces a breaking change

  • Yes
  • No

This Pull Request implements

Instead of one single parser, split it into 2 more distinct parsers:

  1. For all the S3 related sections ( source_* and destination_*s )
  2. For the general section solgate, that is now utilized for timedelta (will be used by the notification service as well)

Adding test coverage for all the config parsings.

@sesheta
Copy link
Contributor

sesheta commented Aug 7, 2020

Pre-Commit Test failed! Click here
[INFO] Initializing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8:pep8-naming.
[INFO] Installing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Tabs remover.............................................................Passed
Trim Trailing Whitespace.................................................Passed
Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Tests should end in _test.py.............................................Passed
Check for added large files..............................................Passed
Check for byte-order marker..............................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Check JSON...............................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Detect Private Key.......................................................Passed
Check python ast.........................................................Passed
Debug Statements (Python)................................................Passed
pydocstyle...............................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

solgate/utils/io.py:113: error: Name 're.Pattern' is not defined
solgate/utils/io.py:120: error: Argument 1 to "lru_cache" has incompatible type "Callable[[str], Any]"; expected "Optional[int]"
solgate/utils/io.py:179: error: Need type annotation for 'parser'
solgate/utils/io.py:179: error: Argument 1 to "_create_parser" has incompatible type "str"; expected "Callable[..., <nothing>]"
solgate/utils/io.py:181: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:183: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:189: error: "_lru_cache_wrapper[Any]" has no attribute "attributes"
Found 7 errors in 1 file (checked 10 source files)

black....................................................................Passed
flake8...................................................................Passed

@sesheta
Copy link
Contributor

sesheta commented Aug 7, 2020

Pytest Test failed! Click here
/opt/app-root/lib/python3.6/site-packages/setuptools/dist.py:398: UserWarning: Normalizing '2.0.0-alpha' to '2.0.0a0'
  normalized_version,
running test
running egg_info
creating solgate.egg-info
writing solgate.egg-info/PKG-INFO
writing dependency_links to solgate.egg-info/dependency_links.txt
writing entry points to solgate.egg-info/entry_points.txt
writing requirements to solgate.egg-info/requires.txt
writing top-level names to solgate.egg-info/top_level.txt
writing manifest file 'solgate.egg-info/SOURCES.txt'
reading manifest file 'solgate.egg-info/SOURCES.txt'
writing manifest file 'solgate.egg-info/SOURCES.txt'
running build_ext
solgate (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: solgate (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: solgate
Traceback (most recent call last):
  File "/usr/lib64/python3.6/unittest/loader.py", line 462, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib64/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/workspace/repo/solgate/__init__.py", line 5, in <module>
    from .lookup import lookup
  File "/workspace/repo/solgate/lookup.py", line 7, in <module>
    from .utils import S3FileSystem, logger, read_general_config
  File "/workspace/repo/solgate/utils/__init__.py", line 5, in <module>
    from .io import key_formatter, read_general_config, serialize
  File "/workspace/repo/solgate/utils/io.py", line 6, in <module>
    from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'


----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>

@sesheta
Copy link
Contributor

sesheta commented Aug 10, 2020

Pytest Test failed! Click here
/opt/app-root/lib/python3.6/site-packages/setuptools/dist.py:398: UserWarning: Normalizing '2.0.0-alpha' to '2.0.0a0'
  normalized_version,
running test
running egg_info
creating solgate.egg-info
writing solgate.egg-info/PKG-INFO
writing dependency_links to solgate.egg-info/dependency_links.txt
writing entry points to solgate.egg-info/entry_points.txt
writing requirements to solgate.egg-info/requires.txt
writing top-level names to solgate.egg-info/top_level.txt
writing manifest file 'solgate.egg-info/SOURCES.txt'
reading manifest file 'solgate.egg-info/SOURCES.txt'
writing manifest file 'solgate.egg-info/SOURCES.txt'
running build_ext
solgate (unittest.loader._FailedTest) ... ERROR
io_test (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: solgate (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: solgate
Traceback (most recent call last):
  File "/usr/lib64/python3.6/unittest/loader.py", line 462, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib64/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/workspace/repo/solgate/__init__.py", line 5, in <module>
    from .lookup import lookup
  File "/workspace/repo/solgate/lookup.py", line 7, in <module>
    from .utils import S3FileSystem, logger, read_general_config
  File "/workspace/repo/solgate/utils/__init__.py", line 5, in <module>
    from .io import key_formatter, read_general_config, serialize
  File "/workspace/repo/solgate/utils/io.py", line 6, in <module>
    from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'


======================================================================
ERROR: io_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: io_test
Traceback (most recent call last):
  File "/usr/lib64/python3.6/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "/workspace/repo/tests/utils/io_test.py", line 5, in <module>
    import pytest
  File "/opt/app-root/lib/python3.6/site-packages/pytest/__init__.py", line 7, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/assertion/__init__.py", line 10, in <module>
    from _pytest.assertion import rewrite
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 30, in <module>
    from _pytest.assertion import util
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/assertion/util.py", line 14, in <module>
    import _pytest._code
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/_code/__init__.py", line 2, in <module>
    from .code import Code
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/_code/code.py", line 29, in <module>
    import pluggy
  File "/opt/app-root/lib/python3.6/site-packages/pluggy/__init__.py", line 16, in <module>
    from .manager import PluginManager, PluginValidationError
  File "/opt/app-root/lib/python3.6/site-packages/pluggy/manager.py", line 11, in <module>
    import importlib_metadata
ModuleNotFoundError: No module named 'importlib_metadata'


----------------------------------------------------------------------
Ran 2 tests in 0.000s

FAILED (errors=2)
Test failed: <unittest.runner.TextTestResult run=2 errors=2 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=2 errors=2 failures=0>

@sesheta
Copy link
Contributor

sesheta commented Aug 10, 2020

Pre-Commit Test failed! Click here
[INFO] Initializing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8:pep8-naming.
[INFO] Installing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Tabs remover.............................................................Passed
Trim Trailing Whitespace.................................................Passed
Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Tests should end in _test.py.............................................Passed
Check for added large files..............................................Passed
Check for byte-order marker..............................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Check JSON...............................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Detect Private Key.......................................................Passed
Check python ast.........................................................Passed
Debug Statements (Python)................................................Passed
pydocstyle...............................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

solgate/utils/io.py:113: error: Name 're.Pattern' is not defined
solgate/utils/io.py:120: error: Argument 1 to "lru_cache" has incompatible type "Callable[[str], Any]"; expected "Optional[int]"
solgate/utils/io.py:182: error: Need type annotation for 'parser'
solgate/utils/io.py:182: error: Argument 1 to "_create_parser" has incompatible type "str"; expected "Callable[..., <nothing>]"
solgate/utils/io.py:184: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:186: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:192: error: "_lru_cache_wrapper[Any]" has no attribute "attributes"
Found 7 errors in 1 file (checked 10 source files)

black....................................................................Passed
flake8...................................................................Passed

@sesheta
Copy link
Contributor

sesheta commented Aug 10, 2020

Pytest Test failed! Click here
/opt/app-root/lib/python3.6/site-packages/setuptools/dist.py:398: UserWarning: Normalizing '2.0.0-alpha' to '2.0.0a0'
  normalized_version,
running test
running egg_info
creating solgate.egg-info
writing solgate.egg-info/PKG-INFO
writing dependency_links to solgate.egg-info/dependency_links.txt
writing entry points to solgate.egg-info/entry_points.txt
writing requirements to solgate.egg-info/requires.txt
writing top-level names to solgate.egg-info/top_level.txt
writing manifest file 'solgate.egg-info/SOURCES.txt'
reading manifest file 'solgate.egg-info/SOURCES.txt'
writing manifest file 'solgate.egg-info/SOURCES.txt'
running build_ext
solgate (unittest.loader._FailedTest) ... ERROR
io_test (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: solgate (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: solgate
Traceback (most recent call last):
  File "/usr/lib64/python3.6/unittest/loader.py", line 462, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib64/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/workspace/repo/solgate/__init__.py", line 5, in <module>
    from .lookup import lookup
  File "/workspace/repo/solgate/lookup.py", line 7, in <module>
    from .utils import S3FileSystem, logger, read_general_config
  File "/workspace/repo/solgate/utils/__init__.py", line 5, in <module>
    from .io import key_formatter, read_general_config, serialize
  File "/workspace/repo/solgate/utils/io.py", line 6, in <module>
    from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'


======================================================================
ERROR: io_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: io_test
Traceback (most recent call last):
  File "/usr/lib64/python3.6/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "/workspace/repo/tests/utils/io_test.py", line 5, in <module>
    import pytest
  File "/opt/app-root/lib/python3.6/site-packages/pytest/__init__.py", line 7, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/assertion/__init__.py", line 10, in <module>
    from _pytest.assertion import rewrite
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 30, in <module>
    from _pytest.assertion import util
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/assertion/util.py", line 14, in <module>
    import _pytest._code
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/_code/__init__.py", line 2, in <module>
    from .code import Code
  File "/opt/app-root/lib/python3.6/site-packages/_pytest/_code/code.py", line 29, in <module>
    import pluggy
  File "/opt/app-root/lib/python3.6/site-packages/pluggy/__init__.py", line 16, in <module>
    from .manager import PluginManager, PluginValidationError
  File "/opt/app-root/lib/python3.6/site-packages/pluggy/manager.py", line 11, in <module>
    import importlib_metadata
ModuleNotFoundError: No module named 'importlib_metadata'


----------------------------------------------------------------------
Ran 2 tests in 0.000s

FAILED (errors=2)
Test failed: <unittest.runner.TextTestResult run=2 errors=2 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=2 errors=2 failures=0>

@sesheta
Copy link
Contributor

sesheta commented Aug 10, 2020

Pre-Commit Test failed! Click here
[INFO] Initializing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8:pep8-naming.
[INFO] Installing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Tabs remover.............................................................Passed
Trim Trailing Whitespace.................................................Passed
Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Tests should end in _test.py.............................................Passed
Check for added large files..............................................Passed
Check for byte-order marker..............................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Check JSON...............................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Detect Private Key.......................................................Passed
Check python ast.........................................................Passed
Debug Statements (Python)................................................Passed
pydocstyle...............................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

solgate/utils/io.py:113: error: Name 're.Pattern' is not defined
solgate/utils/io.py:120: error: Argument 1 to "lru_cache" has incompatible type "Callable[[str], Any]"; expected "Optional[int]"
solgate/utils/io.py:182: error: Need type annotation for 'parser'
solgate/utils/io.py:182: error: Argument 1 to "_create_parser" has incompatible type "str"; expected "Callable[..., <nothing>]"
solgate/utils/io.py:184: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:186: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:192: error: "_lru_cache_wrapper[Any]" has no attribute "attributes"
Found 7 errors in 1 file (checked 10 source files)

black....................................................................Passed
flake8...................................................................Passed

@tumido
Copy link
Member Author

tumido commented Aug 10, 2020

Unfortunately sesheta will keep complaining in this repo for a while. Locally the pre-commit passes. Ready to be reviewed.

@tumido tumido mentioned this pull request Aug 10, 2020
2 tasks
@harshad16
Copy link
Contributor

/retest

Copy link

@HumairAK HumairAK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran pipenv install --dev && pipenv run pytest . successfully, lgtm -- I'd suggest adding to the readme on how to run the tests!
🚢

@harshad16
Copy link
Contributor

harshad16 commented Aug 12, 2020

@tumido , aicoe-ci did not receive any webhooks, is the app disabled for this repo ?

@tumido
Copy link
Member Author

tumido commented Aug 12, 2020

@harshad16 no idea. Was it even set up? 🤷 When I push to the PR it gets retested but I have no idea how it works behind the scenes. You should have admin access to this repo, can you please check it is set up properly?

@tumido
Copy link
Member Author

tumido commented Aug 12, 2020

@harshad16 I'll leave this PR open for today, feel free to use if for testing the testing 👍

@harshad16
Copy link
Contributor

@harshad16 I'll leave this PR open for today, feel free to use if for testing the testing

thanks, for keeping this open. i will ping you as soon as i figure this out.

@harshad16
Copy link
Contributor

/retest

@sesheta
Copy link
Contributor

sesheta commented Aug 12, 2020

Pre-Commit Test failed! Click here
[INFO] Initializing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8:pep8-naming.
[INFO] Installing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Tabs remover.............................................................Passed
Trim Trailing Whitespace.................................................Passed
Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Tests should end in _test.py.............................................Passed
Check for added large files..............................................Passed
Check for byte-order marker..............................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Check JSON...............................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Detect Private Key.......................................................Passed
Check python ast.........................................................Passed
Debug Statements (Python)................................................Passed
pydocstyle...............................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

solgate/utils/io.py:113: error: Name 're.Pattern' is not defined
solgate/utils/io.py:120: error: Argument 1 to "lru_cache" has incompatible type "Callable[[str], Any]"; expected "Optional[int]"
solgate/utils/io.py:182: error: Need type annotation for 'parser'
solgate/utils/io.py:182: error: Argument 1 to "_create_parser" has incompatible type "str"; expected "Callable[..., <nothing>]"
solgate/utils/io.py:184: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:186: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:192: error: "_lru_cache_wrapper[Any]" has no attribute "attributes"
Found 7 errors in 1 file (checked 10 source files)

black....................................................................Passed
flake8...................................................................Passed

@harshad16
Copy link
Contributor

@harshad16 no idea. Was it even set up? When I push to the PR it gets retested but I have no idea how it works behind the scenes. You should have admin access to this repo, can you please check it is set up properly?

yes, it is correctly set up.

@tumido
Copy link
Member Author

tumido commented Aug 13, 2020

/retest

@tumido
Copy link
Member Author

tumido commented Aug 13, 2020

@harshad16 I'm merging this PR now. You can continue your triage on #13 (I'll rebase it on top of this one + master)

@sesheta
Copy link
Contributor

sesheta commented Aug 13, 2020

Pre-Commit Test failed! Click here
[INFO] Initializing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8:pep8-naming.
[INFO] Installing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Tabs remover.............................................................Passed
Trim Trailing Whitespace.................................................Passed
Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Tests should end in _test.py.............................................Passed
Check for added large files..............................................Passed
Check for byte-order marker..............................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Check JSON...............................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Detect Private Key.......................................................Passed
Check python ast.........................................................Passed
Debug Statements (Python)................................................Passed
pydocstyle...............................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

solgate/utils/io.py:113: error: Name 're.Pattern' is not defined
solgate/utils/io.py:120: error: Argument 1 to "lru_cache" has incompatible type "Callable[[str], Any]"; expected "Optional[int]"
solgate/utils/io.py:182: error: Need type annotation for 'parser'
solgate/utils/io.py:182: error: Argument 1 to "_create_parser" has incompatible type "str"; expected "Callable[..., <nothing>]"
solgate/utils/io.py:184: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:186: error: "_lru_cache_wrapper[Any]" has no attribute "pattern"
solgate/utils/io.py:192: error: "_lru_cache_wrapper[Any]" has no attribute "attributes"
Found 7 errors in 1 file (checked 10 source files)

black....................................................................Passed
flake8...................................................................Passed

@tumido tumido merged commit 7d4dec6 into aicoe-aiops:master Aug 13, 2020
@harshad16
Copy link
Contributor

@harshad16 I'm merging this PR now. You can continue your triage on #13 (I'll rebase it on top of this one + master)

Thnaks @tumido , i think i have updated aicoe-ci.
i will get the pytest based on python 38 into to aicoe-ci, hopefully today.

@tumido tumido deleted the better-config-parser branch October 19, 2020 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants