-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Issue 20: Exercise Names + A Refactor to Bring Into Spec Compliance #22
Conversation
…. Refactored references accordingly.
… Status to represent Summary comments instead of an Approve/Disprove. Renamed BaseComments to BaseFeedback.
…approve/disprove statuses to Summary.require, et. al.
…due to class and Enum changes. Added code to parse comments to determine the Summary status to pass. Using Comment object rather than strings for comment list.
added ending newline.
Added ending newline.
Added ending newline.
Added ending newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a few little comments.
One thing I'm not quite able to work out from a cursory glance is what happens if there are a mixture of comment types for one solution? If for example there is a actionable
and a informative
comment, what does the top-level message do?
DO'HO! I cannot believe I left a debug statement in. Co-authored-by: Jeremy Walker <[email protected]>
Co-authored-by: Jeremy Walker <[email protected]>
Co-authored-by: Jeremy Walker <[email protected]>
Co-authored-by: Jeremy Walker <[email protected]>
@iHiD -- Thank you for the comments (and the spelling patrol!!)! 😄
The "highest priority" comment takes precedence in that circumstance, and a a Frankly, this was me not (quite) wanting to throw away the old APPROVE/DISAPPROVE organization - so I turned it into a summary. Not sure I am happy with that, and I might get rid of it as I proceed down the road to integrating pylint better. Open to thoughts/suggestions/ideas on that front. I did add a summary status of GENERIC, for when there were no exercism specific comments, and only pylint returned anything. Haven't wired that up yet. The comment Enums are in One thought is to write a "generic" analyzer (with that GENERIC summary message) that ran a student's solution through pylint only, so that we could at minimum have a pylinting for every exercise. Then double back and write/customize individual analyzers for exercises as we get to them. Open to suggestions on that as well. Pylint uses a pretty nice lib for AST wallking (astriod), that I'm eager to get my hands on. 😉 |
Of course 🙂
I've not done this yet for the Ruby one, but my (medium-term) plan is to add summary comments where I feel they add some explicit extra value. The website itself should handle informing the student what to do in general (ie "please sort this before proceeding") so the aim of this field was for the analyzer to be able to give extra information where that wasn't enough. That said, in the short-term I'll probably do exactly the sort of thing you've done here. One to explore further down the line for sure 🙂 |
@cmccandless @iHiD @SleeplessByte -- are there additional points I need to address here for approval? Just checking.... |
(Not from me, but you don't need my code-level-approval anyway as this doesn't touch anything I'm a codeowner of. I'll approve so you can merge when you're ready 🙂) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think dev-requirements.txt.py is an accident. Once that's removed, I'm good with this, so I'll approve now.
Bad file name extension slapped on by the IDE. Needed deletion.
Whoop 🎉 |
As stated on the 🥫 , a refactor to bring the analyzer "up to spec" 🌈 ✨ :
config.json
Status
toSummary
and added summary comments categoriesdataclass
to represent aComment
, withCommentTypes
,params
andcomments
textEnum
to representCommentTypes
for flagging each comment given.pylint
to theComentTypes
defined for exercism.Pylint
specific code into its own file, since it was generic.dataclass
,Enum
, andoutput_file
changestwo-fer/analyzer
, made it generic and moved it to a@classmethod
ofAnalysis
Also added CI-related files.
More work is needed to clean up code and better integrate
PyLint
, but this is a functional first pass. 🎉