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
Develop #634
Closed
Closed
Develop #634
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…formal name when making the default app name.
…umber. Also updated the value error to reflect this. git status
…, due to the restrictions in the naming scheme. Removed make_class_name as additional formatting is not needed from the app name to make a valid class name. Also moved the instantiation of class_name to appear below validation of the app_name.
…ional if a blank string is created from the regex, which may happen if the formal name was entered with only non-latin characters. Will return a statement that an example cannot be given, which will require the user to type in a candidate name into the command line.
… validates input in the validate_class_name method.
…strictions of app_name. Replaced in new.py with regex to only allow app_names that start with a lowercase letter.
…d for integration.
- added test to invalid testing: name with a leading digit, blank, non-latin character, leading capital letter. Changes passed all tests.
…d non-latin charaters.
…generated, just like with the app_name. This should help with the testing that requires some default value.
…f statement to evaluate if the first character is a digit will throw an error if the formal name is non-latin.
… the validate_app_name, with some differences.
…yApplication instead of Myapplication)
…alidating the app_name.
freakboy3742
requested changes
Oct 31, 2021
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.
This is on the right track; I've highlighted a couple of areas that need attention, but this is starting to look pretty good!
…tement. This is to create camel case of words that were otherwise in lower case. Updated test scenario, which this passes.
…. Class names should be in camel case, so created a test where it converts from lower case words to camel case.
…of latin and non-latin characters. Passes test.
@freakboy3742 Apologies it has taken so long. I am reviewing the reasons why the checks were not successful. |
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally, the program would throw an error if a non-latin name was entered as the foreign name. This was due to a regex that resulted in a blank class name.
My fix circumvents this issue, by explicitly asking the user for a class name instead of deriving it completly from the formal name. Added a make_class_name method and a validate_class_method. Originally had planned to make the candidate class_name to be from the app_name, but later decided to keep it with the formal_name. If a non-latin formal name is entered, then the program will prompt the user to enter an appropriate class name via validation. The regex used should be consistent with camel case format. Two test files, one for each new class_name method, was created and passed when ran.
During this process, also realized that the regex for the app_name isn't sufficient. I changed the regex statement so that the app name cannot start with a digit or a capitalized letter. If the formal name is non-latin, then the make_app_name method will return a blank string, which will raise a validation error if user doesn't enter anything. Updated the test pages, and the changes made passed.
Reference to issue #612
PR Checklist: