From 4ee70d4cbccd372ab0ccb575b51b57e5fd72e26d Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:51:59 -0700 Subject: [PATCH 1/2] Fix docs workflow --- .github/workflows/release.yml | 88 +++++++++++++++++++++-------------- .readthedocs.yaml | 34 ++++++++++++++ docs/changelog.rst | 4 +- setup.py | 1 + 4 files changed, 89 insertions(+), 38 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 243fd0ad..f1b9b1af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,36 +1,52 @@ ---- -name: Publish PyPI Release - -on: - release: - types: [published] - -jobs: - release-package: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Install dependencies - run: | - python -m pip install -U pip - python -m pip install -r requirements/build.txt - python -m pip install -r requirements.txt - - - name: Build package - run: | - python -m build --sdist --wheel --outdir dist . - twine check dist/* - - - name: Upload packages to Jazzband - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: jazzband - password: ${{ secrets.JAZZBAND_RELEASE_KEY }} - repository-url: https://jazzband.co/projects/django-dbbackup/upload +# This workflopw is disabled due to the following error: +# +# ERROR HTTPError: 500 Internal Server Error from +# https://jazzband.co/projects/django-dbbackup/upload +# INTERNAL SERVER ERROR + +# Until we are transfered out of Jazzband, the workaround is releasing manually via personal PyPI accounts. +# The following steps are required to release a new version of the package: +# python -m pip install -U pip +# python -m pip install -U -r requirements/build.txt +# python -m pip install -U -r requirements.txt +# python -m build --sdist --wheel --outdir dist . +# twine check dist/* +# twine upload dist/* + +# --- +# name: Publish PyPI Release + +# on: +# release: +# types: [published] + +# jobs: +# release-package: +# runs-on: ubuntu-latest + +# steps: +# - uses: actions/checkout@v4 + +# - name: Set up Python +# uses: actions/setup-python@v5 +# with: +# python-version: "3.x" + +# - name: Install dependencies +# run: | +# python -m pip install -U pip +# python -m pip install -U -r requirements/build.txt +# python -m pip install -U -r requirements.txt + +# - name: Build package +# run: | +# python -m build --sdist --wheel --outdir dist . +# twine check dist/* + +# - name: Upload packages to Jazzband +# uses: pypa/gh-action-pypi-publish@release/v1 +# with: +# user: jazzband +# password: ${{ secrets.JAZZBAND_RELEASE_KEY }} +# repository-url: https://jazzband.co/projects/django-dbbackup/upload + diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..d5599407 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,34 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: requirements/docs.txt diff --git a/docs/changelog.rst b/docs/changelog.rst index 672c6021..88fbda35 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -9,8 +9,8 @@ Unreleased 4.2.0 (2024-08-22) ------------------ -* Default HOST to localhost for postgres databases. https://github.com/jazzband/django-dbbackup/issues/520 -* Add PostgreSQL Schema support by @angryfoxx in https://github.com/jazzband/django-dbbackup/pull/507 +* Default HOST to localhost for postgres databases. +* Add PostgreSQL Schema support * Fix restore of database from S3 storage by reintroducing inputfile.seek(0) to utils.uncompress_file * Add warning for filenames with slashes in them * Fix bug where dbbackup management command would not respect settings.py:DBBACKUP_DATABASES diff --git a/setup.py b/setup.py index c60490c2..7073eae4 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ def get_test_requirements(): author="Archmonger", author_email="archiethemonger@gmail.com", long_description=(root_dir / "README.rst").read_text(encoding="utf-8"), + long_description_content_type="text/x-rst", python_requires=">=3.7", install_requires=get_requirements(), tests_require=get_test_requirements(), From e91bbdf020de3c287da91f4457094b6bbbced24f Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:55:49 -0700 Subject: [PATCH 2/2] Different way of disabling the workflow --- .github/workflows/release.yml | 50 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1b9b1af..c3de9878 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,32 +1,16 @@ -# This workflopw is disabled due to the following error: -# -# ERROR HTTPError: 500 Internal Server Error from -# https://jazzband.co/projects/django-dbbackup/upload -# INTERNAL SERVER ERROR - -# Until we are transfered out of Jazzband, the workaround is releasing manually via personal PyPI accounts. -# The following steps are required to release a new version of the package: -# python -m pip install -U pip -# python -m pip install -U -r requirements/build.txt -# python -m pip install -U -r requirements.txt -# python -m build --sdist --wheel --outdir dist . -# twine check dist/* -# twine upload dist/* - -# --- -# name: Publish PyPI Release +--- +name: Publish PyPI Release (BROKEN) -# on: -# release: -# types: [published] +on: + release: + types: [published] -# jobs: -# release-package: -# runs-on: ubuntu-latest - -# steps: -# - uses: actions/checkout@v4 +jobs: + release-package: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 # - name: Set up Python # uses: actions/setup-python@v5 # with: @@ -50,3 +34,17 @@ # password: ${{ secrets.JAZZBAND_RELEASE_KEY }} # repository-url: https://jazzband.co/projects/django-dbbackup/upload +# This workflopw is disabled due to the following error: +# +# ERROR HTTPError: 500 Internal Server Error from +# https://jazzband.co/projects/django-dbbackup/upload +# INTERNAL SERVER ERROR + +# Until we are transfered out of Jazzband, the workaround is releasing manually via personal PyPI accounts. +# The following steps are required to release a new version of the package: +# python -m pip install -U pip +# python -m pip install -U -r requirements/build.txt +# python -m pip install -U -r requirements.txt +# python -m build --sdist --wheel --outdir dist . +# twine check dist/* +# twine upload dist/*