Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump jinja2 from 2.11.2 to 2.11.3 #113

Merged
merged 4 commits into from
Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/matrix-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
python-version: ["3.5", "3.6", "3.7", "3.8"]
python-version: ["3.7", "3.8", "3.9"]

services:
mongodb:
Expand All @@ -17,19 +17,19 @@ jobs:
- 27017:27017

steps:
- uses: actions/checkout@v2.2.0
- uses: actions/checkout@v3.0.2
with:
fetch-depth: 1

- uses: actions/cache@v2.0.0
- uses: actions/cache@v3.0.4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

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

Expand All @@ -42,7 +42,7 @@ jobs:
run: coverage run --source vulyk setup.py test;

- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v2.6.0
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
version: 3.8
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"python.envFile":"${workspaceFolder}/test.env",
"python.analysis.extraPaths": [
"vulyk"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"vulyk",
"tests"
],
"python.linting.enabled": true,
"python.linting.pylintEnabled": true
}
26 changes: 14 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
blinker==1.4
bz2file==0.98
click==7.1.2
cssmin==0.2.0
email-validator==1.1.1
Flask-Admin==1.5.6
rcssmin==1.1.0
email-validator==1.2.1
Flask-Admin==1.6.0
Flask-Assets==2.0
Flask-Collect==1.3.2
Flask-Login==0.5.0
flask-mongoengine==0.9.5
Flask-Login==0.6.1
flask-mongoengine==1.0.0
Flask-Script==2.0.6
Flask==1.1.2
gunicorn==20.0.4
Flask==1.1.4
gunicorn==20.1.0
honcho>=0.5.0
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
Jinja2==2.11.3
MarkupSafe==2.0.1
mongoengine~=0.24
orjson~=3.7
Pillow>=5.4.0
rjsmin==1.1.0
rjsmin==1.2.0
social-auth-app-flask-mongoengine<2.0.0
social-auth-app-flask<2.0.0
social-auth-core==3.3.3
Sphinx==3.0.4
social-auth-core==4.3.0
Sphinx==3.5.4
veryprettytable==0.8.1
webassets==2.0
Werkzeug==1.0.1
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ classifiers =
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Natural Language :: English
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9

[options]
zip_safe = False
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8'
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9'
],
test_suite='tests',
scripts=['manage.py']
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from vulyk.models.task_types import AbstractTaskType
from vulyk.models.tasks import AbstractTask, AbstractAnswer
from vulyk.models.tasks import AbstractAnswer, AbstractTask


class FakeModel(AbstractTask):
Expand Down
2 changes: 1 addition & 1 deletion tests/gamification/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from vulyk.blueprints.gamification.models.task_types import \
AbstractGamifiedTaskType

from ..fixtures import FakeModel, FakeAnswer
from ..fixtures import FakeAnswer, FakeModel

__all__ = [
'FakeType',
Expand Down
16 changes: 8 additions & 8 deletions tests/gamification/test_allocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
from vulyk.blueprints.gamification import listeners
from vulyk.blueprints.gamification.core.rules import Rule
from vulyk.blueprints.gamification.core.state import (
UserState, InvalidUserStateException)
InvalidUserStateException, UserState)
from vulyk.blueprints.gamification.models.events import EventModel
from vulyk.blueprints.gamification.models.rules import (
RuleModel, ProjectAndFreeRules)
from vulyk.blueprints.gamification.models.rules import (ProjectAndFreeRules,
RuleModel)
from vulyk.blueprints.gamification.models.state import UserStateModel
from vulyk.blueprints.gamification.models.task_types import \
POINTS_PER_TASK_KEY, COINS_PER_TASK_KEY
from vulyk.blueprints.gamification.models.task_types import (
COINS_PER_TASK_KEY, POINTS_PER_TASK_KEY)
from vulyk.models.stats import WorkSession
from vulyk.models.tasks import AbstractTask, AbstractAnswer, Batch
from vulyk.models.user import User, Group
from vulyk.models.tasks import AbstractAnswer, AbstractTask, Batch
from vulyk.models.user import Group, User

from .fixtures import FakeType
from ..base import BaseTest
from ..fixtures import FakeType as BaseFakeType
from .fixtures import FakeType


class TestAllocationOfMoneyAndPoints(BaseTest):
Expand Down
12 changes: 6 additions & 6 deletions tests/gamification/test_coins_made_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
"""
test_coins_made_real
"""
import unittest
from datetime import datetime
from decimal import Decimal
import unittest

from vulyk.app import TASKS_TYPES
from vulyk.blueprints.gamification.models.events import EventModel
from vulyk.blueprints.gamification.models.state import UserStateModel
from vulyk.blueprints.gamification.models.task_types import \
POINTS_PER_TASK_KEY, COINS_PER_TASK_KEY
from vulyk.blueprints.gamification.models.task_types import (
COINS_PER_TASK_KEY, POINTS_PER_TASK_KEY)
from vulyk.models.stats import WorkSession
from vulyk.models.tasks import AbstractTask, AbstractAnswer, Batch
from vulyk.models.user import User, Group
from vulyk.models.tasks import AbstractAnswer, AbstractTask, Batch
from vulyk.models.user import Group, User

from .fixtures import FakeType
from ..base import BaseTest
from ..fixtures import FakeType as BaseFakeType
from .fixtures import FakeType


class TestCoinsMadeReal(BaseTest):
Expand Down
8 changes: 4 additions & 4 deletions tests/gamification/test_donation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import unittest
from datetime import datetime
from decimal import Decimal
import unittest
from unittest.mock import patch

from mongoengine import OperationError
Expand All @@ -10,13 +10,13 @@
from vulyk.blueprints.gamification.models.events import EventModel
from vulyk.blueprints.gamification.models.foundations import FundModel
from vulyk.blueprints.gamification.models.state import UserStateModel
from vulyk.blueprints.gamification.services import (
DonationResult, DonationsService)
from vulyk.blueprints.gamification.services import (DonationResult,
DonationsService)
from vulyk.models.user import Group, User

from .fixtures import FakeType, FixtureFund
from ..base import BaseTest
from ..fixtures import FakeType as BaseFakeType
from .fixtures import FakeType, FixtureFund


class TestDonation(BaseTest):
Expand Down
14 changes: 8 additions & 6 deletions tests/gamification/test_event_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
"""
test_event_models
"""
import unittest
from datetime import datetime, timedelta
from decimal import Decimal
import unittest

from vulyk.blueprints.gamification.core.events import (
Event, NoAchievementsEvent, LevelEvent, AchievementsEvent,
AchievementsLevelEvent, DonateEvent)
from vulyk.blueprints.gamification.core.events import (AchievementsEvent,
AchievementsLevelEvent,
DonateEvent, Event,
LevelEvent,
NoAchievementsEvent)
from vulyk.blueprints.gamification.core.rules import Rule
from vulyk.blueprints.gamification.models.events import EventModel
from vulyk.blueprints.gamification.models.foundations import FundModel
from vulyk.blueprints.gamification.models.rules import RuleModel
from vulyk.models.tasks import AbstractTask, AbstractAnswer, Batch
from vulyk.models.tasks import AbstractAnswer, AbstractTask, Batch
from vulyk.models.user import Group, User

from .fixtures import FixtureFund
from ..base import BaseTest
from ..fixtures import FakeType
from .fixtures import FixtureFund


class TestEventModels(BaseTest):
Expand Down
10 changes: 5 additions & 5 deletions tests/gamification/test_fund_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@

from vulyk import utils
from vulyk.blueprints.gamification import gamification
from vulyk.blueprints.gamification.models.foundations import (
FundModel, FundFilterBy)
from vulyk.blueprints.gamification.models.foundations import (FundFilterBy,
FundModel)

from .fixtures import FixtureFund
from ..base import BaseTest
from .fixtures import FixtureFund


class TestFundModels(BaseTest):
def tearDown(self):
super().tearDown()

FundModel.objects.delete()
FundModel._get_db()['images.files'].remove()
FundModel._get_db()['images.chunks'].remove()
FundModel._get_db()['images.files'].drop()
FundModel._get_db()['images.chunks'].drop()

def test_fund_ok(self):
fund = FixtureFund.get_fund()
Expand Down
14 changes: 8 additions & 6 deletions tests/gamification/test_query_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@

from bson import ObjectId

from vulyk.blueprints.gamification.core.queries import (
MongoRuleExecutor,
MongoRuleQueryBuilder)
from vulyk.blueprints.gamification.core.rules import Rule, ProjectRule
from vulyk.blueprints.gamification.models.rules import (
RuleModel, AllRules, ProjectAndFreeRules, StrictProjectRules)
from vulyk.blueprints.gamification.core.queries import (MongoRuleExecutor,
MongoRuleQueryBuilder)
from vulyk.blueprints.gamification.core.rules import ProjectRule, Rule
from vulyk.blueprints.gamification.models.rules import (AllRules,
ProjectAndFreeRules,
RuleModel,
StrictProjectRules)
from vulyk.models.stats import WorkSession

from ..base import BaseTest


Expand Down
2 changes: 1 addition & 1 deletion tests/gamification/test_rule_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
test_rule_models
"""
from vulyk.blueprints.gamification.core.rules import Rule, ProjectRule
from vulyk.blueprints.gamification.core.rules import ProjectRule, Rule

from ..base import BaseTest

Expand Down
18 changes: 6 additions & 12 deletions tests/gamification/test_rule_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@
"""
import unittest

try:
import ujson as json
except ImportError:
import json

from vulyk.blueprints.gamification.core.parsing import (
JsonRuleParser,
RuleParsingException)
from vulyk.blueprints.gamification.core.rules import (
Rule,
RuleValidationException,
ProjectRule)
import orjson as json

from vulyk.blueprints.gamification.core.parsing import (JsonRuleParser,
RuleParsingException)
from vulyk.blueprints.gamification.core.rules import (ProjectRule, Rule,
RuleValidationException)

from ..base import BaseTest

Expand Down
6 changes: 3 additions & 3 deletions tests/gamification/test_state_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"""
test_state_models
"""
import unittest
from datetime import datetime, timedelta
from decimal import Decimal
from operator import attrgetter
import unittest

from vulyk.blueprints.gamification.core.rules import Rule
from vulyk.blueprints.gamification.core.state import UserState
from vulyk.blueprints.gamification.models.rules import RuleModel
from vulyk.blueprints.gamification.models.state import (
UserStateModel, StateSortingKeys)
from vulyk.blueprints.gamification.models.state import (StateSortingKeys,
UserStateModel)
from vulyk.models.user import Group, User

from ..base import BaseTest
Expand Down
11 changes: 4 additions & 7 deletions tests/gamification/test_task_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
import unittest
from unittest.mock import patch

from vulyk.models.stats import WorkSession
from vulyk.models.tasks import AbstractTask, AbstractAnswer, Batch
from vulyk.models.user import User, Group

from vulyk.blueprints.gamification.models.task_types import (
POINTS_PER_TASK_KEY, COINS_PER_TASK_KEY, IMPORTANT_KEY
)
COINS_PER_TASK_KEY, IMPORTANT_KEY, POINTS_PER_TASK_KEY)
from vulyk.models.stats import WorkSession
from vulyk.models.tasks import AbstractAnswer, AbstractTask, Batch
from vulyk.models.user import Group, User

from ..base import BaseTest
from .fixtures import FakeType



class TestTaskTypes(BaseTest):
TASK_TYPE = FakeType.type_name

Expand Down
Loading