diff --git a/.github/ISSUE_TEMPLATE/1-bug_report.md b/.github/ISSUE_TEMPLATE/1-bug_report.md new file mode 100644 index 00000000..0818fe48 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug_report.md @@ -0,0 +1,35 @@ +--- +name: "\U0001F41B Bug report" +about: Create a report to help us improve + +--- + + + +- **MatrixCtl Version**: +- **Python Version**: +- **Platform**: + +#### Describe the bug + + + +#### Expected behavior + + + +#### Debug output + + + +#### Additional context + diff --git a/.github/ISSUE_TEMPLATE/2-feature_request.md b/.github/ISSUE_TEMPLATE/2-feature_request.md new file mode 100644 index 00000000..ed2e4d4f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature_request.md @@ -0,0 +1,22 @@ +--- +name: "\U0001F680 Feature request" +about: Suggest an idea for this project + +--- + + + +#### Is your feature request related to a problem? Please describe. + + +#### Describe the solution you'd like + + +#### Describe alternatives you've considered + + +#### Additional context + diff --git a/.github/ISSUE_TEMPLATE/3-help.md b/.github/ISSUE_TEMPLATE/3-help.md new file mode 100644 index 00000000..8dd1a440 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-help.md @@ -0,0 +1,11 @@ +--- +name: "⁉️ Need help with Node.js?" +about: Please use https://github.com/MichaelSasser/matrixctl/discussions + +--- + +If you have a question about MatrixCtl (or Contribution) that is not a bug +report or feature request, please post it in the +[discussions](https://github.com/MichaelSasser/matrixctl/discussions) + +Questions posted in the issues will be closed. diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d4e813a2..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: "[BUG] " -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Enter command '...' -2. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Debug output** -Run the same command again with the "-d" argument and copy the output in here to help explain your problem. (Your token will be hidden by debug mode) - -**Desktop (please complete the following information):** - - OS: [e.g. Arch linux x64 5.5.13-arch2-1] - - MatrixCtl Version [e.g. 0.1.0] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 1f3f4799..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "[FEATURE] " -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE/Feature_Bugfix.md b/.github/PULL_REQUEST_TEMPLATE/Feature_Bugfix.md new file mode 100644 index 00000000..e31d7b31 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/Feature_Bugfix.md @@ -0,0 +1,38 @@ + + +fixes # + +#### Affected Handlers + + +#### Description of Change + +- +- +- + +#### Checklist + + +- [ ] Have you documented your changes? +- [ ] Have you added or changed tests for your code? +- [ ] (*) Have you created an issue first? +- [ ] (*) Have you checked to ensure there aren't other open Pull Requests + for the same update/change? +- [ ] (*) Have you created a newsfragment in `./news/`? +- [ ] (*) Have you lint your code locally prior to submission? +- [ ] (*) Did you ran `tox` and everything passed? +- [ ] (*) I haven't added any dependencie without approval. + + +I have read and accept the: + +- [ ] (*) Code of Conduct. +- [ ] (*) Contribution Guidelines. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8df6850c..dbce7d02 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -164,9 +164,9 @@ repos: hooks: - id: vulture - # PEP 585 Upgrade (Type Hints) - - repo: https://github.com/sondrelg/pep585-upgrade - # Use the sha / tag you want to point at - rev: 'ab1595ee0aa8823dcda1f0bd95b2c194fcd5362b' - hooks: - - id: upgrade-type-hints + # # PEP 585 Upgrade (Type Hints) + # - repo: https://github.com/sondrelg/pep585-upgrade + # # Use the sha / tag you want to point at + # rev: 'ab1595ee0aa8823dcda1f0bd95b2c194fcd5362b' + # hooks: + # - id: upgrade-type-hints diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..11483ab5 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,32 @@ +# matrixctl +# Copyright (c) 2021 Michael Sasser +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +--- + +version: 2 + +sphinx: + configuration: docs/source/conf.py + +formats: all + +python: + version: 3.8 + install: + - method: pip + path: . + extra_requirements: + - docs diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0409476f..8847cbf9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,38 @@ This is the changelog of MatrixCtl. You can find the issue tracker on .. towncrier release notes start +0.10.3 (2021-06-26) +=================== + +Features & Improvements +----------------------- + +- The docks have moved back to (`https://matrixctl.readthedocs.io/ + `_)`. (`#69 + `_) + + +Bugfixes +-------- + +- Make MatrixCtl compatible with Python 3.8. (`#146 + `_) + + +Improved Documentation +---------------------- + +- Add Contribution Guidlines (`#149 + `_) + + +Miscellaneous +------------- + +- The ``event_id`` of the command ``get-event`` now gets sanitized. (`#143 + `_) + + 0.10.2 (2021-06-24) =================== @@ -128,3 +160,339 @@ Miscellaneous `_. (`#61 `_) + +0.8.5 (2021-02-24) +================== + +Bugfixes +-------- + +- Add the new ``serve-notice`` feature. + + +0.8.4 (2021-02-24) +================== + +.. note:: This version of MatrixCtl has not been released. + + +0.8.3 (2021-02-24) +================== + +.. note:: This version of MatrixCtl has not been released. + + +0.8.2 (2021-02-24) +================== + +.. note:: This version of MatrixCtl has not been released. + +Features & Improvements +----------------------- + +- feature ``upload`` which makes it possible to upload files and images. It returns the ``mxc://`` uri. +- feature ``server-notice``. + +Miscellaneous +------------- + +- Changed docs to classic python theme. + + +0.8.1 (2020-12-02) +================== + +Behavior & Breaking Changes +--------------------------- + +- The ``update`` command now uses config: ``[SYNAPSE]`` -> ``Playbook`` instead of ``[SYNAPSE]`` -> ``Path`` + +Features & Improvements +----------------------- + +- Add missing ``[SYNAPSE]`` (config file) documentation. + + +0.8.0 (2020-12-02) +================== + +Behavior & Breaking Changes +--------------------------- + +- The option to run multiple playbooks with matrixctl. The user should use - import_playbook: /PathTo/matrix-docker-ansible-deploy/setup.yml in an own playbook. (`#20 + `_)(`#21 + `_) + +Features & Improvements +----------------------- + +- The ``ansible`` handler now uses ``ansible-runner`` instead of ``subprocess`` (`#20 + `_)(`#21 + `_) +- The ``api`` handler now gives the user a hint, when the admin api is disabled. + + +0.7.0 (2020-09-25) +================== + +Behavior & Breaking Changes +--------------------------- + +- Removed the ``--with-bots``, "bots" are now shown by default (`#15 + `_) + +Bugfixes +-------- + +- Fixed the deploy control logic (`#18 + `_) + + +0.6.3 (2020-09-17) +================== + +Features & Improvements +----------------------- + +- With the help of two args it is possible to deploy the two playbooks independently: + - ``-s``/``--synapse``: Only deploy the synapse playbook, + - ``-a``/``--ansible``: Only deploy your own playbook. + + +0.6.2 (2020-09-16) +================== + +Bugfixes +-------- + +- It is now possible to deploy, when only one of ``[ANSIBLE]`` or ``[SYNAPSE]`` are configured. + + +0.6.1 (2020-06-02) +================== + +Features & Improvements +----------------------- + +- If the access-token has changed or is wrong, MatrixCtl now throws a specific error, which tells the user, what went wrong. (`#12 + `_) +- Replace the assertions from the API handler with proper ``TypeError``. + + +0.6.0 (2020-05-12) +================== + +Behavior & Breaking Changes +--------------------------- + +- Changed ``users --no-bots`` or ``users -b`` to ``users --with-bots`` or ``users -b`` +- Changed ``users --guests`` or ``users -g`` to ``users --with-guests`` or ``users -g`` + +Features & Improvements +----------------------- + +- ``users --with-deactivated`` or ``users -d`` (`#2 + `_) + +Bugfixes +-------- + +- SSH handler logs an error if unable to connect (`#7 + `_) + + +0.5.0 (2020-04-30) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +Behavior & Breaking Changes +--------------------------- + +- Fixed typo in the ``maintenance`` command. + +Removals & Deprecations +----------------------- + +- Removed ``run-postgres-synapse-janitor`` from maintenance because it may destroy the DB (`#8 + `_)(`#465 (spantaleev/matrix-docker-ansible-deploy) + `_) + + +0.4.0 (2020-04-22) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +Behavior & Breaking Changes +--------------------------- + +- ``rooms`` submodule: Changed argument ``--order_by_size`` to + ``--order-by-size``. + +Features & Improvements +----------------------- + +- Add the ``version`` command. +- Add the ``delroom`` command. +- Add more debug output to the API handler (``params``, ``data``, ``method`` and censored + ``headers``) + + +0.3.2 (2020-04-21) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +Features & Improvements +----------------------- + +- Add the ``rooms`` command. + + +0.3.1 (2020-04-21) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +.. note:: This version of MatrixCtl has not been released. + + +0.3.0 (2020-04-20) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +.. note:: No significant changes to the Project. + +Project restructured. + + +0.2.2 (2020-04-13) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +Features & Improvements +----------------------- + +- Added docs to the Project (``gh-pages`` branch). + +Bugfixes +-------- + +- ``matixctl adduser --ansible``. MatrixCtl was not able to create a user with the ``--ansible`` argument. + + +0.2.1 (2020-04-13) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +.. note:: This version of MatrixCtl has not been released. + + +0.2.0 (2020-04-12) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +Behavior & Breaking Changes +--------------------------- + +- The command ``list-user`` has been renamed to ``users``. + +Features & Improvements +----------------------- + +- Add the command ``user``. + + +0.1.4 (2020-04-10) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +Features & Improvements +----------------------- + +- Add the command ``start``. +- Add the command ``restart`` (alias for ``start``). +- Add the command ``check``. + + +0.1.3 (2020-04-10) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +Features & Improvements +----------------------- + +- Add the command ``adduser-jitsi``. +- Add the command ``deluser-jitsi``. + + +0.1.2 (2020-04-07) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +**First official release.** + +Features & Improvements +----------------------- + +- Add the command ``list-users``. + + +0.1.1 (2020-04-07) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + + +.. note:: No significant changes to the Project. + + +Trivial Changes +--------------- + +- Fixed GitHub Wokflow. + + +0.1.0 (2020-04-07) +================== + +.. warning:: Since the ``synapse-janitor`` is not safe to use anymore, please + **do not** use the ``maintenance`` command for any MatrixCtl + version below 0.5.0! + +.. note:: No significant changes to the Project. + +**Internal Release** + diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 7446c0b3..cb6c9927 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,76 +1,133 @@ + # Contributor Covenant Code of Conduct ## Our Pledge -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. ## Our Standards -Examples of behavior that contributes to creating a positive environment -include: +Examples of behavior that contributes to a positive environment for our +community include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community -Examples of unacceptable behavior by participants include: +Examples of unacceptable behavior include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission +* Publishing others' private information, such as a physical or email + address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a - professional setting + professional setting -## Our Responsibilities +## Enforcement Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. ## Scope -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at info@michaelsasser.org. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. +reported to the community leaders responsible for enforcement at +[Abuse@MichaelSasser.org](mailto://abuse@michaelsasser.org). +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. -[homepage]: https://www.contributor-covenant.org +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..e1c67d3a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +Please check our [Contributer Documentation](https://matrixctl.readthedocs.io/en/latest/contributer_documentation/index.html#contributer-documentation). diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 06b89b4f..f0fe7be4 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1 +1,5 @@ +********* +Changelog +********* + .. include:: ../../CHANGELOG.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index 27ebe884..8d003b2a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,24 +1,42 @@ -# Configuration file for the Sphinx documentation builder. +# matrixctl +# Copyright (c) 2020 Michael Sasser +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html -# -- Path setup -------------------------------------------------------------- -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . """Use this module to generate the documentation with ``sphinx``.""" +# Configuration file for the Sphinx documentation builder. +# !! This file needs to be compatible with Python 3.8 !! + +from __future__ import annotations + import os import sys from datetime import date +from pathlib import Path +from typing import List + +# pylint: disable=W0611 +import sphinx_rtd_theme # noqa: F401 -from pkg_resources import get_distribution +from single_source import get_version -__version__: str = get_distribution("matrixctl").version +__version__: str = ( + get_version(__name__, Path(__file__).parent.parent) or "Unknown" +) sys.path.insert(0, os.path.abspath("../")) sys.path.insert(0, os.path.abspath("../..")) @@ -39,7 +57,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions: list[str] = [ +extensions: List[str] = [ "sphinx.ext.autodoc", "sphinx.ext.mathjax", "sphinx_autodoc_typehints", @@ -51,9 +69,10 @@ "sphinx.ext.autosummary", "sphinx.ext.doctest", "sphinx.ext.inheritance_diagram", + "sphinx_rtd_theme", ] -suppress_warnings: list[str] = ["autosectionlabel.*"] +suppress_warnings: List[str] = ["autosectionlabel.*"] intersphinx_mapping = { "python": ("https://docs.python.org/3", None), @@ -90,21 +109,21 @@ autosummary_imported_members: bool = True # Add any paths that contain templates here, relative to this directory. -templates_path: list[str] = ["_templates"] +templates_path: List[str] = ["_templates"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. -exclude_patterns: list[str] = [] +exclude_patterns: List[str] = [] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme: str = "classic" +html_theme: str = "sphinx_rtd_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path: list[str] = ["_static"] +html_static_path: List[str] = ["_static"] diff --git a/docs/source/contributer_documentation/application.rst b/docs/source/contributer_documentation/application.rst new file mode 100644 index 00000000..444c76de --- /dev/null +++ b/docs/source/contributer_documentation/application.rst @@ -0,0 +1,31 @@ +.. + matrixctl + Copyright (c) 2021 Michael Sasser + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Application +*********** + + +Application +----------- + +.. automodule:: matrixctl.__main__ + :members: + :undoc-members: + :show-inheritance: + +.. + vim: set ft=rst : diff --git a/docs/source/contributer_documentation/coc.rst b/docs/source/contributer_documentation/coc.rst new file mode 100644 index 00000000..2d8ca1c1 --- /dev/null +++ b/docs/source/contributer_documentation/coc.rst @@ -0,0 +1,168 @@ +.. + matrixctl + Copyright (c) 2021 Michael Sasser + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + +Contributor Covenant Code of Conduct +************************************ + +Our Pledge +========== + +We as members, contributors, and leaders pledge to make participation in +our community a harassment-free experience for everyone, regardless of +age, body size, visible or invisible disability, ethnicity, sex +characteristics, gender identity and expression, level of experience, +education, socio-economic status, nationality, personal appearance, +race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, +welcoming, diverse, inclusive, and healthy community. + +Our Standards +============= + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our + mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political + attacks +- Public or private harassment +- Publishing others’ private information, such as a physical or email + address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +Enforcement Responsibilities +============================ + +Community leaders are responsible for clarifying and enforcing our +standards of acceptable behavior and will take appropriate and fair +corrective action in response to any behavior that they deem +inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other +contributions that are not aligned to this Code of Conduct, and will +communicate reasons for moderation decisions when appropriate. + +Scope +===== + +This Code of Conduct applies within all community spaces, and also +applies when an individual is officially representing the community in +public spaces. Examples of representing our community include using an +official e-mail address, posting via an official social media account, +or acting as an appointed representative at an online or offline event. + +Enforcement +=========== + +Instances of abusive, harassing, or otherwise unacceptable behavior may +be reported to the community leaders responsible for enforcement at +`Abuse@MichaelSasser.org `__. All +complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security +of the reporter of any incident. + +Enforcement Guidelines +====================== + +Community leaders will follow these Community Impact Guidelines in +determining the consequences for any action they deem in violation of +this Code of Conduct: + +1. Correction +------------- + +**Community Impact**: Use of inappropriate language or other behavior +deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, +providing clarity around the nature of the violation and an explanation +of why the behavior was inappropriate. A public apology may be +requested. + +2. Warning +---------- + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, for a specified period of +time. This includes avoiding interactions in community spaces as well as +external channels like social media. Violating these terms may lead to a +temporary or permanent ban. + +3. Temporary Ban +---------------- + +**Community Impact**: A serious violation of community standards, +including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No +public or private interaction with the people involved, including +unsolicited interaction with those enforcing the Code of Conduct, is +allowed during this period. Violating these terms may lead to a +permanent ban. + +4. Permanent Ban +---------------- + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of +individuals. + +**Consequence**: A permanent ban from any sort of public interaction +within the community. + +Attribution +=========== + +This Code of Conduct is adapted from the `Contributor +Covenant `__, version 2.0, +available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by `Mozilla’s code of conduct +enforcement ladder `__. + +For answers to common questions about this code of conduct, see the FAQ +at https://www.contributor-covenant.org/faq. Translations are available +at https://www.contributor-covenant.org/translations. + +| [homepage]: https://www.contributor-covenant.org +| [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +| [Mozilla CoC]: https://github.com/mozilla/diversity +| [FAQ]: https://www.contributor-covenant.org/faq +| [translations]: https://www.contributor-covenant.org/translations diff --git a/docs/source/matrixctl.rst b/docs/source/contributer_documentation/commands.rst similarity index 60% rename from docs/source/matrixctl.rst rename to docs/source/contributer_documentation/commands.rst index 84506386..14a6f91d 100644 --- a/docs/source/matrixctl.rst +++ b/docs/source/contributer_documentation/commands.rst @@ -1,11 +1,25 @@ -************************* -Contributer Documentation -************************* +.. + matrixctl + Copyright (c) 2021 Michael Sasser + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. -Subcommands -=========== + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Commands +******** + +Commands are the arguments listed below, e.g. ``adduser`` to create a new user +on the homeserver or ``deploy`` to deploy the ansible playbook. adduser ------- @@ -151,100 +165,5 @@ get-event :undoc-members: :show-inheritance: -Helpers -======= - - -Print ------ - -.. automodule:: matrixctl.print_helpers - :members: - :undoc-members: - :show-inheritance: - -Password --------- - -.. automodule:: matrixctl.password_helpers - :members: - :undoc-members: - :show-inheritance: - - -Typing and Errors -================= - - -Typing ------- - -.. automodule:: matrixctl.typing - :members: - :undoc-members: - :show-inheritance: - -Errors ------- - -.. automodule:: matrixctl.errors - :members: - :undoc-members: - :show-inheritance: - - -The Application -=============== - - -Application ------------ - -.. automodule:: matrixctl.__main__ - :members: - :undoc-members: - :show-inheritance: - - -Handlers -======== - -TOML ----- - -.. automodule:: matrixctl.handlers.toml - :members: - :undoc-members: - :show-inheritance: - -API ---- - -.. automodule:: matrixctl.handlers.api - :members: - :undoc-members: - :show-inheritance: - -Ansible -------- - -.. automodule:: matrixctl.handlers.ansible - :members: - :undoc-members: - :show-inheritance: - -Git ---- - -.. automodule:: matrixctl.handlers.git - :members: - :undoc-members: - :show-inheritance: - -SSH ---- - -.. automodule:: matrixctl.handlers.ssh - :members: - :undoc-members: - :show-inheritance: +.. + vim: set ft=rst : diff --git a/docs/source/contributer_documentation/handlers.rst b/docs/source/contributer_documentation/handlers.rst new file mode 100644 index 00000000..ce1eade4 --- /dev/null +++ b/docs/source/contributer_documentation/handlers.rst @@ -0,0 +1,65 @@ +.. + matrixctl + Copyright (c) 2021 Michael Sasser + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Handlers +******** + +Handlers in MatrixCtl are used to handle the communication between the server +and the :ref:`Commands` or to load config files. + +TOML +---- + +.. automodule:: matrixctl.handlers.toml + :members: + :undoc-members: + :show-inheritance: + +API +--- + +.. automodule:: matrixctl.handlers.api + :members: + :undoc-members: + :show-inheritance: + +Ansible +------- + +.. automodule:: matrixctl.handlers.ansible + :members: + :undoc-members: + :show-inheritance: + +Git +--- + +.. automodule:: matrixctl.handlers.git + :members: + :undoc-members: + :show-inheritance: + +SSH +--- + +.. automodule:: matrixctl.handlers.ssh + :members: + :undoc-members: + :show-inheritance: + +.. + vim: set ft=rst : diff --git a/docs/source/contributer_documentation/helpers.rst b/docs/source/contributer_documentation/helpers.rst new file mode 100644 index 00000000..09dd4929 --- /dev/null +++ b/docs/source/contributer_documentation/helpers.rst @@ -0,0 +1,40 @@ +.. + matrixctl + Copyright (c) 2021 Michael Sasser + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Helpers +******* + +Helpers or helper function are common functions used throughout the project. + +Print +----- + +.. automodule:: matrixctl.print_helpers + :members: + :undoc-members: + :show-inheritance: + +Password +-------- + +.. automodule:: matrixctl.password_helpers + :members: + :undoc-members: + :show-inheritance: + +.. + vim: set ft=rst : diff --git a/docs/source/contributer_documentation/index.rst b/docs/source/contributer_documentation/index.rst new file mode 100644 index 00000000..761e031b --- /dev/null +++ b/docs/source/contributer_documentation/index.rst @@ -0,0 +1,102 @@ +.. + matrixctl + Copyright (c) 2021 Michael Sasser + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +************************* +Contributer Documentation +************************* + +First off, thank you for considering contributing to MatrixCtl. Please make sure +to read our Code of Conduct before you start Contributing to MatrixCtl. + +.. include:: coc.rst + +I found a bug / I want to give feedback +*************************************** + +If you found a bug or you want to give feedback, please create an `issue +`_ using +one of the templates. + +I have a question +***************** + +Please check the +`discussions `_ first. +When you don't find the right thread, feel free to create a new one. + +Add a feature +************* + +.. note:: Before you start make sure you hand in an `issue + `_. + Describe, what you like to change/add, so others are informed, what + you are about to change and why you want to change anything. + +1. Make sure you have at least ``Python 3.9``, + `poetry `_, and + `pre-commit `_ installed. +2. Create a fork of MatrixCtl. +3. Clone the fork (``origin``) to your local machine. +4. Add the original repository as a remote named ``upstream``. +5. Create a new branch from the + `develop branch `_. + Make sure you use the + `git-flow `_ + branching model scheme. (You don't necessarily need ``git-flow``). Example: + Let's say your issue was issue ``#42`` and you want to create a feature. + Your branch name would be ``feature/#42`` or ``feature/#42-my-cool-feature``. +#. Install the required tools with ``poetry install -E docs`` +#. Implement your feature or fix the bug you described in your issue. +#. Create a ``Pull Request`` as soon as possible as ``draft``, so other + contributors are able to help you and follow your progress. +#. Make sure to add/alter the documentation. +#. Add/alter tests, to test your code. +#. Describe your changes in one sentence in a newsfragment in ``./news/``. + You find the categories in the ``pyproject.toml`` under the + ``[tool.towncrier]`` -> ``directory``. Example: Let's say your issue was + issue ``#42`` and you added a bugfix. Give the newsfragment the name + ``42.bugfix``. A feature would be called ``42.feature``. +#. Run ``tox``. If everything is green with no errors, you are good to go. +#. Publish your branch to your fork (``origin``). +#. Create a pull request from the Branch, which contains your changes to + MatrixCtl's ``develop`` branch. +#. Once the pull request is reviewed and merged you can pull the changes from + ``upstream`` (the original repository) to your local repository and start + over again from ``5.``. Don't forget to create an issue first. + +.. note:: Do not add any additional requirement without an approval first. Make + sure to use the provided ``Handlers``, ``Helpers``, ``Errors`` + (``exceptions``) and ``Type Hints``. + +.. note:: If you have any questions feel free to ask in the issues, pull + requests and discussions. + +.. note:: You often can use one if the :ref:`Commands` as template for a new + feature. + +.. toctree:: + :maxdepth: 1 + :caption: Technical Documentation: + + handlers + helpers + type_hints_and_errors + commands + application + +.. + vim: set ft=rst : diff --git a/docs/source/contributer_documentation/type_hints_and_errors.rst b/docs/source/contributer_documentation/type_hints_and_errors.rst new file mode 100644 index 00000000..f2bc6656 --- /dev/null +++ b/docs/source/contributer_documentation/type_hints_and_errors.rst @@ -0,0 +1,46 @@ +.. + matrixctl + Copyright (c) 2021 Michael Sasser + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Type Hints and Errors +********************* + +MatrixCtl is strictly typed to avoid some bugs and help contributors in the +future to easily identify what they are dealing with. They can be used by third +party tools such as type checkers, IDEs, linters, etc. + +MatrixCtl specifies some additional errors. Those errors are informing the +user that, getting a traceback is a bug in this application. +They are giving the person instructions, how to hand in a bug report. + +Type Hints +---------- + +.. automodule:: matrixctl.typehints + :members: + :undoc-members: + :show-inheritance: + +Errors +------ + +.. automodule:: matrixctl.errors + :members: + :undoc-members: + :show-inheritance: + +.. + vim: set ft=rst : diff --git a/docs/source/index.rst b/docs/source/index.rst index f041560c..2265349d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -5,11 +5,12 @@ MatrixCtl documentation .. toctree:: :maxdepth: 2 + :titlesonly: :caption: Contents: installation getting_started/index - matrixctl + contributer_documentation/index changelog Branching Model diff --git a/matrixctl/get_event.py b/matrixctl/get_event.py index 7df3798f..940f9a37 100644 --- a/matrixctl/get_event.py +++ b/matrixctl/get_event.py @@ -21,6 +21,7 @@ import json import logging +import re from argparse import ArgumentParser from argparse import Namespace @@ -30,7 +31,6 @@ from .handlers.ssh import SSH from .handlers.ssh import SSHResponse from .handlers.toml import TOML -from .typing import JsonDict __author__: str = "Michael Sasser" @@ -88,6 +88,15 @@ def get_event(arg: Namespace) -> int: else f"matrix.{toml.get('API', 'Domain')}" ) + is_valid_event_id = re.match(r"^\$[0-9a-zA-Z.=_-]{1,255}$", arg.event_id) + if not is_valid_event_id: + logger.error( + "The given event_id has an invalid format. Please make sure you " + "use one with the correct format. " + "Example: $tjeDdqYAk9BDLAUcniGUy640e_D9TrWU2RmCksJQQEQ" + ) + return 1 + # Workaround because of "$" through: paramiko - bash - psql event64 = b64encode(arg.event_id.encode("utf-8")).decode("utf-8") @@ -110,10 +119,23 @@ def get_event(arg: Namespace) -> int: if response.stdout: start: int = response.stdout.find("{") stop: int = response.stdout.rfind("}") + 1 - - response_parsed: JsonDict = json.loads(response.stdout[start:stop]) - print(json.dumps(response_parsed, indent=4)) - return 0 + logger.debug(f"{start=}, {stop=}") + if start == -1 and stop == 0: # "empty" response + logger.error( + "The event_id was not not in the Database. Please check " + "if you entered the correct one. " + ) + return 1 + try: + print( + json.dumps( + json.loads(response.stdout[start:stop]), indent=4 + ) + ) + return 0 + except json.decoder.JSONDecodeError: + logger.error("Unable to process the response data to JSON.") + return 1 print("The response from the Database was empty.") return 0 logger.error(f"response: {response.stderr}") diff --git a/matrixctl/purge_history.py b/matrixctl/purge_history.py index 513030ee..a5a93c3a 100644 --- a/matrixctl/purge_history.py +++ b/matrixctl/purge_history.py @@ -35,7 +35,7 @@ from .handlers.api import request from .handlers.toml import TOML from .password_helpers import ask_question -from .typing import JsonDict +from .typehints import JsonDict __author__: str = "Michael Sasser" @@ -123,7 +123,7 @@ def handle_purge_status(toml: TOML, purge_id: str) -> int: Returns ------- - response: matrixctl.typing.JsonDict, optional + response: matrixctl.typehints.JsonDict, optional The response as dict, containing the status. """ diff --git a/matrixctl/rooms.py b/matrixctl/rooms.py index e1879e90..be5660d3 100644 --- a/matrixctl/rooms.py +++ b/matrixctl/rooms.py @@ -31,7 +31,7 @@ from .handlers.api import RequestBuilder from .handlers.api import request from .handlers.toml import TOML -from .typing import JsonDict +from .typehints import JsonDict __author__: str = "Michael Sasser" @@ -143,7 +143,7 @@ def print_rooms_table(rooms_list: list[JsonDict]) -> None: Parameters ---------- - rooms_list : list of matrixctl.tping.JsonDict + rooms_list : list of matrixctl.typehints.JsonDict A list of rooms from the API. Returns diff --git a/matrixctl/typing.py b/matrixctl/typehints.py similarity index 88% rename from matrixctl/typing.py rename to matrixctl/typehints.py index 063a65f3..c847a318 100644 --- a/matrixctl/typing.py +++ b/matrixctl/typehints.py @@ -20,8 +20,11 @@ from __future__ import annotations from typing import Any +from typing import Dict -JsonDict = dict[str, Any] +# Needs to be old style to be compatible with Python 3.8 +JsonDict = Dict[str, Any] + # vim: set ft=python : diff --git a/matrixctl/upload.py b/matrixctl/upload.py index 833119be..8b0d7b4c 100644 --- a/matrixctl/upload.py +++ b/matrixctl/upload.py @@ -31,7 +31,7 @@ from .handlers.api import RequestBuilder from .handlers.api import request from .handlers.toml import TOML -from .typing import JsonDict +from .typehints import JsonDict __author__: str = "Michael Sasser" diff --git a/matrixctl/user.py b/matrixctl/user.py index 34e84b54..977ddcf6 100644 --- a/matrixctl/user.py +++ b/matrixctl/user.py @@ -35,7 +35,7 @@ from .handlers.api import request from .handlers.toml import TOML from .print_helpers import human_readable_bool -from .typing import JsonDict +from .typehints import JsonDict __author__: str = "Michael Sasser" diff --git a/matrixctl/users.py b/matrixctl/users.py index ef2b0e0a..5518f22e 100644 --- a/matrixctl/users.py +++ b/matrixctl/users.py @@ -32,7 +32,7 @@ from .handlers.api import request from .handlers.toml import TOML from .print_helpers import human_readable_bool -from .typing import JsonDict +from .typehints import JsonDict __author__: str = "Michael Sasser" diff --git a/matrixctl/version.py b/matrixctl/version.py index 409d1a25..3106338a 100644 --- a/matrixctl/version.py +++ b/matrixctl/version.py @@ -29,7 +29,7 @@ from .handlers.api import RequestBuilder from .handlers.api import request from .handlers.toml import TOML -from .typing import JsonDict +from .typehints import JsonDict __author__: str = "Michael Sasser" diff --git a/poetry.lock b/poetry.lock index 4bfa2d94..0c0e5390 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3,7 +3,7 @@ name = "alabaster" version = "0.7.12" description = "A configurable sidebar-enabled Sphinx theme" category = "main" -optional = true +optional = false python-versions = "*" [[package]] @@ -68,7 +68,7 @@ name = "babel" version = "2.9.1" description = "Internationalization utilities" category = "main" -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] @@ -231,7 +231,7 @@ python-versions = "*" [[package]] name = "docutils" -version = "0.17.1" +version = "0.16" description = "Docutils -- Python Documentation Utilities" category = "main" optional = false @@ -341,7 +341,7 @@ name = "imagesize" version = "1.2.0" description = "Getting image size from png/jpeg/jpeg2000/gif file" category = "main" -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] @@ -658,7 +658,7 @@ name = "pygments" version = "2.9.0" description = "Pygments is a syntax highlighting package written in Python." category = "main" -optional = true +optional = false python-versions = ">=3.5" [[package]] @@ -765,7 +765,7 @@ name = "pytz" version = "2021.1" description = "World timezone definitions, modern and historical" category = "main" -optional = true +optional = false python-versions = "*" [[package]] @@ -839,7 +839,7 @@ name = "sphinx" version = "4.0.2" description = "Python documentation generator" category = "main" -optional = true +optional = false python-versions = ">=3.6" [package.dependencies] @@ -880,12 +880,27 @@ Sphinx = ">=3.0" test = ["pytest (>=3.1.0)", "typing-extensions (>=3.5)", "sphobjinv (>=2.0)", "Sphinx (>=3.2.0)", "dataclasses"] type_comments = ["typed-ast (>=1.4.0)"] +[[package]] +name = "sphinx-rtd-theme" +version = "0.5.2" +description = "Read the Docs theme for Sphinx" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +docutils = "<0.17" +sphinx = "*" + +[package.extras] +dev = ["transifex-client", "sphinxcontrib-httpdomain", "bump2version"] + [[package]] name = "sphinxcontrib-applehelp" version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" category = "main" -optional = true +optional = false python-versions = ">=3.5" [package.extras] @@ -897,7 +912,7 @@ name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." category = "main" -optional = true +optional = false python-versions = ">=3.5" [package.extras] @@ -909,7 +924,7 @@ name = "sphinxcontrib-htmlhelp" version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" category = "main" -optional = true +optional = false python-versions = ">=3.6" [package.extras] @@ -921,7 +936,7 @@ name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" category = "main" -optional = true +optional = false python-versions = ">=3.5" [package.extras] @@ -943,7 +958,7 @@ name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." category = "main" -optional = true +optional = false python-versions = ">=3.5" [package.extras] @@ -955,7 +970,7 @@ name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." category = "main" -optional = true +optional = false python-versions = ">=3.5" [package.extras] @@ -1171,8 +1186,8 @@ docs = ["sphinx", "sphinx-autodoc-typehints", "numpydoc", "sphinxcontrib-program [metadata] lock-version = "1.1" -python-versions = "^3.9" -content-hash = "4396602b3d11cb8ce58b201ebd1d91097590aad3100db2446e9d523e04bb5d8c" +python-versions = "^3.8" +content-hash = "bc69c143a80fc372a5b1bd1c9ff0a5b844249558674e75607aaa18e813ff2709" [metadata.files] alabaster = [ @@ -1355,8 +1370,8 @@ distlib = [ {file = "distlib-0.3.2.zip", hash = "sha256:106fef6dc37dd8c0e2c0a60d3fca3e77460a48907f335fa28420463a6f799736"}, ] docutils = [ - {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, - {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, + {file = "docutils-0.16-py2.py3-none-any.whl", hash = "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af"}, + {file = "docutils-0.16.tar.gz", hash = "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc"}, ] filelock = [ {file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"}, @@ -1825,6 +1840,10 @@ sphinx-autodoc-typehints = [ {file = "sphinx-autodoc-typehints-1.12.0.tar.gz", hash = "sha256:193617d9dbe0847281b1399d369e74e34cd959c82e02c7efde077fca908a9f52"}, {file = "sphinx_autodoc_typehints-1.12.0-py3-none-any.whl", hash = "sha256:5e81776ec422dd168d688ab60f034fccfafbcd94329e9537712c93003bddc04a"}, ] +sphinx-rtd-theme = [ + {file = "sphinx_rtd_theme-0.5.2-py2.py3-none-any.whl", hash = "sha256:4a05bdbe8b1446d77a01e20a23ebc6777c74f43237035e76be89699308987d6f"}, + {file = "sphinx_rtd_theme-0.5.2.tar.gz", hash = "sha256:32bd3b5d13dc8186d7a42fc816a23d32e83a4827d7d9882948e7b837c232da5a"}, +] sphinxcontrib-applehelp = [ {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, diff --git a/pyproject.toml b/pyproject.toml index a8c92345..69c192c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "matrixctl" -version = "0.10.2" +version = "0.10.3" description = "Controls a synapse oci-container instance via ansible" license = "GPL-3.0-or-later" readme = "README.md" @@ -26,7 +26,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.9" +python = "^3.8" requests = "^2.25.1" GitPython = "^3.1.14" coloredlogs = "^15.0.1" @@ -40,9 +40,10 @@ sphinx = { version = ">=3.5.1,<5.0.0", optional = true } sphinx-autodoc-typehints = { version = "^1.12.0", optional = true } sphinxcontrib-programoutput = { version = ">=0.16,<0.18", optional = true } numpydoc = { version = "^1.1.0", optional = true } +sphinx-rtd-theme = { version = "^0.5.2", optional = true } [tool.poetry.extras] -docs = ["sphinx", "sphinx-autodoc-typehints", "numpydoc", "sphinxcontrib-programoutput"] +docs = ["sphinx", "sphinx-autodoc-typehints", "numpydoc", "sphinxcontrib-programoutput", "sphinx-rtd-theme"] [tool.poetry.dev-dependencies] pre-commit = "^2.13.0" @@ -192,7 +193,7 @@ template = "news/templates/default.rst" [[tool.towncrier.type]] directory = "removal" - name = "Removals and Deprecations" + name = "Removals & Deprecations" showcontent = true [[tool.towncrier.type]]