From b95db6024cfa1493f4dc54c9942c06d4c4d1fd17 Mon Sep 17 00:00:00 2001 From: Kai Chen Date: Tue, 27 Nov 2018 23:23:28 -0800 Subject: [PATCH 1/4] views.py: Fix typo referencing wrong Travis env variable Fix typo that was causing Travis to fail on master. Specify specific commit for trav in requirements.txt to prevent this from happening again. Fixes https://github.com/coala/community/issues/226 --- .moban.yaml | 2 +- community/views.py | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.moban.yaml b/.moban.yaml index 9dcbd16d..988ae299 100644 --- a/.moban.yaml +++ b/.moban.yaml @@ -23,7 +23,7 @@ dependencies: - django-eventtools - git+https://gitlab.com/gitmate/open-source/IGitt.git@1fa5a0a21ea4fb8739d467c06972f748717adbdc - requests - - git+https://github.com/andrewda/trav.git + - git+https://github.com/andrewda/trav.git@ce805d12d3d1db0a51b1aa26bba9cd9ecc0d96b8 - python-dateutil - pillow - ruamel.yaml diff --git a/community/views.py b/community/views.py index 9c79fbb1..595c02ed 100644 --- a/community/views.py +++ b/community/views.py @@ -17,7 +17,7 @@ class HomePageView(TemplateView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['isTravis'] = Travis.TRAVIS - context['travisLink'] = Travis.BUILD_WEB_URL + context['travisLink'] = Travis.TRAVIS_BUILD_WEB_URL print('Running on Travis: {}, build link: {}'.format( context['isTravis'], diff --git a/requirements.txt b/requirements.txt index 2ea38e49..e7adc75f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ django-distill django-eventtools git+https://gitlab.com/gitmate/open-source/IGitt.git@1fa5a0a21ea4fb8739d467c06972f748717adbdc requests -git+https://github.com/andrewda/trav.git +git+https://github.com/andrewda/trav.git@ce805d12d3d1db0a51b1aa26bba9cd9ecc0d96b8 python-dateutil pillow ruamel.yaml From db5c78e216ef97343ffbdc5312adaa1e1bcea113 Mon Sep 17 00:00:00 2001 From: sanchit Date: Wed, 2 Jan 2019 17:12:13 +0530 Subject: [PATCH 2/4] activity_points.py: Fix docstring typo This fixes the typo and changes it from touple --> tuple. Closes https://github.com/coala/community/issues/192 --- gamification/process/activity_points.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamification/process/activity_points.py b/gamification/process/activity_points.py index 97a7f3e4..a8a27ec1 100644 --- a/gamification/process/activity_points.py +++ b/gamification/process/activity_points.py @@ -12,7 +12,7 @@ def get_activity_with_points(activity_type, labels): activity. e.g. issue or merge_request. :param labels: a QuerySet dict containing the 'name' as key and 'name of the label' as value. - :return: a touple of points and activity string. + :return: a tuple of points and activity string. """ labels = get_sorted_labels(labels) points = get_total_points(activity_type, labels) From b866611209fc3b29f8df0af39475e211320d28ca Mon Sep 17 00:00:00 2001 From: bhawesh96 Date: Wed, 14 Nov 2018 00:13:28 +0530 Subject: [PATCH 3/4] manage.py: Raise min python version to 3.6 raise an Exception if python version is < 3.6 Closes https://github.com/coala/community/issues/223 --- manage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manage.py b/manage.py index 045dc22f..736cc032 100755 --- a/manage.py +++ b/manage.py @@ -4,6 +4,8 @@ if __name__ == '__main__': + if (sys.version_info[0], sys.version_info[1]) < (3, 6): + raise Exception('Minimum python version 3.6 is required.') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'community.settings') try: from django.core.management import execute_from_command_line From 569c3ccabb58514aca82b419b31511f494bfce46 Mon Sep 17 00:00:00 2001 From: Akshit jain Date: Thu, 10 Jan 2019 21:57:14 +0530 Subject: [PATCH 4/4] .coafiles: Add jinja2bear jinja2bear is added for templates Closes https://github.com/coala/community/issues/129 --- .coafile | 5 +++++ templates/contributors.html | 2 +- templates/gamification.html | 6 +++--- templates/index.html | 2 +- templates/openhub.html | 7 +++---- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.coafile b/.coafile index 0707b389..edfbf0ec 100644 --- a/.coafile +++ b/.coafile @@ -67,3 +67,8 @@ keywords = coala bears = PyPluralNamingBear files = **.py ignore_list = LOGGING, MIDDLEWARE + +[all.jinja] +files = templates/**.html +bears = Jinja2Bear +check_end_labels = False diff --git a/templates/contributors.html b/templates/contributors.html index 2c994e55..32abe1a6 100644 --- a/templates/contributors.html +++ b/templates/contributors.html @@ -26,7 +26,7 @@

Details of all the contributors

teams: {% for team in contributor.teams.all %} {{ team.name }} - {% endfor %} + {% endfor %}{# for team in contributor.teams.all #}

diff --git a/templates/gamification.html b/templates/gamification.html index 86ae3005..48becb65 100644 --- a/templates/gamification.html +++ b/templates/gamification.html @@ -32,11 +32,11 @@

The gamification leaderboard

{{ forloop.counter }}. {{ activity.name }}, performed_at: {{ activity.performed_at }} updated_at: {{ activity.updated_at }}

- {% endfor %} + {% endfor %}{# for activity in participant.activities.all #}

Badges Earned: {% for badge in participant.badges.all %}

{{ forloop.counter }}.{{ badge.name }}

- {% endfor %} + {% endfor %}{# for badge in participant.badges.all #}

@@ -44,7 +44,7 @@

The gamification leaderboard


- {% endfor %}{# for contributor in contributors #} + {% endfor %}{# for participant in participants #} diff --git a/templates/index.html b/templates/index.html index ac8b5703..80530eeb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -24,6 +24,6 @@ {% if isTravis %} This website was built automatically using Travis CI. A link to the build can be found here. - {% endif %} + {% endif %}{# if isTravis #} diff --git a/templates/openhub.html b/templates/openhub.html index 0f187211..cfdb3a02 100644 --- a/templates/openhub.html +++ b/templates/openhub.html @@ -10,9 +10,9 @@

All of our Portfolio Projects

- {% for error in errors %} + {% for error in errors %}

{{ error | safe }}

- {% endfor %} + {% endfor %}{# for error in errors #} {% for project in projects %}
@@ -38,6 +38,5 @@

All of our Portfolio Projects


- {% endfor %}{# for project in projects #} - + {% endfor %}{# for project in projects #} {# for project in projects #}