-
Notifications
You must be signed in to change notification settings - Fork 0
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
Passwords #1
Open
hark130
wants to merge
18
commits into
development
Choose a base branch
from
passwords
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Passwords #1
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
This version has been refined and REfactored from its initial predecessor. It is unecessarily complex. The module appears to be working (based on "light" functional testing). This version has *not* been tested against *actual* input from KTaNE. I also intend to write unit tests. Changes to be committed: new file: NILL_passwords.py
REfreshing my branch with changes to development
I think I need this to be a package if I'm going to unit test it. Changes to be committed: new file: __init__.py renamed: ../NILL_passwords.py -> nill_passwords.py
Unit tests couldn't import from a "sibling" directory without icky shenanigans. I modified both NILL (the Python code) and the test code into packages. Both packages share the same directory. That way, they can both be utilized from the top-level dir. Besides, it appears as if this is "desired" Python project file structure. Regardless, it works now. Changes to be committed: renamed: src/nitro_llama/__init__.py -> nitro_llama/__init__.py new file: nitro_llama/__main__.py renamed: src/nitro_llama/nill_passwords.py -> nitro_llama/nill_passwords.py new file: test/__init__.py new file: test/test_passwords.py
All tests passing Verify with: python3 -m test.test_passwords Changes to be committed: modified: test/test_passwords.py
REfactored the function to avoid duplicate code and "short circuit" the loop once it's found a match. Added 5 different "position order" strategies, complete with DEBUG statements to manually test performance. My hypothesis has not yet been proven, one way or another, ([2, 4, 1, 3, 0]) but 5 tests is a small sample set. I'll do better testing later. Changes to be committed: modified: nitro_llama/nill_passwords.py
REfreshing my branch with the latest README updates
Added usage instructions for passwords feature and associated unit tests
Changes to be committed: modified: nitro_llama/nill_passwords.py
Changes to be committed: modified: nitro_llama/nill_passwords.py
Changes to be committed: modified: nitro_llama/nill_passwords.py modified: test/test_passwords.py
Changed a method name to better support future "error" method implementation Changes to be committed: modified: test/test_passwords.py
Added a `run_test_fail()` method Added 9 Error tests Changes to be committed: modified: test/test_passwords.py Changes not staged for commit: modified: nitro_llama/nill_passwords.py
"Passwords" functionality now passing all Error tests Changes to be committed: modified: nitro_llama/nill_passwords.py
Added 3 Boundary Added 4 Special Changes to be committed: modified: test/test_passwords.py Changes not staged for commit: modified: nitro_llama/nill_passwords.py
Special test 3 wasn't passing "out the gate". Modified the way the function parses that incoming tuple. SPOILER ALERT: There is a list comprehension within a list comprehension now. Am I a genius or do I need to "git gud"? Regardless, this commit sees all of the "passwords" functionality passing all unit tests. Changes to be committed: modified: nitro_llama/nill_passwords.py
Changes to be committed: modified: nitro_llama/nill_passwords.py modified: test/test_passwords.py
I almost forgot the best part... marking something as "done" Changes to be committed: modified: README.md
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.
GOOD NEWS: It works as-is right now.
BAD NEWS: It will need to be redone in Go later on. Also, I'll need to write a JSON abstraction layer to facilitate translation of the back-end functionality.
Just try it out:
Usage
From the top-level repository directory:
Python
python3 -m python3 -m nitro_llama
Unit Tests
python3 -m test.test_passwords