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

feat: Have AI generate a check file for user #91

Closed Poiuy7312 closed 7 months ago

Poiuy7312 commented 9 months ago

Closes issue #33

This adds a command called:

chasten create-checks

Which will then display a textual app the code for which is in the configApp.py file:

image_2023-11-21_150448788

It will also prompt for an API key if one has not been given already just through a terminal input which it will then store an encrypted version into a text file using fernet.

The code than takes the inputs given by the user and stores it in a csv file split that information up when then the app is closed and use the write_checks function in configApp.py to format it in way to have consistently formatted inputs to send to chatGPT in an attempt to make the program more consistent.

It then displays the checks and sends the information to chatGPT and gets the results which is handled in the createchecks.py file and then displays the results in the terminal and stores it in a YAML file called checks.yml or whatever the user specifys.

image_2023-11-21_150812765

Poiuy7312 commented 9 months ago

This is such an amazing tool for the Chasten project. It was an emotionally moving process creating it, and it saddens me to move on to other issues. However, progress must be made.

I completely disagree this was a psychologically harrowing experience for me personally. I'm shivering just thinking about it. Would not recommend

AlishChhetri commented 9 months ago

@simojo This is the PR containing the test cases in question. They can be found in the test_createchecks.py file and it is probably worse than you can imagine. Thank you for the help!

laurennevill commented 9 months ago

@gkapfham, it seems this is still a WIP due to some tricky test cases. I am tentatively assigning it priority 5, dependent on the progress made by students over the next few days.

boulais01 commented 8 months ago

@AlishChhetri @Poiuy7312 Is this complete and ready for review? If not, consider marking it as a WIP and/or as draft.

AlishChhetri commented 8 months ago

@boulais01 Finishing up test cases for the API portion of this PR. All manual testing has confirmed the utility of the tool, however difficultly lies in creating an test suit. I know how I want to test the functionality, but I will ask Aiden and/or Tugi for help with setting up conditional test in the pyproject.toml file and github actions.

gkapfham commented 8 months ago

Hello @Poiuy7312 and @AlishC1 and @AlishChhetri, is this feature finished? Is there a way that you can include screenshots or other details so that people can see how it works? Finally, Alish, we talked about the strategies that you need to take to test this feature effectively. Since you cannot include an API key inside of the test suite, what approach are you going to take?

As soon as you are finished with this feature, please make sure to remove the draft label and then indicate that it is ready for review.

laurennevill commented 7 months ago

A small thing I have noticed is that you have an analysis.md file included in this PR. If i am not mistaken, this is automatically generated by another feature of chasten and is unique to you. This file would need to be removed from the PR before it can be merged into the main branch.

AlishChhetri commented 7 months ago

A small thing I have noticed is that you have an analysis.md file included in this PR. If i am not mistaken, this is automatically generated by another feature of chasten and is unique to you. This file would need to be removed from the PR before it can be merged into the main branch.

I have removed the analysis.md file that was included in this PR