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

Fix ss singular noun #167

Closed
wants to merge 3 commits into from
Closed

Conversation

george-gca
Copy link
Contributor

@george-gca george-gca commented Aug 7, 2022

Fixes #159

@jaraco
Copy link
Owner

jaraco commented Oct 19, 2022

Thanks for the contrib. Can you add a test that would fail without these fixes? It may be as simple as adding the known bad cases to inflections.txt.

@george-gca
Copy link
Contributor Author

@jaraco since this fix is for a case where the word is already in singular, just adding it to the inflections.txt cover it, right?

@jaraco
Copy link
Owner

jaraco commented Jan 19, 2023

@jaraco since this fix is for a case where the word is already in singular, just adding it to the inflections.txt cover it, right?

Honestly, I don't know. Probably?

@jaraco
Copy link
Owner

jaraco commented Apr 6, 2023

This one is so close. Would someone be willing to track down a test that characterizes the failure and fails on main but passes here?

@george-gca
Copy link
Contributor Author

I'd love to. I just forgot to check if that was enough to create the test and run it. But I am going to be afk untill 22nd this month. If no one does it first, I will do it as soon as I come back.

@jaraco jaraco force-pushed the main branch 2 times, most recently from a099bff to 0bcc550 Compare July 3, 2023 18:36
@jaraco
Copy link
Owner

jaraco commented Aug 20, 2023

Friendly nudge.

@george-gca
Copy link
Contributor Author

Can you help me setup a dev environment for this package? This way I could also write the tests and check if it is working correctly.

@jaraco
Copy link
Owner

jaraco commented Aug 21, 2023

The easiest way to get set up with a dev environment is to get tox. I personally use pipx to install tox, but there are many other ways (including system package managers). Once you have tox and a clone/fork of the repo, simply run tox in the inflect project directory. That will run all of the tests. Presumably, they should pass if you haven't changed anything. If that's not the case, you'll probably want to investigate why the tests aren't passing to ensure they're passing (first check to see if there are similar failures in CI). After you've run the tests, you'll be left with a .tox/py directory, which is a virtualenv with inflect editable-installed, meaning you can run .tox/py/bin/python (or .tox/py/Scripts/python on Windows) and have an environment that can import inflect and get the project as you have checked-out and edited.

After you've written a test, just run tox again and see if it passes or fails. To make things faster, you can run tox -- -k <my test name>, which passes a keyword to pytest saying "only run tests containing ". Any parameters after -- get passed to pytest. You can also pass --pdb to pytest, which will give you a Pdb prompt any time a test fails, useful for inspecting the state of affairs at the point the test fails.

I hope that helps. Let me know if you have any trouble.

@jaraco
Copy link
Owner

jaraco commented Mar 31, 2024

I'm going to close this for now, but feel free to revive it when you have interest/time.

@jaraco jaraco closed this Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

singular_noun on word ending in "s" removes s.
2 participants