Skip to content
Snippets Groups Projects
Commit 580f0727 authored by Michael Fladischer's avatar Michael Fladischer
Browse files

importing python-django-structlog_8.1.0.orig.tar.gz

parents
Branches
Tags upstream/8.1.0
No related merge requests found
Showing
with 486 additions and 0 deletions
.*
!.env
!.pylintrc
/logs/
root = true
[*.{html,css,js}]
indent_style = space
indent_size = 2
# RabbitMQ
# ------------------------------------------------------------------------------
CELERY_BROKER_URL=amqp://admin:unsecure-password@rabbit:5672
# General
# ------------------------------------------------------------------------------
USE_DOCKER=yes
IPYTHONDIR=/app/.ipython
# Celery
# ------------------------------------------------------------------------------
CELERY_RESULT_BACKEND="redis://redis:6379/0"
# Flower
CELERY_FLOWER_USER=debug
CELERY_FLOWER_PASSWORD=debug
# PostgreSQL
# ------------------------------------------------------------------------------
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=django_structlog_demo_project
POSTGRES_USER=debug
POSTGRES_PASSWORD=debug
# Redis
# ------------------------------------------------------------------------------
CELERY_BROKER_URL=redis://redis:6379/0
* text=auto
version: 2
updates:
- package-ecosystem: pip
directory: "/requirements"
schedule:
interval: weekly
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: pip
directory: "/docs"
schedule:
interval: weekly
name: gh-pages
on:
workflow_run:
workflows: ["ci"]
branches: [main]
types:
- completed
jobs:
deploy-gh-pages:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install ghp-import
- name: make html
working-directory: docs
run: make html
- name: Deploy Documentation
run: |
pip install ghp-import
ghp-import -n -p -m "Documentation git hash $(git rev-parse --short HEAD)" -f docs/_build/html
name: ci
on:
push:
branches:
- main
- release/**
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+.dev[0-9]+'
pull_request: {}
jobs:
test-demo-app:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '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 }}
cache: pip
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Start Redis
uses: supercharge/redis-github-action@1.8.0
- name: Test demo app
env:
CELERY_BROKER_URL: redis://0.0.0.0:6379
DJANGO_SETTINGS_MODULE: config.settings.test_demo_app
run: pytest --cov=./django_structlog_demo_project --cov-append django_structlog_demo_project
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '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 }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools
python -m pip install tox tox-gh-actions
- name: Start Redis
uses: supercharge/redis-github-action@1.8.0
- name: Test with tox
run: tox
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-docs:
needs:
- test-demo-app
- test
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.12'
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: make html
working-directory: docs
run: make html
- name: make doctest
working-directory: docs
run: make doctest
black:
needs:
- test-demo-app
- test
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.12'
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/black.txt
- name: run black
run: black --check --verbose .
ruff:
needs:
- test-demo-app
- test
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.12'
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/ruff.txt
- name: run ruff
run: ruff check .
test-install-base:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '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 }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools
python -m pip install .
- name: Import django_structlog modules
run: |
python -c "import django_structlog"
python -c "import django_structlog.apps"
python -c "import django_structlog.signals"
python -c "import django_structlog.app_settings"
python -c "import django_structlog.middlewares.request"
test-install-celery:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '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 }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools
python -m pip install .[celery]
- name: Import django_structlog modules
run: |
python -c "import django_structlog"
python -c "import django_structlog.apps"
python -c "import django_structlog.signals"
python -c "import django_structlog.app_settings"
python -c "import django_structlog.middlewares.request"
- name: Import django_structlog celery modules
run: |
python -c "import django_structlog.celery.receivers"
python -c "import django_structlog.celery.steps"
python -c "import django_structlog.celery.signals"
test-install-commands:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '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 }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools
python -m pip install .[commands]
- name: Import django_structlog modules
run: |
python -c "import django_structlog"
python -c "import django_structlog.apps"
python -c "import django_structlog.signals"
python -c "import django_structlog.app_settings"
python -c "import django_structlog.middlewares.request"
- name: Import django_structlog commands modules
run: |
python -c "import django_structlog.commands"
pypi-deployment:
needs:
- test-docs
- test-install-base
- test-install-celery
- test-install-commands
- black
- ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U -q build
- name: build sdist
run: python -m build --sdist
- name: build wheel
run: python -m build --wheel
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_DEPLOYMENT_KEY }}
name: pre-commit auto-update
on:
# every monday at 11am utc
schedule:
- cron: "0 11 * * 1"
# on demand
workflow_dispatch:
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- uses: browniebroke/pre-commit-autoupdate-action@v1.0.0
- uses: peter-evans/create-pull-request@v6.0.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-hooks
title: Update pre-commit hooks
commit-message: "chore: update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version.
#base: ${{ github.head_ref }}
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="config/settings/test.py" />
<option name="manageScript" value="manage.py" />
<option name="environment" value="&lt;map/&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ourVersions">
<value>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="3.8" />
<item index="1" class="java.lang.String" itemvalue="3.9" />
<item index="2" class="java.lang.String" itemvalue="3.10" />
<item index="3" class="java.lang.String" itemvalue="3.11" />
<item index="4" class="java.lang.String" itemvalue="3.12" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N803" />
</list>
</option>
<option name="ignoredBaseClasses">
<list>
<option value="unittest.TestCase" />
<option value="unittest.case.TestCase" />
<option value="django.test.testcases.TestCase" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyStubPackagesAdvertiser" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<list>
<option value="djangorestframework" />
</list>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/django-structlog.iml" filepath="$PROJECT_DIR$/.idea/django-structlog.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
repos:
- repo: https://github.com/ambv/black
rev: 24.4.2
hooks:
- id: black
language_version: python3
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
MIT License
Copyright (c) 2020 Jules Robichaud-Gagnon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
include LICENSE.rst
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment