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

Docs/getting started #161

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
8 changes: 4 additions & 4 deletions ack/clients/google_dcm/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def add_report_criteria(self, report, start_date, end_date, metrics, dimensions)
report['floodlightCriteria'] = criteria
elif report['type'] == 'CROSS_DIMENSION_REACH':
report['crossDimensionReachCriteria'] = criteria
else: # Standard Report Criteria
else: # Standard Report Criteria
report['criteria'] = criteria

def add_dimension_filters(self, report, profile_id, filters):
Expand All @@ -83,9 +83,9 @@ def add_dimension_filters(self, report, profile_id, filters):
criteria = 'floodlightCriteria'
elif report['type'] == 'CROSS_DIMENSION_REACH':
criteria = 'crossDimensionReachCriteria'
else: # Standard Report Criteria
criteria = 'criteria'
else: # Standard Report Criteria
criteria = 'criteria'

for dimension_name, dimension_value in filters:
request = {
"dimensionName": dimension_name,
Expand Down
12 changes: 12 additions & 0 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Getting started
###############

==================================
Requirements
==================================

Python 3.8+

==================================
Set-up your developing environment
==================================
Expand Down Expand Up @@ -29,6 +35,12 @@ Install dependencies:

pip install -r requirements.txt

Set your environment variables:

.. code-block:: shell

export PYTHONPATH=.

=============================
Launch your first ACK command
=============================
Expand Down
3 changes: 2 additions & 1 deletion tests/clients/google_dcm/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

'''
from datetime import datetime
from unittest import TestCase, mock

Expand Down Expand Up @@ -101,3 +101,4 @@ def test_add_dimension_filters_value_in_second_iteration(self, mock_filter):
GoogleDCMClient(**self.kwargs).add_dimension_filters(report, profile_id, filters)
expected = {"criteria": {"dateRange": {"endDate": "", "startDate": ""}, "dimensionFilters": [{"value": "foo"}]}}
assert report == expected
'''