Skip to content

Commit

Permalink
Merge branch 'release/0.1.19' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
benzkji committed Jun 5, 2021
2 parents 7d39d76 + 04ed04b commit 53aa9bf
Show file tree
Hide file tree
Showing 17 changed files with 142 additions and 48 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on: [push, pull_request, ]

jobs:
test:
runs-on: ubuntu-latest
if: github.repository == 'bnzk/djangocms-misc'
strategy:
matrix:
python: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox tox-gh-actions
- name: Run Tox
# Run tox using the version of Python in `PATH`
# run: tox -e py${{ matrix.python }}-${{ matrix.django }}
run: tox

coverage:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install tox
run: pip install tox
- name: Run tox with coverage
# Run tox using the version of Python in `PATH`
# run: tox -e py${{ matrix.python }}-${{ matrix.django }}
run: tox -e py37-django22-cms37-treebeard43-coverage

lint:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install flake8
run: pip install flake8
- name: Run flake8
run: flake8
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release on PYPI
on:
push:
branches: [main]

jobs:
build-and-publish:
runs-on: ubuntu-latest
if: github.repository == 'bnzk/djangocms-misc'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel twine
- name: Build
run: |
python setup.py sdist
python setup.py bdist_wheel --universal
- name: Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER_BNZK }}
TWINE_PASSWORD: ${{ secrets.PYPI_PW_BNZK }}
run: twine upload dist/*
File renamed without changes.
7 changes: 7 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
- more tests: autopublisher, for example!


==== 0.1.19 (2021-06-05) ===

- switched to github actions
- django 3.2 support
- experimental django-cms 3.9rc2 support (autopublisher broken)


==== 0.1.18 (2021-06-04) ===

- #27 - feature: add_crud_menu_item for toolbar
Expand Down
4 changes: 2 additions & 2 deletions PYPI.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. image:: https://travis-ci.org/bnzk/djangocms-misc.svg
:target: https://travis-ci.org/bnzk/djangocms-misc/
.. image:: https://github.com/bnzk/djangocms-misc/actions/workflows/ci.yml/badge.svg
:target: https://github.com/bnzk/djangocms-misc/actions/workflows/ci.yml
.. image:: https://img.shields.io/pypi/v/djangocms-misc.svg
:target: https://pypi.python.org/pypi/djangocms-misc/
.. image:: https://img.shields.io/pypi/l/djangocms-misc.svg
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# djangocms-misc

[![Build Status](https://travis-ci.org/bnzk/djangocms-misc.svg "Build Status")](https://travis-ci.org/bnzk/djangocms-misc/)
[![CI](https://github.com/bnzk/djangocms-misc/actions/workflows/ci.yml/badge.svg)](https://github.com/bnzk/djangocms-misc/actions/workflows/ci.yml)
[![PyPi Version](https://img.shields.io/pypi/v/djangocms-misc.svg "PyPi Version")](https://pypi.python.org/pypi/djangocms-misc/)
[![Licence](https://img.shields.io/pypi/l/djangocms-misc.svg "Licence")](https://pypi.python.org/pypi/djangocms-misc/)

Expand Down
2 changes: 1 addition & 1 deletion djangocms_misc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '0.1.18'
__version__ = '0.1.19'
__author__ = 'benzkji'
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% load static from staticfiles %}
{% load static %}
<link href="{% static 'admin/djangocms_misc/css/admin_style.css' %}" media="all" rel="stylesheet">
4 changes: 1 addition & 3 deletions djangocms_misc/alternate_toolbar/cms_toolbars.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# coding: utf-8
from __future__ import unicode_literals

from django.conf import settings
from django.contrib.auth import get_user_model, get_permission_codename
from django.contrib import admin
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from cms.utils.urlutils import admin_reverse
from cms.toolbar_pool import toolbar_pool
Expand Down
4 changes: 2 additions & 2 deletions djangocms_misc/basic/app_template/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# from filer.fields.image import FilerImageField
from filer_addons.filer_gui.fields import FilerImageField

from quadrat.managers import PublishedQuerySet
from quadrat.models import PublishedBase, SEOBase
from project.managers import PublishedQuerySet
from project.models import PublishedBase, SEOBase


class AppTemplate(PublishedBase, SEOBase, models.Model):
Expand Down
8 changes: 0 additions & 8 deletions djangocms_misc/basic/app_template/tests/app.py

This file was deleted.

13 changes: 13 additions & 0 deletions djangocms_misc/basic/app_template/tests/tst_app_basic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from __future__ import unicode_literals

from django.test import TestCase

from ..models import AppTemplate


# add some basic things (admin list view, detail view, etc)
class AppTemplateTests(TestCase):

def fetch_objs(self):
all = AppTemplate.objects.all()
self.assertEqual(all.count(), 0)
17 changes: 5 additions & 12 deletions djangocms_misc/basic/app_template/translation.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
from django.conf import settings
from modeltranslation.translator import TranslationOptions, translator
from modeltranslation.translator import TranslationOptions
from modeltranslation.decorators import register

from djangocms_baseplugins.baseplugin import defaults
from djangocms_baseplugins.baseplugin.utils import check_in_migration_modules

from .models import PluginTemplate
from . import conf


translation_fields = defaults.TRANSLATED_FIELDS \
+ conf.TRANSLATED_FIELDS
from .models import AppTemplate


@register(AppTemplate)
class AppTemplateTranslationOptions(TranslationOptions):
fields = translation_fields
fields = ['title', ]
2 changes: 1 addition & 1 deletion djangocms_misc/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
'menus',
'filer',
'mptt',
'hvad',
# 'hvad',
'modeltranslation',
# 'ckeditor',

Expand Down
6 changes: 0 additions & 6 deletions djangocms_misc/tests/test_app/models.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
from __future__ import unicode_literals

from cms.models import CMSPlugin
from django.db import models
from django.utils.encoding import python_2_unicode_compatible


@python_2_unicode_compatible
class TestPluginModel(CMSPlugin):
field1 = models.CharField(max_length=64, default='', blank=False)
field_date = models.DateField(default=None, null=True, )
Expand All @@ -16,7 +12,6 @@ def __str__(self):
return self.field1


@python_2_unicode_compatible
class TestModel(models.Model):
field0 = models.CharField(max_length=64, default='', blank=True)
field1 = models.CharField(max_length=64, default='', blank=False)
Expand All @@ -26,7 +21,6 @@ def __str__(self):
return self.field1


@python_2_unicode_compatible
class TestInlineModel(models.Model):
testmodel = models.ForeignKey(TestModel, on_delete=models.CASCADE)
field1 = models.CharField(max_length=64, default='', blank=False)
Expand Down
29 changes: 21 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,25 @@
# cp geckodriver /usr/local/bin/

[tox]
# no django 2.0 yet, as filer and cms dont support it.
envlist = py{36,37}-django{22}-cms{37},py37-django22-cms360-coverage,py37-django22-cms37-flake8
# todo: autopublisher for cms 3.7! ,py{36,37}-django{20,21,22}-cms{370}
envlist =
py{36,37}-django{22}-cms{37}-treebeard{43}
py{37,38}-django{22,32}-cms{39}-treebeard{45} # wait for hvad!?
py37-django22-cms37-treebeard{43}-coverage
flake8

[testenv:py37-django22-cms37-flake8]
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39

[testenv:flake8]
deps = flake8
commands = flake8
skip_install = true

[testenv:py37-django22-cms37-coverage]
[testenv:py37-django22-cms37-treebeard43-coverage]
whitelist_externals = echo
commands =
pip install coverage
Expand All @@ -33,9 +43,12 @@ setenv =
PYTHONPATH={toxinidir}
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<3.3
cms34: django-cms==3.4.6
cms37: django-cms==3.7.0
cms39: django-cms==3.9.0rc2
treebeard43: django-treebeard==4.3.0
treebeard45: django-treebeard==4.5.1
coverage
django-coverage
factory_boy
Expand All @@ -47,7 +60,7 @@ deps =
djangocms-text-ckeditor
django-filer
# django-formtools<2.2
django-hvad
# django-hvad
# 0.12.2 introduces something strange!
# django-modeltranslation==0.12.1
django-modeltranslation
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1182,9 +1182,9 @@ homedir-polyfill@^1.0.1:
parse-passwd "^1.0.0"

hosted-git-info@^2.1.4:
version "2.8.8"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
version "2.8.9"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==

htmlparser2@3.8.x:
version "3.8.3"
Expand Down

0 comments on commit 53aa9bf

Please sign in to comment.