From 1286c5f813494de6783df7d3eef5352e8b04bfd0 Mon Sep 17 00:00:00 2001 From: Samuel Giffard Date: Thu, 12 Oct 2023 10:53:53 +0200 Subject: [PATCH 1/4] Fix links in README Signed-off-by: Samuel Giffard --- README.rst | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/README.rst b/README.rst index 3e7b8afb..fec67340 100644 --- a/README.rst +++ b/README.rst @@ -1,13 +1,15 @@ -.. image:: logo.png +.. image:: https://raw.githubusercontent.com/Aiven-Open/rohmu/main/logo.png + :alt: Rohmu logo + :align: center Rohmu is a Python library for building backup tools for databases providing functionality for compression, encryption and transferring data between the database and an object storage. Rohmu supports main public clouds such as GCP, AWS and Azure for backup storage. Rohmu is used in various backup tools such as -`PGHoard `__ for PostgreSQL, -`MyHoard `__ for MySQL and -`Astacus `__ for M3 and ClickHouse and +`PGHoard `__ for PostgreSQL, +`MyHoard `__ for MySQL and +`Astacus `__ for M3 and ClickHouse and other databases. Features @@ -15,7 +17,7 @@ Features - Supported object storages: Azure, GCP, S3, Swift (OpenStack), local file storage and SFTP. -- Supported compression algorithms: Snappy, +- Supported compression algorithms: `Snappy `__, `zstd `__ and `lzma `__. @@ -24,7 +26,7 @@ Requirements Rohmu requires Python >= 3.8. For Python library dependencies, have a look at -`requirements.txt `__. +`setup.cfg `__. Usage example ============= @@ -32,7 +34,7 @@ Usage example *Add usage example here* For real-world usage you can have a look at `how Rohmu is used in -PGHoard `__. +PGHoard `__. Development =========== @@ -43,7 +45,7 @@ License ======= Rohmu is licensed under the Apache license, version 2.0. Full license -text is available in the `LICENSE `__ file. +text is available in the `LICENSE `__ file. Please note that the project explicitly does not require a CLA (Contributor License Agreement) from its contributors. @@ -63,7 +65,7 @@ Rohmu was created by and is maintained by `Aiven `__. Rohmu was originally a part of `PGHoard -`__ but was later extracted to its +`__ but was later extracted to its own GitHub project. The Rohmu logo was created by `@evche-aiven @@ -73,11 +75,11 @@ Contact ======= Bug reports and patches are very welcome, please post them as GitHub -issues and pull requests at https://github.com/aiven/rohmu . To report +issues and pull requests at https://github.com/Aiven-Open/rohmu . To report any possible vulnerabilities or other serious issues please see our -`security `__ policy. +`security `__ policy. Copyright ========= -Copyright (C) 2022 Aiven Ltd and contributors to the Rohmu project. +Copyright (C) 2023 Aiven Ltd and contributors to the Rohmu project. From e5ed54885af3b7c715426df626675d10294885b7 Mon Sep 17 00:00:00 2001 From: Samuel Giffard Date: Thu, 12 Oct 2023 11:00:45 +0200 Subject: [PATCH 2/4] Add badges to README Signed-off-by: Samuel Giffard --- README.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.rst b/README.rst index fec67340..37ec7e81 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,9 @@ :alt: Rohmu logo :align: center +|Build badge| |PyPI badge| |Python versions badge| + + Rohmu is a Python library for building backup tools for databases providing functionality for compression, encryption and transferring data between the database and an object storage. Rohmu supports main @@ -83,3 +86,13 @@ Copyright ========= Copyright (C) 2023 Aiven Ltd and contributors to the Rohmu project. + +.. |Build badge| image:: https://github.com/Aiven-Open/rohmu/actions/workflows/build.yml/badge.svg + :target: https://github.com/Aiven-Open/rohmu/actions + :alt: Build status + +.. |PyPI badge| image:: https://img.shields.io/pypi/v/rohmu.svg + :target: https://pypi.org/project/rohmu/ + :alt: PyPI version + +.. |Python versions badge| image:: https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue From 0bff6b4f4f29b48961b09e593855eb8b0774744b Mon Sep 17 00:00:00 2001 From: Samuel Giffard Date: Thu, 12 Oct 2023 12:15:57 +0200 Subject: [PATCH 3/4] Clean all the links. This improves readability on text-only. Modern text-processors also show whenever a link is broken or used twice. Updating one reference updates all of its usages, ensuring consistency. Signed-off-by: Samuel Giffard --- README.rst | 86 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/README.rst b/README.rst index 37ec7e81..a8608c3d 100644 --- a/README.rst +++ b/README.rst @@ -1,43 +1,26 @@ -.. image:: https://raw.githubusercontent.com/Aiven-Open/rohmu/main/logo.png - :alt: Rohmu logo - :align: center +|Rohmu logo| |Build badge| |PyPI badge| |Python versions badge| - -Rohmu is a Python library for building backup tools for databases -providing functionality for compression, encryption and transferring -data between the database and an object storage. Rohmu supports main -public clouds such as GCP, AWS and Azure for backup storage. Rohmu is -used in various backup tools such as -`PGHoard `__ for PostgreSQL, -`MyHoard `__ for MySQL and -`Astacus `__ for M3 and ClickHouse and -other databases. +Rohmu is a Python library for building backup tools for databases providing functionality for compression, encryption, and transferring data between the database and an object storage. Rohmu supports main public clouds such as GCP, AWS, and Azure for backup storage. Rohmu is used in various backup tools such as `PGHoard`_ for PostgreSQL, `MyHoard`_ for MySQL, and `Astacus`_ for M3, ClickHouse, and other databases. Features ======== -- Supported object storages: Azure, GCP, S3, Swift (OpenStack), local - file storage and SFTP. -- Supported compression algorithms: `Snappy `__, - `zstd `__ and - `lzma `__. +- Supported object storages: Azure, GCP, S3, Swift (OpenStack), local file storage, and SFTP. +- Supported compression algorithms: `Snappy`_, `zstd`_, and `lzma`_. Requirements ============ -Rohmu requires Python >= 3.8. For Python library dependencies, have a -look at -`setup.cfg `__. +Rohmu requires Python >= 3.8. For Python library dependencies, refer to `setup.cfg`_. Usage example ============= *Add usage example here* -For real-world usage you can have a look at `how Rohmu is used in -PGHoard `__. +For real-world usage, see `how Rohmu is used in PGHoard`_. Development =========== @@ -47,11 +30,9 @@ Development License ======= -Rohmu is licensed under the Apache license, version 2.0. Full license -text is available in the `LICENSE `__ file. +Rohmu is licensed under the Apache license, version 2.0. Full license text is available in the `LICENSE`_ file. -Please note that the project explicitly does not require a CLA -(Contributor License Agreement) from its contributors. +Please note that the project explicitly does not require a CLA (Contributor License Agreement) from its contributors. Trademarks ========== @@ -64,29 +45,58 @@ endorsement. Credits ======= -Rohmu was created by and is maintained by `Aiven -`__. +Rohmu was created by and is maintained by `Aiven`_. -Rohmu was originally a part of `PGHoard -`__ but was later extracted to its -own GitHub project. +Rohmu was originally a part of `PGHoard`_ but was later extracted to its own GitHub project. -The Rohmu logo was created by `@evche-aiven -`__. +The Rohmu logo was created by `@evche-aiven`_. Contact ======= -Bug reports and patches are very welcome, please post them as GitHub -issues and pull requests at https://github.com/Aiven-Open/rohmu . To report -any possible vulnerabilities or other serious issues please see our -`security `__ policy. +Bug reports and patches are very welcome; please post them as GitHub issues and pull requests at `rohmu_repo`_. To report any possible vulnerabilities or other serious issues, please see our `security`_ policy. + Copyright ========= Copyright (C) 2023 Aiven Ltd and contributors to the Rohmu project. +.. + --------- Links --------- + +.. _rohmu_repo: https://github.com/Aiven-Open/rohmu + +.. _PGHoard: https://github.com/Aiven-Open/pghoard + +.. _MyHoard: https://github.com/Aiven-Open/myhoard + +.. _Astacus: https://github.com/Aiven-Open/astacus + +.. _Snappy: https://github.com/andrix/python-snappy + +.. _zstd: https://github.com/facebook/zstd + +.. _lzma: https://docs.python.org/3/library/lzma.html + +.. _setup.cfg: https://github.com/Aiven-Open/rohmu/blob/main/setup.cfg + +.. _how Rohmu is used in PGHoard: https://github.com/Aiven-Open/pghoard/tree/main/pghoard/basebackup + +.. _LICENSE: https://github.com/Aiven-Open/rohmu/blob/main/LICENSE + +.. _Aiven: https://aiven.io + +.. _@evche-aiven: https://github.com/evche-aiven + +.. _security: https://github.com/Aiven-Open/rohmu/blob/main/SECURITY.md + +.. + --------- Badges & Images --------- + +.. |Rohmu logo| image:: https://raw.githubusercontent.com/Aiven-Open/rohmu/main/logo.png + :alt: Rohmu logo + .. |Build badge| image:: https://github.com/Aiven-Open/rohmu/actions/workflows/build.yml/badge.svg :target: https://github.com/Aiven-Open/rohmu/actions :alt: Build status From 1d0c248ed966c7fc925387ae8cba023fafe1d598 Mon Sep 17 00:00:00 2001 From: Samuel Giffard Date: Thu, 12 Oct 2023 12:37:17 +0200 Subject: [PATCH 4/4] Add tool `rstfmt` to auto-format ReST Signed-off-by: Samuel Giffard --- Makefile | 1 + README.rst | 112 ++++++++++++++++++++++++------------------- requirements.dev.txt | 1 + 3 files changed, 65 insertions(+), 49 deletions(-) diff --git a/Makefile b/Makefile index 5bde369f..b6a36882 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,7 @@ mypy: fmt: isort $(PYTHON_SOURCE_DIRS) black $(PYTHON_SOURCE_DIRS) + $(PYTHON) -m rstfmt README.rst -w 100 .PHONY: coverage coverage: diff --git a/README.rst b/README.rst index a8608c3d..ee982dc0 100644 --- a/README.rst +++ b/README.rst @@ -2,107 +2,121 @@ |Build badge| |PyPI badge| |Python versions badge| -Rohmu is a Python library for building backup tools for databases providing functionality for compression, encryption, and transferring data between the database and an object storage. Rohmu supports main public clouds such as GCP, AWS, and Azure for backup storage. Rohmu is used in various backup tools such as `PGHoard`_ for PostgreSQL, `MyHoard`_ for MySQL, and `Astacus`_ for M3, ClickHouse, and other databases. +Rohmu is a Python library for building backup tools for databases providing functionality for +compression, encryption, and transferring data between the database and an object storage. Rohmu +supports main public clouds such as GCP, AWS, and Azure for backup storage. Rohmu is used in various +backup tools such as PGHoard_ for PostgreSQL, MyHoard_ for MySQL, and Astacus_ for M3, ClickHouse, +and other databases. -Features -======== +########## + Features +########## -- Supported object storages: Azure, GCP, S3, Swift (OpenStack), local file storage, and SFTP. -- Supported compression algorithms: `Snappy`_, `zstd`_, and `lzma`_. +- Supported object storages: Azure, GCP, S3, Swift (OpenStack), local file storage, and SFTP. +- Supported compression algorithms: Snappy_, zstd_, and lzma_. -Requirements -============ +############## + Requirements +############## -Rohmu requires Python >= 3.8. For Python library dependencies, refer to `setup.cfg`_. +Rohmu requires Python >= 3.8. For Python library dependencies, refer to setup.cfg_. -Usage example -============= +############### + Usage example +############### *Add usage example here* For real-world usage, see `how Rohmu is used in PGHoard`_. -Development -=========== +############# + Development +############# *TODO* -License -======= +######### + License +######### -Rohmu is licensed under the Apache license, version 2.0. Full license text is available in the `LICENSE`_ file. +Rohmu is licensed under the Apache license, version 2.0. Full license text is available in the +LICENSE_ file. -Please note that the project explicitly does not require a CLA (Contributor License Agreement) from its contributors. +Please note that the project explicitly does not require a CLA (Contributor License Agreement) from +its contributors. -Trademarks -========== +############ + Trademarks +############ -PostgreSQL, MySQL, M3 and ClickHouse are trademarks and property of -their respective owners. All product and service names used in this -website are for identification purposes only and do not imply +PostgreSQL, MySQL, M3 and ClickHouse are trademarks and property of their respective owners. All +product and service names used in this website are for identification purposes only and do not imply endorsement. -Credits -======= +######### + Credits +######### -Rohmu was created by and is maintained by `Aiven`_. +Rohmu was created by and is maintained by Aiven_. -Rohmu was originally a part of `PGHoard`_ but was later extracted to its own GitHub project. +Rohmu was originally a part of PGHoard_ but was later extracted to its own GitHub project. The Rohmu logo was created by `@evche-aiven`_. -Contact -======= +######### + Contact +######### -Bug reports and patches are very welcome; please post them as GitHub issues and pull requests at `rohmu_repo`_. To report any possible vulnerabilities or other serious issues, please see our `security`_ policy. +Bug reports and patches are very welcome; please post them as GitHub issues and pull requests at +rohmu_repo_. To report any possible vulnerabilities or other serious issues, please see our +security_ policy. - -Copyright -========= +########### + Copyright +########### Copyright (C) 2023 Aiven Ltd and contributors to the Rohmu project. .. - --------- Links --------- - -.. _rohmu_repo: https://github.com/Aiven-Open/rohmu + --------- Links --------- -.. _PGHoard: https://github.com/Aiven-Open/pghoard +.. _@evche-aiven: https://github.com/evche-aiven -.. _MyHoard: https://github.com/Aiven-Open/myhoard +.. _aiven: https://aiven.io -.. _Astacus: https://github.com/Aiven-Open/astacus +.. _astacus: https://github.com/Aiven-Open/astacus -.. _Snappy: https://github.com/andrix/python-snappy +.. _how rohmu is used in pghoard: https://github.com/Aiven-Open/pghoard/tree/main/pghoard/basebackup -.. _zstd: https://github.com/facebook/zstd +.. _license: https://github.com/Aiven-Open/rohmu/blob/main/LICENSE .. _lzma: https://docs.python.org/3/library/lzma.html -.. _setup.cfg: https://github.com/Aiven-Open/rohmu/blob/main/setup.cfg +.. _myhoard: https://github.com/Aiven-Open/myhoard -.. _how Rohmu is used in PGHoard: https://github.com/Aiven-Open/pghoard/tree/main/pghoard/basebackup +.. _pghoard: https://github.com/Aiven-Open/pghoard -.. _LICENSE: https://github.com/Aiven-Open/rohmu/blob/main/LICENSE +.. _rohmu_repo: https://github.com/Aiven-Open/rohmu -.. _Aiven: https://aiven.io +.. _security: https://github.com/Aiven-Open/rohmu/blob/main/SECURITY.md -.. _@evche-aiven: https://github.com/evche-aiven +.. _setup.cfg: https://github.com/Aiven-Open/rohmu/blob/main/setup.cfg -.. _security: https://github.com/Aiven-Open/rohmu/blob/main/SECURITY.md +.. _snappy: https://github.com/andrix/python-snappy + +.. _zstd: https://github.com/facebook/zstd .. - --------- Badges & Images --------- + --------- Badges & Images --------- .. |Rohmu logo| image:: https://raw.githubusercontent.com/Aiven-Open/rohmu/main/logo.png - :alt: Rohmu logo .. |Build badge| image:: https://github.com/Aiven-Open/rohmu/actions/workflows/build.yml/badge.svg - :target: https://github.com/Aiven-Open/rohmu/actions :alt: Build status + :target: https://github.com/Aiven-Open/rohmu/actions .. |PyPI badge| image:: https://img.shields.io/pypi/v/rohmu.svg - :target: https://pypi.org/project/rohmu/ :alt: PyPI version + :target: https://pypi.org/project/rohmu/ .. |Python versions badge| image:: https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue diff --git a/requirements.dev.txt b/requirements.dev.txt index 3c5267f6..27f2f73b 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -13,6 +13,7 @@ pytest-cov pytest-mock pytest-timeout pytest-asyncio +rstfmt types-python-dateutil types-paramiko types-botocore