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

Don't set court='scotus' for South Carolina citations #84 #105

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

devlux76
Copy link

This addresses issue #84. The issue was caused because SC is treated differently than S.C. when searching and scotus is the default return result. Since all court strings are unique with or without punctuation, stripping all punctuation and converting to the same case allows for an exact comparison instead of the "startswith" comparison that was previously being used.

@CLAassistant
Copy link

CLAassistant commented Dec 25, 2021

CLA assistant check
All committers have signed the CLA.

@mlissner
Copy link
Member

@jcushman do you have any bandwidth or interest in taking a look at this one?

@devlux76, thanks! Looks like you need to do a little linting work now that tests have completed though.

@devlux76
Copy link
Author

@mlissner I'm sorry, I don't understand.

Looks like you need to do a little linting work now that tests have completed though.

Can you please give me more info about what needs to be done here?
Thanks!

@mlissner
Copy link
Member

Linters are programs that check your work to make sure it's clean and pretty and using best practices. We have a few of them that were in Github Actions, but we didn't have a good process for developers to actually run them, so I just added a dev dependency for pre-comit to this branch. We use this in most of our other projects, so it seems reasonable to use it here too.

After adding it, I ran it, it cleaned up and highlighted a few problems with your code, which I fixed for you.

So this is ready for review again, but I'll wait for Jack to see if he wants to look at it. If not, I'll jump back in.

@devlux76
Copy link
Author

Ok, I understand on the linting. I guess I'm so used to golint autoliniting my code that I forgot python doesn't do this automatically.

So for future reference, is there a particular process I should use prior to committing?

@mlissner
Copy link
Member

If you run pre-commit install in your repo, it'll install a git hook that runs the pre-commit checks before each commit. If it fails, some things (like formatting) will be fixed automatically, and you can just re-run your git commit. Other things will report errors you'll have to fix yourself. But that's the heart of it, and you'll write better code as a result.

@mlissner mlissner changed the title Addressing issue #84 Don't set court='scotus' for South Carolina citations #84 Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pull Requests
Development

Successfully merging this pull request may close these issues.

3 participants