-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from dgk/feature/django3-merge-fix
django 3-4 support
- Loading branch information
Showing
57 changed files
with
544 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: codecov | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DJANGO_SETTINGS_MODULE: sites.test.settings | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install "Django>=4.2,<4.3" | ||
python -m pip install -r requirements.test.txt | ||
python -m pip install codecov | ||
- name: Test | ||
run: | | ||
python -m pip install "Django>=4.2,<4.3" | ||
python -m pip install -r requirements.test.txt | ||
python -m pip install codecov | ||
- name: Run tests and collect coverage | ||
run: | | ||
coverage run manage.py test tests | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/django-business-logic | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install wheel | ||
- name: Build package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: comnoco/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref_name }} | ||
body: | | ||
Pypi release: https://pypi.org/project/django-business-logic/${{ github.ref_name }}/ | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: unittests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
django: | ||
- "3.2" | ||
- "4.0" | ||
- "4.1" | ||
- "4.2" | ||
|
||
env: | ||
DJANGO_SETTINGS_MODULE: sites.test.settings | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Set up pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install Django ${{ matrix.django }} | ||
run: | | ||
DJANGO_VERSION_MAJOR=$(echo ${{ matrix.django }} | cut -d. -f1) | ||
DJANGO_VERSION_NEXT_MINOR=$(($(echo ${{ matrix.django }} | cut -d. -f2) + 1)) | ||
python -m pip install "Django>=${{ matrix.django }},<$DJANGO_VERSION_MAJOR.$DJANGO_VERSION_NEXT_MINOR" | ||
- name: Install django-admin-sortable2 for Django 3.2 | ||
if: ${{ matrix.django == '3.2' }} | ||
run: | | ||
python -m pip install django-admin-sortable2==1.0.4 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -r requirements.test.txt | ||
- name: Test | ||
run: | | ||
py.test tests |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.. image:: https://img.shields.io/travis/dgk/django-business-logic/master.svg | ||
:target: http://travis-ci.org/dgk/django-business-logic?branch=master | ||
:alt: travis-ci | ||
.. image:: https://img.shields.io/github/actions/workflow/status/dgk/django-business-logic/unittests.yml | ||
:target: https://github.com/dgk/django-business-logic/actions/workflows/unittests.yml | ||
:alt: github-build | ||
|
||
.. image:: https://img.shields.io/codecov/c/github/dgk/django-business-logic.svg | ||
:target: https://codecov.io/gh/dgk/django-business-logic | ||
|
@@ -18,6 +18,10 @@ | |
:target: https://django-business-logic.readthedocs.io/en/latest/license.html | ||
:alt: MIT license | ||
|
||
.. image:: https://app.fossa.com/api/projects/git%2Bgithub.com%2Fdgk%2Fdjango-business-logic.svg?type=shield&issueType=license | ||
:target: https://app.fossa.com/projects/git%2Bgithub.com%2Fdgk%2Fdjango-business-logic?ref=badge_shield | ||
:alt: FOSSA Status | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/django-business-logic.svg | ||
:target: https://pypi.org/project/django-business-logic/ | ||
:alt: python versions | ||
|
@@ -34,10 +38,6 @@ | |
:target: https://pypi.org/project/django-business-logic/ | ||
:alt: pypi versions status | ||
|
||
.. image:: https://img.shields.io/gitter/room/django-business-logic/community.svg | ||
:target: https://gitter.im/django-business-logic/community | ||
:alt: gitter | ||
|
||
Preface | ||
####### | ||
|
||
|
@@ -114,8 +114,6 @@ Support us | |
|
||
Any feedback and github stars would be greatly appreciated. | ||
|
||
Please feel free to ask any questions in the `gitter chat <https://gitter.im/django-business-logic/community>`_ | ||
|
||
If you are familiar with react/mobx and want to help to build django-business-logic library | ||
(`next generation frontend code is here <https://github.com/dgk/business-logic-ui/>`_), please contact me [email protected]. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
__version__ = '0.5.5' | ||
__version__ = '0.5.8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class BusinessLogicConfig(AppConfig): | ||
name = 'business_logic' | ||
default_auto_field = 'django.db.models.AutoField' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
import inspect | ||
import logging | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.