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

auto-render schemas as HTML in docs #22

Open
ehrenb opened this issue Dec 31, 2022 · 0 comments
Open

auto-render schemas as HTML in docs #22

ehrenb opened this issue Dec 31, 2022 · 0 comments

Comments

@ehrenb
Copy link
Owner

ehrenb commented Dec 31, 2022

Can't do multi-stage builds in the docs Dockerfile, because there is a circular dependency problem.

...
# multi-stage build to copy in worker source modules
# for autodoc'ing their source and schemas
# TODO: resolve how to mock imports for each, as 
# we dont want to have to install all 3rd party deps
# for all workers. see https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_mock_imports 

# FROM behren/machina-androdguard:latest as androguard
# FROM behren/machina-binwalk:latest as binwalk_img
# RUN mkdir /machina/binwalk && touch /machina/binwalk/__init__.py
# COPY --from=binwalk_img /machina/src /machina/binwalk

# FROM behren/machina-bz2:latest as bz2
# FROM behren/machina-exif:latest as exif
# FROM behren/machina-findurls:latest as findurls
# FROM behren/machina-gzip:latest as gzip

# FROM behren/machina-identifier:latest as identifier
# RUN mkdir /machina/identifier && touch /machina/identifier/__init__.py
# COPY --from=identifier /machina/src /machina/identifier

# FROM behren/machina-jar:latest as jar
# FROM behren/machina-similarity:latest as similarity
# FROM behren/machina-ssdeep:latest as ssdeep
# FROM behren/machina-tar:latest as tar
# FROM behren/machina-zip:latest as zip
# FROM behren/machina-ghidra-project-creator:latest as ghidra-project-creator

...

Also, to import these for autodc, we can use mock-import to suppress the import warnings instead of bloating the image with all dependencies:

conf.py

autodoc_mock_imports = [
    'python-magic'
]

For now, just keeping referential documentation in workers.csv in the docs repo.

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

No branches or pull requests

1 participant