Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into pr/400
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Aug 23, 2024
2 parents 38ad303 + 103c756 commit 38571ea
Show file tree
Hide file tree
Showing 81 changed files with 2,907 additions and 1,917 deletions.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Bug Report
description: Create a report to help us improve.
labels: ["bug"]
body:
- type: textarea
attributes:
label: Current Situation
description: Discuss what the current issue is, how to reproduce, and link to any relevant prior discussion/context.
validations:
required: true
- type: textarea
attributes:
label: Proposed Actions
description: Describe what ought to be done, and why that will address the reasons for action mentioned above.
validations:
required: false
- type: textarea
attributes:
label: System Information
description: Versions for things such as... Django-dbbackup, Python, Django, Operating System, etc.
validations:
required: false
35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Feature request
description: Suggest an idea for this project.
labels: ["feature-request"]
body:
- type: textarea
attributes:
label: Feature description
description: Describe what the feature is, why it is needed, and link any relevant prior discussion/context.
validations:
required: true
- type: textarea
attributes:
label: Alternatives options
description: Describe any alternatives to this feature, and why they were not chosen.
validations:
required: false
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

17 changes: 8 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Type of PR (feature, enhancement, bug fix, etc.)

## Description

Please include a summary of the change and which issue is fixed.

Fixes # (issue)
<!-- A summary of the changes. -->

## Why should this be added
## Checklist

Explain value.
Please update this checklist as you complete each item:

## Checklist
- [ ] Tests have been developed for bug fixes or new functionality.
- [ ] The changelog has been updated, if necessary.
- [ ] Documentation has been updated, if necessary.
- [ ] GitHub Issues closed by this PR have been linked.

- [ ] Documentation has been added or amended for this feature / update
<sub>By submitting this pull request I agree that all contributions comply with this project's open source license(s).</sub>
63 changes: 33 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
---
name: Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/tests.txt
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Linting
run: flake8
# Environments are selected using tox-gh-actions configuration in tox.ini.
- name: Test with tox
run: tox
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }} Codecov
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/tests.txt
python -m pip install -r requirements.txt
# TODO: Remove this conditional when Python 3.7 is dropped and Flake8 executes on
# all Python versions in matrix.
- if: matrix.python-version == '3.8'
name: Linting
run: flake8
# Environments are selected using tox-gh-actions configuration in tox.ini.
- name: Test with tox
run: tox -r
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
name: Python ${{ matrix.python-version }} Codecov
77 changes: 46 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
name: Publish PyPI Release
---
name: Publish PyPI Release (BROKEN)

on:
release:
types: [published]
release:
types: [published]

jobs:
release-package:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
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@master
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
repository_url: https://jazzband.co/projects/django-dbbackup/upload
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

# 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/*
63 changes: 62 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,66 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.1.0"
rev: "v4.6.0"
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: ^docs/[^/]*\.svg$
- id: requirements-txt-fixer
- id: trailing-whitespace
types: [python]
- id: check-case-conflict
- id: check-json
- id: check-xml
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: check-added-large-files
- id: check-symlinks
- id: debug-statements
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- id: detect-private-key
exclude: ^examples|(?:tests/ssl)/
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
hooks:
- id: pycln
args: ["--all"]
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/pycqa/isort
rev: "5.13.2"
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: "24.8.0"
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: "v3.17.0"
hooks:
- id: pyupgrade
args: ["--py37-plus", "--keep-mock"]
- repo: https://github.com/hhatto/autopep8
rev: "v2.3.1"
hooks:
- id: autopep8
- repo: https://github.com/PyCQA/flake8
rev: "7.1.1"
hooks:
- id: flake8
exclude: "^docs/"
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: "v1.0.1"
hooks:
- id: rst-linter
files: ^[^/]+[.]rst$
- repo: https://github.com/adrienverge/yamllint
rev: "v1.35.1"
hooks:
- id: yamllint
14 changes: 1 addition & 13 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@
# path. You may set this option multiple times.
ignore=test


# Pickle collected data for later comparisons.
persistent=yes

# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=


[MESSAGES CONTROL]
disable=redefined-builtin,too-many-arguments,too-few-public-methods,missing-docstring,invalid-name,abstract-method,no-self-use

disable=broad-except, fixme, missing-module-docstring, missing-class-docstring, missing-function-docstring, too-many-arguments, too-few-public-methods, abstract-method

[TYPECHECK]
# List of members which are set dynamically and missed by pylint inference
Expand All @@ -23,13 +16,8 @@ disable=redefined-builtin,too-many-arguments,too-few-public-methods,missing-docs
generated-members=async_request,objects

[VARIABLES]

# Tells wether we should check for unused import in __init__ files.
init-import=no

# A regular expression matching names used for dummy variables (i.e. not used).
dummy-variables-rgx=_|dummy

# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=
Loading

0 comments on commit 38571ea

Please sign in to comment.