Skip to content

Commit

Permalink
📦 Release 1.1.0
Browse files Browse the repository at this point in the history
* Bump babel from 2.9.0 to 2.9.1 in /testproj (#8)

Bumps [babel](https://github.com/python-babel/babel) from 2.9.0 to 2.9.1.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES)
- [Commits](python-babel/babel@v2.9.0...v2.9.1)

---
updated-dependencies:
- dependency-name: babel
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add parenthesis () in front of lru_cache decorator (#7)

Make compatible with latest Python

* Improved conf handling (#9)

* Improved tests (#11)

* Create django.yml (#12)

* Create django.yml

* Improved pip requirements

* Removed django 4 from CI

* Added DRF to testing matrix

* Excluded test for incompatible DRF 3.10 and django 3.1+

* Fixed incorrect yaml for test action

* Create codeql-analysis.yml (#14)

* Update codeql-analysis.yml

* Create pylint.yml (#15)

* Update issue templates

* Create pylint.yml

* Update pylint.yml

* Improved pylint workflow

* Added pylint config

* Removed unnecessary comment in description.md

* Fixed typo in pylint.yml

* Changed pylint workflow to on pull request

* Added django to installed packages in pylint.yml

* Added pip requirements for pylint.yml

* Fixed pip requirements for pylint.yml

* Fixed test project lint command pylint.yml

* Improved tests (#16)

* 🆕 Support for Django 3.2

* 👀 Fixed issues for marking messages as read

When listing messages, sometimes messages that were not returned marked as read.
When retrieving a message, it was not marked as read.

* 🧪 Improved tests, models and storage

* 🧪 Fixed incorrect test

* 🌄 Modified retrieve view to use new mark_read()

* 🧪 Fixed linting for tests

* Improvements and docs (#17)

* 🆕 Support for Django 3.2

* 👀 Fixed issues for marking messages as read

When listing messages, sometimes messages that were not returned marked as read.
When retrieving a message, it was not marked as read.

* 🧪 Improved tests, models and storage

* 🧪 Fixed incorrect test

* 🌄 Modified retrieve view to use new mark_read()

* 🧪 Fixed linting for tests

* 🔎 Added support for more item types in DBStorage.__contains__

* ✍️ Improved storage __str__ method

* 👨‍🏫 Fixed linting

* 📖 Updated docs

* 🥳 Added tests for django 4 rc1

* 😔 Reverted django 4 tests (not compatible with DRF)

* Release

* 📦 Release 1.1.0

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Saad A. Bazaz <saadbazaz@hotmail.com>
  • Loading branch information
3 people committed Dec 2, 2021
1 parent 686a652 commit 8a9992a
Show file tree
Hide file tree
Showing 39 changed files with 1,172 additions and 223 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '22 10 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
80 changes: 80 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Django CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main, release-* ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
django-version:
- "2.2" # LTS
- "3.0"
- "3.1"
- "3.2" # LTS
# - "4.0"
drf-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
exclude:
# Python 3.9 is compatible with django 3.0+
- { python-version: "3.9", django-version: "2.2" }
# Python 3.10 is compatible with Django 3.2+
- { python-version: "3.10", django-version: "2.2" }
- { python-version: "3.10", django-version: "3.0" }
- { python-version: "3.10", django-version: "3.1" }
# Django 4 is compatible with Python 3.8+
# - { python-version: "3.7", django-version: "4.0" }
# DRF 3.10 problems with django 3.1+
- { drf-version: "3.10", django-version: "3.1" }
- { drf-version: "3.10", django-version: "3.2" }

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip version
run: python -m pip install -U pip

- name: Install django version
run: python -m pip install "Django~=${{ matrix.django-version }}.0"

- name: Install drf version
run: python -m pip install "djangorestframework~=${{ matrix.drf-version }}.0"

- name: Install Dependencies
working-directory: ./testproj
run: python -m pip install -r requirements-github.txt

- name: Python and Django versions
run: |
echo "Python ${{ matrix.python-version }} -> Django ${{ matrix.django-version }} -> DRF ${{ matrix.drf-version }}"
python --version
echo "Django: `django-admin --version`"
echo "DRF: `python -c "import rest_framework; print(rest_framework.__version__)"`"
- name: Make logs directory
working-directory: ./testproj
run: mkdir logs

- name: Run Tests
working-directory: ./testproj
run: python manage.py test
37 changes: 37 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on:
push:
branches: [ main ]
pull_request:
branches: [ main, release-* ]


jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: python -m pip install build --user

- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Pylint

on: [ pull_request ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Install dependencies
working-directory: ./testproj
run: |
python -m pip install --upgrade pip
pip install pylint pylint-django django djangorestframework -r requirements-github.txt
- name: Analysing drf_messages with pylint
run: |
pylint drf_messages --load-plugins pylint_django --load-plugins pylint_django.checkers.migrations
- name: Analysing test project with pylint
run: |
pylint testproj/* --load-plugins pylint_django --load-plugins pylint_django.checkers.migrations --django-settings-module=testproj.settings
18 changes: 17 additions & 1 deletion .idea/drf-messages.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions .idea/inspectionProfiles/Personal.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations/pylint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/runConfigurations/runserver.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .idea/runConfigurations/sphinx_server.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .idea/runConfigurations/test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[MASTER]
ignore=static,templates
ignore-patterns=.+\.md, .+\.txt, .+\.ini,
disable=C0114, django-not-configured, super-with-arguments, logging-fstring-interpolation, too-many-arguments,
missing-class-docstring, no-else-return, no-self-use, unnecessary-lambda, too-many-ancestors

[BASIC]
good-names=default_app_config,logger,MESSAGES_ALLOW_DELETE_UNREAD,MESSAGES_DELETE_READ,MESSAGES_USE_SESSIONS

[TYPECHECK]
ignored-classes=WSGIRequest

[FORMAT]
max-line-length=120

0 comments on commit 8a9992a

Please sign in to comment.