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

Unneccesary inclusion of mkdocs-material #71

Closed
lofidevops opened this issue Feb 23, 2023 · 7 comments · Fixed by #73
Closed

Unneccesary inclusion of mkdocs-material #71

lofidevops opened this issue Feb 23, 2023 · 7 comments · Fixed by #73
Labels
enhancement New feature or request mkdocs-material This issue is connected with the mkdocs-material API planned

Comments

@lofidevops
Copy link
Contributor

lofidevops commented Feb 23, 2023

setup.py includes the mkdocs-material theme as a requirement. This means that I have to install the theme (and its dependencies) even if I don't use it. Could this be made an optional dependency? If so I'm happy to work on making the change.

setup.py

    install_requires=[
        'setuptools>=18.5',
        'beautifulsoup4>=4.6.3',
        'mkdocs>=1.0.4',
        'jsbeautifier',
        'pyyaml', # for testing
        'mkdocs-material', # for testing
        'requests',
        'pymdown-extensions >= 8.0'
    ],

Relevant documentation

@github-actions
Copy link

Thank you for your contribution! This is very appreciated.

@fralau fralau added enhancement New feature or request planned mkdocs-material This issue is connected with the mkdocs-material API labels Mar 14, 2023
@fralau
Copy link
Owner

fralau commented Mar 29, 2023

Thanks! In practice, how would you call python setup.py install for the test feature?

@lofidevops
Copy link
Contributor Author

Good question 🤔 I must admit I didn't test that scenario. Let me play around and confirm it works. How do you do it at the moment? How do you do it with mkdocs_macros_plugin?

@lofidevops
Copy link
Contributor Author

To do this from scratch:

cd mkdocs-mermaid2-plugin
virtualenv .venv --python=python3
./.venv/bin/pip install -e .[test]
./.venv/bin/python setup.py test

This installs mkdocs-mermaid2-plugin as an editable library in the virtualenv, with the testing prerequisites. (You can confirm that mkdocs-material and pyyaml both appear in .venv/lib.)

Although I'm pretty sure "setup.py test" is not doing anything. I'm not sure how you trigger your tests?

@fralau
Copy link
Owner

fralau commented Mar 30, 2023

Thanks! If you use pip, would it work as follows?

pip install "mkdocs-mermaid2-plugin[test]"

@lofidevops
Copy link
Contributor Author

Yes, that's how you would install it from PyPI.

@lofidevops
Copy link
Contributor Author

Hmmm 🤔 if it's required for mkdocs-material users, not just for testing before release, then you probably want another extras definition so they can pip install mkdocs-mermaid2-plugin[material]. Or maybe that's simply a better name than test? Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mkdocs-material This issue is connected with the mkdocs-material API planned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants