Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AST framework and tests #653

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update AST framework and tests #653

wants to merge 3 commits into from

Conversation

aravij
Copy link
Contributor

@aravij aravij commented Oct 27, 2020

Main enchaincments:

  • Block statement graph
  • Fake AST nodes

@aravij aravij self-assigned this Oct 27, 2020
@aravij aravij linked an issue Oct 27, 2020 that may be closed by this pull request
acheshkov
acheshkov previously approved these changes Nov 3, 2020
@acheshkov
Copy link
Member

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Nov 3, 2020

@rultor merge

@acheshkov OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Nov 3, 2020

@rultor merge

@acheshkov @aravij Oops, I failed. You can see the full log here (spent 5min)

Requirement already satisfied: plotly in /home/r/.local/lib/python3.6/site-packages (from catboost==0.22->aibolit==1.2.6rc2) (4.12.0)
Requirement already satisfied: graphviz in /home/r/.local/lib/python3.6/site-packages (from catboost==0.22->aibolit==1.2.6rc2) (0.14.2)
Requirement already satisfied: requests>=2.7.9 in /home/r/.local/lib/python3.6/site-packages (from codecov==2.0.15->aibolit==1.2.6rc2) (2.24.0)
Requirement already satisfied: wrapt<2,>=1.10 in /home/r/.local/lib/python3.6/site-packages (from deprecated==1.2.10->aibolit==1.2.6rc2) (1.12.1)
Requirement already satisfied: pycodestyle<2.6.0,>=2.5.0 in /home/r/.local/lib/python3.6/site-packages (from flake8==3.7.9->aibolit==1.2.6rc2) (2.5.0)
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /home/r/.local/lib/python3.6/site-packages (from flake8==3.7.9->aibolit==1.2.6rc2) (0.6.1)
Requirement already satisfied: entrypoints<0.4.0,>=0.3.0 in /home/r/.local/lib/python3.6/site-packages (from flake8==3.7.9->aibolit==1.2.6rc2) (0.3)
Requirement already satisfied: pyflakes<2.2.0,>=2.1.0 in /home/r/.local/lib/python3.6/site-packages (from flake8==3.7.9->aibolit==1.2.6rc2) (2.1.1)
Requirement already satisfied: cycler>=0.10 in /home/r/.local/lib/python3.6/site-packages (from matplotlib==3.2.1->aibolit==1.2.6rc2) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/r/.local/lib/python3.6/site-packages (from matplotlib==3.2.1->aibolit==1.2.6rc2) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in /usr/lib/python3/dist-packages (from matplotlib==3.2.1->aibolit==1.2.6rc2) (2.6.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/r/.local/lib/python3.6/site-packages (from matplotlib==3.2.1->aibolit==1.2.6rc2) (1.3.1)
Requirement already satisfied: mypy-extensions<0.5.0,>=0.4.3 in /home/r/.local/lib/python3.6/site-packages (from mypy==0.770->aibolit==1.2.6rc2) (0.4.3)
Requirement already satisfied: typed-ast<1.5.0,>=1.4.0 in /home/r/.local/lib/python3.6/site-packages (from mypy==0.770->aibolit==1.2.6rc2) (1.4.1)
Requirement already satisfied: decorator>=4.3.0 in /home/r/.local/lib/python3.6/site-packages (from networkx==2.4->aibolit==1.2.6rc2) (4.4.2)
Requirement already satisfied: pytz>=2017.2 in /home/r/.local/lib/python3.6/site-packages (from pandas==1.0.0->aibolit==1.2.6rc2) (2020.4)
Requirement already satisfied: threadpoolctl>=2.0.0 in /home/r/.local/lib/python3.6/site-packages (from scikit-learn==0.23.2->aibolit==1.2.6rc2) (2.1.0)
Requirement already satisfied: joblib>=0.11 in /home/r/.local/lib/python3.6/site-packages (from scikit-learn==0.23.2->aibolit==1.2.6rc2) (0.17.0)
Requirement already satisfied: sphinxcontrib-qthelp in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.3)
Requirement already satisfied: Jinja2>=2.3 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (2.11.2)
Requirement already satisfied: Pygments>=2.0 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (2.7.2)
Requirement already satisfied: alabaster<0.8,>=0.7 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (0.7.12)
Requirement already satisfied: packaging in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (20.4)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (39.0.1)
Requirement already satisfied: sphinxcontrib-devhelp in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.2)
Requirement already satisfied: babel!=2.0,>=1.3 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (2.8.0)
Requirement already satisfied: sphinxcontrib-serializinghtml in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.1.4)
Requirement already satisfied: docutils>=0.12 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (0.16)
Requirement already satisfied: snowballstemmer>=1.1 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (2.0.0)
Requirement already satisfied: imagesize in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.2.0)
Requirement already satisfied: sphinxcontrib-applehelp in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.2)
Requirement already satisfied: sphinxcontrib-htmlhelp in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.3)
Requirement already satisfied: sphinxcontrib-jsmath in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.1)
Requirement already satisfied: retrying>=1.3.3 in /home/r/.local/lib/python3.6/site-packages (from plotly->catboost==0.22->aibolit==1.2.6rc2) (1.3.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.7.9->codecov==2.0.15->aibolit==1.2.6rc2) (2018.1.18)
Requirement already satisfied: idna<3,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.7.9->codecov==2.0.15->aibolit==1.2.6rc2) (2.6)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/lib/python3/dist-packages (from requests>=2.7.9->codecov==2.0.15->aibolit==1.2.6rc2) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3/dist-packages (from requests>=2.7.9->codecov==2.0.15->aibolit==1.2.6rc2) (1.22)
Requirement already satisfied: MarkupSafe>=0.23 in /home/r/.local/lib/python3.6/site-packages (from Jinja2>=2.3->sphinx==2.3.1->aibolit==1.2.6rc2) (1.1.1)
Building wheels for collected packages: aibolit
  Building wheel for aibolit (setup.py) ... \u001b[?25l-\u0008 \u0008\\u0008 \u0008|\u0008 \u0008/\u0008 \u0008-\u0008 \u0008\\u0008 \u0008done
\u001b[?25h  Created wheel for aibolit: filename=aibolit-1.2.6rc2-py2.py3-none-any.whl size=12134779 sha256=ce1be1b3b770fbbbd7a27089ce7cd4e6a2fd5305b858c681cb7a90e328a7887d
  Stored in directory: /tmp/pip-ephem-wheel-cache-54if6z3t/wheels/6a/94/20/fb6515fe78e005049099e68caee81e4e2e53c92744d4ab767f
Successfully built aibolit
Installing collected packages: aibolit
\u001b[33m  WARNING: The script aibolit is installed in '/home/r/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\u001b[0m
Successfully installed aibolit-1.2.6rc2
\u001b[33mWARNING: You are using pip version 20.0.2; however, version 20.2.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.\u001b[0m
python3 -m flake8 aibolit test scripts setup.py --exclude scripts/target/*
aibolit/ast_framework/ast_node.py:113:13: W503 line break before binary operator
aibolit/ast_framework/ast_node.py:114:13: W503 line break before binary operator
aibolit/ast_framework/ast_node.py:144:13: W503 line break before binary operator
aibolit/ast_framework/ast_node.py:145:13: W503 line break before binary operator
aibolit/ast_framework/ast_node.py:146:13: W503 line break before binary operator
Makefile:31: recipe for target 'flake8' failed
make: *** [flake8] Error 1
container daa1badfea75f61b997440f2fe8a6d66ff29f57094a912946c17a34bb72453f5 is dead
Tue Nov  3 07:56:18 CET 2020

@aravij
Copy link
Contributor Author

aravij commented Nov 3, 2020

@acheshkov, I fixed flake, please reaproove and merge one more time.

acheshkov
acheshkov previously approved these changes Nov 3, 2020
@acheshkov
Copy link
Member

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Nov 3, 2020

@rultor merge

@acheshkov OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Nov 3, 2020

@rultor merge

@acheshkov @aravij Oops, I failed. You can see the full log here (spent 5min)

Requirement already satisfied: entrypoints<0.4.0,>=0.3.0 in /home/r/.local/lib/python3.6/site-packages (from flake8==3.7.9->aibolit==1.2.6rc2) (0.3)
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /home/r/.local/lib/python3.6/site-packages (from flake8==3.7.9->aibolit==1.2.6rc2) (0.6.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/r/.local/lib/python3.6/site-packages (from matplotlib==3.2.1->aibolit==1.2.6rc2) (2.4.7)
Requirement already satisfied: cycler>=0.10 in /home/r/.local/lib/python3.6/site-packages (from matplotlib==3.2.1->aibolit==1.2.6rc2) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/r/.local/lib/python3.6/site-packages (from matplotlib==3.2.1->aibolit==1.2.6rc2) (1.3.1)
Requirement already satisfied: python-dateutil>=2.1 in /usr/lib/python3/dist-packages (from matplotlib==3.2.1->aibolit==1.2.6rc2) (2.6.1)
Requirement already satisfied: mypy-extensions<0.5.0,>=0.4.3 in /home/r/.local/lib/python3.6/site-packages (from mypy==0.770->aibolit==1.2.6rc2) (0.4.3)
Requirement already satisfied: typed-ast<1.5.0,>=1.4.0 in /home/r/.local/lib/python3.6/site-packages (from mypy==0.770->aibolit==1.2.6rc2) (1.4.1)
Requirement already satisfied: decorator>=4.3.0 in /home/r/.local/lib/python3.6/site-packages (from networkx==2.4->aibolit==1.2.6rc2) (4.4.2)
Requirement already satisfied: pytz>=2017.2 in /home/r/.local/lib/python3.6/site-packages (from pandas==1.0.0->aibolit==1.2.6rc2) (2020.4)
Requirement already satisfied: joblib>=0.11 in /home/r/.local/lib/python3.6/site-packages (from scikit-learn==0.23.2->aibolit==1.2.6rc2) (0.17.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /home/r/.local/lib/python3.6/site-packages (from scikit-learn==0.23.2->aibolit==1.2.6rc2) (2.1.0)
Requirement already satisfied: imagesize in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.2.0)
Requirement already satisfied: babel!=2.0,>=1.3 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (2.8.0)
Requirement already satisfied: docutils>=0.12 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (0.16)
Requirement already satisfied: sphinxcontrib-qthelp in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.3)
Requirement already satisfied: sphinxcontrib-jsmath in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.1)
Requirement already satisfied: sphinxcontrib-serializinghtml in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.1.4)
Requirement already satisfied: Jinja2>=2.3 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (2.11.2)
Requirement already satisfied: sphinxcontrib-htmlhelp in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.3)
Requirement already satisfied: sphinxcontrib-applehelp in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.2)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (39.0.1)
Requirement already satisfied: alabaster<0.8,>=0.7 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (0.7.12)
Requirement already satisfied: Pygments>=2.0 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (2.7.2)
Requirement already satisfied: packaging in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (20.4)
Requirement already satisfied: snowballstemmer>=1.1 in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (2.0.0)
Requirement already satisfied: sphinxcontrib-devhelp in /home/r/.local/lib/python3.6/site-packages (from sphinx==2.3.1->aibolit==1.2.6rc2) (1.0.2)
Requirement already satisfied: retrying>=1.3.3 in /home/r/.local/lib/python3.6/site-packages (from plotly->catboost==0.22->aibolit==1.2.6rc2) (1.3.3)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/lib/python3/dist-packages (from requests>=2.7.9->codecov==2.0.15->aibolit==1.2.6rc2) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.7.9->codecov==2.0.15->aibolit==1.2.6rc2) (2018.1.18)
Requirement already satisfied: idna<3,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.7.9->codecov==2.0.15->aibolit==1.2.6rc2) (2.6)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3/dist-packages (from requests>=2.7.9->codecov==2.0.15->aibolit==1.2.6rc2) (1.22)
Requirement already satisfied: MarkupSafe>=0.23 in /home/r/.local/lib/python3.6/site-packages (from Jinja2>=2.3->sphinx==2.3.1->aibolit==1.2.6rc2) (1.1.1)
Building wheels for collected packages: aibolit
  Building wheel for aibolit (setup.py) ... \u001b[?25l-\u0008 \u0008\\u0008 \u0008|\u0008 \u0008/\u0008 \u0008-\u0008 \u0008\\u0008 \u0008done
\u001b[?25h  Created wheel for aibolit: filename=aibolit-1.2.6rc2-py2.py3-none-any.whl size=12134778 sha256=62b06f6e01ee253c9a1cebcc3d36f3c423642db951c3a4261201d8f3272eea58
  Stored in directory: /tmp/pip-ephem-wheel-cache-zwz_mjnc/wheels/6a/94/20/fb6515fe78e005049099e68caee81e4e2e53c92744d4ab767f
Successfully built aibolit
Installing collected packages: aibolit
\u001b[33m  WARNING: The script aibolit is installed in '/home/r/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\u001b[0m
Successfully installed aibolit-1.2.6rc2
\u001b[33mWARNING: You are using pip version 20.0.2; however, version 20.2.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.\u001b[0m
python3 -m flake8 aibolit test scripts setup.py --exclude scripts/target/*
python3 -m mypy aibolit
aibolit/ast_framework/block_statement_graph/statement.py:1: \u001b[1m\u001b[31merror:\u001b(B\u001b[m Skipping analyzing 'networkx': found module but no type hints or library stubs\u001b(B\u001b[m
aibolit/ast_framework/block_statement_graph/statement.py:4: \u001b[1m\u001b[31merror:\u001b(B\u001b[m Cannot find implementation or library stub for module named 'veniq.ast_framework'\u001b(B\u001b[m
aibolit/ast_framework/block_statement_graph/block.py:1: \u001b[1m\u001b[31merror:\u001b(B\u001b[m Skipping analyzing 'networkx': found module but no type hints or library stubs\u001b(B\u001b[m
aibolit/ast_framework/block_statement_graph/block.py:4: \u001b[1m\u001b[31merror:\u001b(B\u001b[m Cannot find implementation or library stub for module named 'veniq.ast_framework'\u001b(B\u001b[m
aibolit/ast_framework/block_statement_graph/_nodes_factory.py:2: \u001b[1m\u001b[31merror:\u001b(B\u001b[m Skipping analyzing 'networkx': found module but no type hints or library stubs\u001b(B\u001b[m
aibolit/ast_framework/block_statement_graph/_block_extractors.py:3: \u001b[1m\u001b[31merror:\u001b(B\u001b[m Cannot find implementation or library stub for module named 'veniq.ast_framework'\u001b(B\u001b[m
aibolit/ast_framework/block_statement_graph/_block_extractors.py:3: \u001b[34mnote:\u001b(B\u001b[m See \u001b[4mhttps://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports\u001b(B\u001b[m
aibolit/ast_framework/block_statement_graph/builder.py:2: \u001b[1m\u001b[31merror:\u001b(B\u001b[m Skipping analyzing 'networkx': found module but no type hints or library stubs\u001b(B\u001b[m
aibolit/ast_framework/block_statement_graph/builder.py:4: \u001b[1m\u001b[31merror:\u001b(B\u001b[m Cannot find implementation or library stub for module named 'veniq.ast_framework'\u001b(B\u001b[m
\u001b[1m\u001b[31mFound 8 errors in 5 files (checked 155 source files)\u001b(B\u001b[m
Makefile:39: recipe for target 'typecheck' failed
make: *** [typecheck] Error 1
container 94e8460fdb38076ecba9b33f2bd52fb5ba59640c9fd0e34a3e849db833999d7b is dead
Tue Nov  3 10:19:34 CET 2020

@acheshkov
Copy link
Member

@aravij please take a look ))

@acheshkov
Copy link
Member

@aravij please, remember

@aravij
Copy link
Contributor Author

aravij commented Nov 20, 2020

@acheshkov Please try one more time.

@acheshkov
Copy link
Member

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Nov 20, 2020

@rultor merge

@acheshkov OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Nov 20, 2020

@rultor merge

@acheshkov @aravij Oops, I failed. You can see the full log here (spent 5min)

/home/r/repo/aibolit/metrics/cognitiveC/cognitive_c.py:108: DeprecationWarning: Call to deprecated method get_type. (Use ASTNode functionality instead.)
  each_block_type = ast.get_type(each_block)
/home/r/repo/aibolit/ast_framework/ast.py:203: DeprecationWarning: Call to deprecated method get_attr. (Use ASTNode functionality instead.)
  return self.get_attr(node, 'node_type')
/home/r/repo/aibolit/metrics/cognitiveC/cognitive_c.py:90: DeprecationWarning: Call to deprecated method get_type. (Use ASTNode functionality instead.)
  each_block_type = ast.get_type(each_block)
/home/r/repo/aibolit/metrics/cognitiveC/cognitive_c.py:75: DeprecationWarning: Call to deprecated method get_type. (Use ASTNode functionality instead.)
  assert(ast.get_type(node) == ASTNodeType.METHOD_INVOCATION)
/home/r/repo/aibolit/metrics/cognitiveC/cognitive_c.py:92: DeprecationWarning: Call to deprecated method get_binary_operation_name. (Use ASTNode functionality instead.)
  bin_operator = ast.get_binary_operation_name(each_block)
/home/r/repo/aibolit/ast_framework/ast.py:174: DeprecationWarning: Call to deprecated method get_type. (Use ASTNode functionality instead.)
  assert(self.get_type(node) == ASTNodeType.BINARY_OPERATION)
/home/r/repo/aibolit/ast_framework/ast.py:175: DeprecationWarning: Call to deprecated method children_with_type. (Use ASTNode functionality instead.)
  name_node, = islice(self.children_with_type(node, ASTNodeType.STRING), 1)
/home/r/repo/aibolit/ast_framework/ast.py:176: DeprecationWarning: Call to deprecated method get_attr. (Use ASTNode functionality instead.)
  return self.get_attr(name_node, 'string')
./home/r/repo/aibolit/metrics/cognitiveC/cognitive_c.py:48: DeprecationWarning: Call to deprecated method get_type. (Use ASTNode functionality instead.)
  if ast.get_type(all_childs[2]) == ASTNodeType.IF_STATEMENT:
.../home/r/repo/aibolit/metrics/cognitiveC/cognitive_c.py:63: DeprecationWarning: Call to deprecated method get_type. (Use ASTNode functionality instead.)
  if ast.get_type(binary_operation_node) != ASTNodeType.BINARY_OPERATION:
/home/r/repo/aibolit/metrics/cognitiveC/cognitive_c.py:66: DeprecationWarning: Call to deprecated method get_binary_operation_params. (Use ASTNode functionality instead.)
  operator, left_side_node, right_side_node = ast.get_binary_operation_params(binary_operation_node)
/home/r/repo/aibolit/ast_framework/ast.py:239: DeprecationWarning: Call to deprecated method get_type. (Use ASTNode functionality instead.)
  assert(self.get_type(binary_operation_node) == ASTNodeType.BINARY_OPERATION)
/home/r/repo/aibolit/ast_framework/ast.py:241: DeprecationWarning: Call to deprecated method get_attr. (Use ASTNode functionality instead.)
  return BinaryOperationParams(self.get_attr(operation_node, 'string'), left_side_node, right_side_node)
..............sss..................sss................................sssssss............................................................................sssssssssssssss.............................sssssssssssss.......ss...........................................................................................................................Number of features:  28
../home/r/repo/test/utils/test_cfg_builder.py:32: DeprecationWarning: Call to deprecated class JavaPackage. (This functionality must be transmitted to ASTNode)
  java_package = JavaPackage(Path(__file__).parent.absolute() / 'SimpleClass.java')
/home/r/repo/aibolit/ast_framework/java_package.py:54: DeprecationWarning: Call to deprecated class JavaClass. (This functionality must be transmitted to ASTNode)
  java_class = JavaClass(class_ast.tree, class_ast.root, self)
/home/r/repo/aibolit/ast_framework/java_class.py:48: DeprecationWarning: Call to deprecated method children_with_type. (Use ASTNode functionality instead.)
  class_name = next(self.children_with_type(self.root, ASTNodeType.STRING))
/home/r/repo/aibolit/ast_framework/java_class.py:61: DeprecationWarning: Call to deprecated class JavaClassMethod. (This functionality must be transmitted to ASTNode)
  method = JavaClassMethod(method_ast.tree, method_ast.root, self)
/home/r/repo/aibolit/ast_framework/java_class_method.py:46: DeprecationWarning: Call to deprecated method children_with_type. (Use ASTNode functionality instead.)
  method_name = next(self.children_with_type(self.root, ASTNodeType.STRING))
..ssssssssss
======================================================================
ERROR: test.integration.test_semantic_extraction (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test.integration.test_semantic_extraction
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/r/repo/test/integration/test_semantic_extraction.py", line 30, in <module>
    from aibolit.extract_method_baseline.extract_semantic import extract_method_statements_semantic
ModuleNotFoundError: No module named 'aibolit.extract_method_baseline'


----------------------------------------------------------------------
Ran 425 tests in 32.558s

FAILED (errors=1, skipped=55)
Makefile:15: recipe for target 'unittest' failed
make: *** [unittest] Error 1
container 4252f12854b9e8e8021d18a779041730ccd66ea204e82550e608924805d7b607 is dead
Fri Nov 20 19:42:48 CET 2020

@acheshkov
Copy link
Member

@aravij please check it )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update AST framework
3 participants