Closed TheCleric closed 3 years ago
Well that escalated quickly ... :)
Thanks for your efforts. Will review presently and touch base in the next couple days.
Quick administrative ask: can you confirm that you are releasing your code under the MIT license? I am OK with you keeping copyright to your code and will document accordingly in license/documentation/PyPI.
Yes absolutely MIT is fine. :)
@TheCleric , good afternoon.
Wrapping up review. This is dynamite--thank you for adding your code and fixing mine at the same time. Question:
Within test_cli.py, you enhanced the functionality of the _compare() method by allowing it to tack keyword arguments onto the end of the subprocess args:
subprocess_commands.extend([command for kvp in [[f'--{key}', kwargs[key]] for key in kwargs.keys()] for command in kvp])
This is brilliant and super-helpful, but I can see my future self staring at this code slack-jawed trying to remember what it does. Can you confirm the dumbed-down version is functionally equivalent?
# Convert kwarg key, value pairs to optional arguments e.g. ['--surname_column', 'custom_surname_col_name']
argument_pairs = [
[f'--{key}', value]
for key, value
in kwargs.items()
]
# Add them to the subprocess arguments
for argument_pair in argument_pairs:
subprocess_commands.extend(argument_pair)
Yes, that's probably easier to understand for future devs. π
Oh, and good job using .items()
instead. Always forget about that function. π
Evening, @TheCleric .
I'm tapping out for today, so I wanted to give you a status update.
Everything seems to be working. At your convenience would you please clone my surgeo/dev repo, install, and run the unittests on your machine? Comments on changes are also welcomed if you're so inclined.
Working plan as of right now:
All unit tests pass for me on your dev branch.
Only question/comment on your commits: Was the addition of files.txt with your local paths on purpose?
Otherwise looks good!
Defenitely an error. Good catch, thanks.
When I get home from work I'll start to burn through the remaining items on this list.
One other thing I think I made a mistake on is what it does if it doesn't find a first name. As of right now it looks like it returns NaN
, but it should probably revert to the ALL OTHER FIRST NAMES
entry for its probabilities.
Looks like it could affect surnames as well. Hope to have a fix in this PR shortly.
@TheCleric , do you think you will have further changes for v.1.1.0? If not I will go merge and close #12 .
If you want me to hold off that's equally fine--just wanted to make sure you weren't waiting on me.
No, I think this is done on my end!
Will implement #12
In this PR the following have been done:
.ipynb
to pull first name demographic data from the referenced data set in the BIFSG scientific paper.Please let me know of any questions or comments you may have. I will likely be writing up an article on my usage of this new functionality soon to identify racial disparities in a dataset I was analyzing. I'd like to link back to this wonderful library for others to replicate my results. :)