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

Drop dependency on fact_helper_file #128

Closed
wants to merge 6 commits into from
Closed

Conversation

maringuu
Copy link
Collaborator

@maringuu maringuu commented Nov 7, 2023

See individual commits.

Related fkie-cad/FACT_core#1140

@maringuu
Copy link
Collaborator Author

maringuu commented Nov 7, 2023

Converting to draft as we must somehow tell pytest that it should execute the tests with the proper MAGIC variable.
But then we would have to download firmware.mgc in the installer too which I don't like.

@maringuu maringuu marked this pull request as draft November 7, 2023 10:21
Dockerfile Outdated Show resolved Hide resolved
@maringuu maringuu force-pushed the drop-fact-helper-file branch 2 times, most recently from b98ee6b to a092f9b Compare August 15, 2024 16:08
@maringuu maringuu marked this pull request as ready for review August 15, 2024 16:08
@maringuu maringuu force-pushed the drop-fact-helper-file branch from a092f9b to f7a3446 Compare August 15, 2024 16:10
@maringuu maringuu force-pushed the drop-fact-helper-file branch 2 times, most recently from 9bea21a to b965800 Compare September 12, 2024 10:02
This allows us to properly import the extractor via
`import fact_extract` rather than importing all submodules
individually.
Also this is most definitely more correct.
Not telling the user which modules failed is arguably worse
than just erroring out with the ImportError
As the python interpreter only adds the parent directory of the
executed script as module search path and we depend on `fact_extractor`
the file must be placed next to the `fact_extractor` module.
Despite us using ADD, the gitignore does not seem to be honored
Previously we had three different startup scripts:
- The docker entrypoint (fact_extractor/docker_extract.py)
- The python module entrypoint (fact_extractor/fact_extract.py)
- The docker wrapper (extract.py)
This commit removes the docker entrypoint and moves the module entrypoint
to __main__.py while changing as little code as possible.
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.

2 participants