AstuteSource / chasten

:dizzy: Chasten Uses XML and XPATH to Check a Python Program's AST for Specified Patterns!
https://pypi.org/project/chasten/
GNU General Public License v2.0
7 stars 8 forks source link

XPath expressions that broaden the number of anti-patterns checked. #125

Closed MilesF25 closed 7 months ago

MilesF25 commented 7 months ago

When creating a pull request to add a new feature or alter an existing one, there are some important elements to include to help our team review and process it more efficiently.

  1. Make sure the title is descriptive of what the PR includes. Don't mention issue names/numbers; save that for the description.

  2. List the names of those who contributed to the project.

@MilesF25 @VitalJoseph @Finley8

  1. Link the issue the pull request is meant to fix/resolve.

https://github.com/AstuteSource/chasten/issues/6

  1. Describe the contents and goal of the pull request.

This pull request aims to create XPath expressions that check for all of the anti-patterns provided in the article linked below.

https://www.researchgate.net/publication/347335615_How_to_kill_them_all_An_exploratory_study_on_the_impact_of_code_observability_on_mutation_testing

The Issue also asked for at least one instance of executing mutation testing tools for Python. Our team would study the correlation between mutation score and anti-patterns.

  1. Will coverage be maintained/increased?

This project aims to support the execution of test coverage monitoring and the collection of per-test coverage information using pytest-cov and coverage.py. This will be possible with our studies of the correlation between mutation score and anti-patterns.

  1. What operating systems has this been tested on? How were these tests conducted?

This program was tested on both Windows, MacOS, and Linux devices. The test was conducted using the chasten analyze command which was tested by analyzing either Lazytracker or Multicounter.

  1. Include a code block and/or screenshots displaying the functionality of your feature, if applicable/possible.

The following is the input that would produce the output seen in the screenshots below. poetry run chasten analyze lazytracker --config C:\Users\finle\chasten\.chasten --search-path C:\Users\finle\chasten\astute_subject\subject_forks\lazytracker\lazytracker --save-directory C:\Users\finle\chasten\astute_subject\subject_data\lazy_tracker

sc 1 sc 2 sc 3

Mark as a draft until it is ready to begin the reviewing process, then tag our Lead Software Architect, Lauren Nevill, our Principal Software Engineer, Bergas Batara, and our Founding Engineer, Gregory Kapfhammer when you mark it as ready for review.

MilesF25 commented 7 months ago

We still need to run black

VitalJoseph commented 7 months ago

@Finley8 could you make sure your xpath patterns are running successfully and then add them to the zhu_.yml file and dele them from checks.yml

boulais01 commented 7 months ago

@laurennevill would you mind reviewing/merging this when you get the chance?