Skip to content

Release new version#118

Merged
vyahhi merged 90 commits intomainfrom
develop
Sep 22, 2021
Merged

Release new version#118
vyahhi merged 90 commits intomainfrom
develop

Conversation

@nbirillo
Copy link
Collaborator

@nbirillo nbirillo commented Aug 26, 2021

  1. Add penalty algorithm (if you don't send history, it does not work, but the output JSON has a new field in all cases)
  2. Merge subcategories into five main categories (to disable this feature you shout use ‑‑with‑all‑categories flag)
  3. Add difficulty level for each issue (Note, if you use this flag, the output format will be changed. To use this feature you should use ‑‑group‑by‑difficulty flag. README file contains ax example of this format)
  4. Some code refactoring
  5. Update grade thresholds according to the empirical analysis (discussed with Kolya)
  6. Update lintes for Java, Kotlin and Python
  7. Support Java15

GirZ0n and others added 30 commits May 3, 2021 15:58
Add wps-light support
Added support for flake8-broken-line, flake8-string-format, flake8-commas (they are WPS dependencies).
Added support for cohesion.
Added new inspector: Radon. 
Added maintainability index.
Updated versions of dependencies
Added django dictionary support
Fixed tests
Added xlsx_tool_run.py – script to run the tool on multiple code samples stored in xlsx file
Add penalty system
* Updated penalty coefficients;
* Added new tests;
* Fixed bug with _get_issue_class_to_influence, which caused the dictionary to get issues that should not be penalized.
* Fixed two cases in test_categorize. There were two identical issues in the list of previously made issues.
* Refactor the tool for evaluation: add multithreading, add a possibility to handle CSV arguments
* Add script to filter solutions by language and drop duplicates
* Add script to distribute grades from unique solutions to all solutions
* Add script to find diffs between two graded dataframes
* Add tests and descriptions
# Conflicts:
#	src/python/evaluation/common/util.py
#	src/python/evaluation/evaluation_config.py
* Add origin class for maintainability index
* Add WPS518 to ignore due to collision with C0200 by Pylint
* Added a new category INFO, in order not to take into account some issues in the evaluation.
Added a utility for dataset marking
# Conflicts:
#	src/python/evaluation/evaluation_config.py
#	whitelist.txt
Added a script for plots
nbirillo and others added 2 commits August 26, 2021 14:56
# Conflicts:
#	.github/workflows/build.yml
#	VERSION.md
#	requirements-test.txt
#	requirements.txt
#	src/python/common/tool_arguments.py
#	src/python/review/application_config.py
#	src/python/review/common/file_system.py
#	src/python/review/inspectors/detekt/detekt.py
#	src/python/review/inspectors/eslint/eslint.py
#	src/python/review/inspectors/flake8/.flake8
#	src/python/review/inspectors/flake8/flake8.py
#	src/python/review/inspectors/intellij/intellij.py
#	src/python/review/inspectors/issue.py
#	src/python/review/inspectors/parsers/checkstyle_parser.py
#	src/python/review/inspectors/pmd/files/bin/basic.xml
#	src/python/review/inspectors/pmd/issue_types.py
#	src/python/review/inspectors/pmd/pmd.py
#	src/python/review/inspectors/pyast/python_ast.py
#	src/python/review/inspectors/pylint/pylint.py
#	src/python/review/inspectors/radon/radon.py
#	src/python/review/inspectors/spotbugs/spotbugs.py
#	src/python/review/inspectors/springlint/springlint.py
#	src/python/review/reviewers/common.py
#	src/python/review/reviewers/perform_review.py
#	src/python/review/reviewers/utils/code_statistics.py
#	src/python/review/reviewers/utils/print_review.py
#	src/python/review/run_tool.py
#	test/python/functional_tests/conftest.py
#	test/python/functional_tests/test_multi_file_project.py
#	test/python/functional_tests/test_range_of_lines.py
#	test/python/functional_tests/test_single_file_json_format.py
#	test/python/inspectors/test_checkstyle_inspector.py
#	test/python/inspectors/test_flake8_inspector.py
#	test/python/inspectors/test_local_review.py
#	test/python/inspectors/test_pmd_inspector.py
#	test/resources/inspectors/python/case37_wildcard_import.py
#	whitelist.txt
* Fixed #109

* Fixed #112

* Fixed #116
GirZ0n and others added 2 commits August 27, 2021 13:42
* Added output examples with --group-by-difficulty

* typo fix
@nbirillo nbirillo requested review from andrvb and vyahhi August 27, 2021 10:52
GirZ0n and others added 3 commits August 30, 2021 12:29
* Added some new words

* Added W0511

* Added WPS428

* Added many exceptions

* Sort whitelists (Github Actions)

* Comments fix

Co-authored-by: GirZ0n <GirZ0n@users.noreply.github.com>
* Updated detekt

* Added new words

* Sort whitelists (Github Actions)

Co-authored-by: GirZ0n <GirZ0n@users.noreply.github.com>
* Fixed #122

* Sort whitelists (Github Actions)

Co-authored-by: GirZ0n <GirZ0n@users.noreply.github.com>
@nbirillo
Copy link
Collaborator Author

@vyahhi @andrvb could you please check this PR?

@andrvb
Copy link
Contributor

andrvb commented Sep 7, 2021

Are file like test/resources/evaluation/xlsx_target_files/target_sorted_order.xlsx and similar files in evaluation dir needed?

nbirillo and others added 8 commits September 13, 2021 12:13
* Delete intellij inspector

* Delete spotbugs inspector
* Delete intellij inspector

* Delete spoibugs inspector

* Download Detekt in Dockerfile

* Install curl and unzip

* Fix Dockerfile

* Try to delete detekt sources

* Check env variables

* Try to get env variable

* Use my docker image

* Small code refactoring and also download detekt-jar file

* Use my docker image

* Use my docker image
* Delete intellij inspector

* Delete spoibugs inspector

* Download Detekt in Dockerfile

* Install curl and unzip

* Fix Dockerfile

* Try to delete detekt sources

* Check env variables

* Try to get env variable

* Use my docker image

* Small code refactoring and also download detekt-jar file

* Use my docker image

* Use my docker image

* Delete springlint inspector
* Delete checkstyle sources

* Fix curl command
* Delete PMD sources

* Fix flake8 and echo env variables

* Fix pmd tests
@nbirillo
Copy link
Collaborator Author

@andrvb I deleted unused inspectors (since they are too slow and we don't plan to use them in the tool) Also I deleted all inspectors sources since it can violate licenses. And of course, I deleted unnecessary resources.

In GitHub actions I have to use my own docker image since an intermediate version is not pished into stepik docker hub and does not contain all necessary changes (I built my docker image by Dockerfile in the repo)

Sorry for the big PR (I decreased it as it was possible). But in this PR we updated linters and it means we have to change configs and issues categorization. Several configs are too big, also we have some additional big files (like whitelists for flake8 in the repo and in the tool).

You can ignore the following files:
whitelist.txt (both of them)
issue_types.py (for all inspectors)
xml configs for linters

It is about 1200 new lines of code. Also since we added ‑‑group‑by‑difficulty and ‑‑with‑all‑categories we changed a lot of tests, it also takes a lot of new code lines.

@vyahhi
Copy link
Contributor

vyahhi commented Sep 13, 2021

source

@vyahhi
Copy link
Contributor

vyahhi commented Sep 16, 2021

@andrvb let's merge this PR?

# Install PMD
RUN curl -sSLO https://github.com/pmd/pmd/releases/download/pmd_releases/${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip \
&& unzip pmd-bin-${PMD_VERSION}.zip -d ${PMD_DIRECTORY}

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to move the linters installation before the hyperstyle code installation. This will allow you to use the Docker cache because the hyperstyle code changes more frequently than the linter versions.
See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache

Or (maybe it even more better) move the linters installation to base docker image. In this case, you can continue to use the base image in GitHub actions.

Copy link
Collaborator Author

@nbirillo nbirillo Sep 17, 2021

Choose a reason for hiding this comment

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

@andrvb @vyahhi Should I do it in this PR? Or in another one?``

Copy link
Contributor

Choose a reason for hiding this comment

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

@nbirillo, whatever works better for you.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let's do it in the next PR

@vyahhi
Copy link
Contributor

vyahhi commented Sep 22, 2021

OK, I'm merging this PR since it has no major issues to fix anymore.

@vyahhi vyahhi merged commit 44e5025 into main Sep 22, 2021
@nbirillo nbirillo deleted the develop branch October 6, 2021 08:26
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.

6 participants