Skip to content
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
wants to merge 18 commits into
base: development
Choose a base branch
from
Open

Passwords #1

wants to merge 18 commits into from

Conversation

hark130
Copy link
Owner

@hark130 hark130 commented Aug 2, 2020

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

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants