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

refactor: entrypoint of script #2143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-wallen
Copy link

Parse the system args in main() for command line use.

For people using this in their python script they should be able to supply the same arguments in the function.

@ppfeister ppfeister added the enhancement New feature or request label May 30, 2024
@ppfeister ppfeister self-assigned this May 30, 2024
Copy link
Member

@ppfeister ppfeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.
4/9 of the original unit tests seem to fail. Upon further investigation, this is what I've come away with --

Unit tests ran with:

cd sherlock
python -m unittest tests.all --verbose

As a standalone script...

python3 sherlock xyz works as before Sherlock was packaged (this is a +), but this (on its own) is also not hugely beneficial for Sherlock's inclusion in other scripts as a module or package, only really as an included file.


Now the various installed-package forms...

pip install .
sherlock test123

Install works fine. Manual test however fails with infinite recursion.

Note that sherlock --version seems to work, just not beginning any scans.

And when testing the now-installed package within Python...

import sherlock
sherlock({anything})

Returns that sherlock is not a callable module.

I'm not seeing any part of entrypoint main() that accepts passed (python) args, only the original cli parser args. It seems that sherlock() was given extra arguments (with defaults), but this is not the package entrypoint as defined by pyproject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants