Skip to content

Commit

Permalink
Merge pull request #71 from nickumia-reisys/fix-actions
Browse files Browse the repository at this point in the history
Fix Github Actions
  • Loading branch information
smotornyuk authored Aug 13, 2023
2 parents 77f8567 + 9306edb commit 3402d74
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.6'
python-version: '3.9'
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
Expand Down
1 change: 1 addition & 0 deletions ckanext/googleanalytics/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import logging
import click
import ckan.model as model
import ckan.plugins.toolkit as tk

from . import dbutil, config

Expand Down
1 change: 0 additions & 1 deletion ckanext/googleanalytics/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def tracking_mode():
if id_.startswith("GTM-"):
return "gtm"


return "ga"


Expand Down
2 changes: 1 addition & 1 deletion ckanext/googleanalytics/ga_auth.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from apiclient.discovery import build
from oauth2client.service_account import ServiceAccountCredentials

from ckanext.googleanalytics import utils, config
from ckanext.googleanalytics import config


def init_service(credentials_file):
Expand Down
1 change: 1 addition & 0 deletions ckanext/googleanalytics/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ def googleanalytics_header():
def googleanalytics_tracking_mode():
return config.tracking_mode()


def googleanalytics_id():
return config.tracking_id()
2 changes: 1 addition & 1 deletion ckanext/googleanalytics/logic/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ckan.logic import validate

from . import schema
from .. import utils, config
from .. import config
from ..model import PackageStats, ResourceStats
from ..ga_auth import init_service, get_profile_id

Expand Down
1 change: 1 addition & 0 deletions ckanext/googleanalytics/tests/test_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import ckan.plugins.toolkit as tk
from ckanext.googleanalytics import config


def _render_header(mode, tracking_id):
return tk.render_snippet("googleanalytics/snippets/_{}.html".format(mode), {
"googleanalytics_id": tracking_id,
Expand Down
2 changes: 1 addition & 1 deletion ckanext/googleanalytics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _mp_event(event):
data=json.dumps({
"client_id": config.measurement_protocol_client_id(),
"non_personalized_ads": False,
"events":[event]
"events": [event]
}, cls=SafeJSONEncoder)
)

Expand Down

0 comments on commit 3402d74

Please sign in to comment.