Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api-client
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-analytics-data-api-client
Commits
6bd371c7
Commit
6bd371c7
authored
Jul 11, 2014
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5 from edx/pep257
PEP 257 Fixes
parents
6d21985d
39950e16
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
18 deletions
+9
-18
Makefile
+1
-1
analyticsclient/activity_type.py
+1
-3
analyticsclient/client.py
+2
-1
analyticsclient/course.py
+1
-3
analyticsclient/demographic.py
+1
-3
analyticsclient/status.py
+1
-4
analyticsclient/tests/__init__.py
+2
-3
No files found.
Makefile
View file @
6bd371c7
...
@@ -19,4 +19,4 @@ quality:
...
@@ -19,4 +19,4 @@ quality:
pylint
--rcfile
=
.pylintrc
$(PACKAGE)
pylint
--rcfile
=
.pylintrc
$(PACKAGE)
# Ignore module level docstrings and all test files
# Ignore module level docstrings and all test files
pep257
--ignore
=
D100
--match
=
'(?!test).*py'
$(PACKAGE)
pep257
--ignore
=
D100
,D203
--match
=
'(?!test).*py'
$(PACKAGE)
analyticsclient/activity_type.py
View file @
6bd371c7
"""
""" Course activity types. """
Course activity types.
"""
ANY
=
'any'
ANY
=
'any'
ATTEMPTED_PROBLEM
=
'attempted_problem'
ATTEMPTED_PROBLEM
=
'attempted_problem'
...
...
analyticsclient/client.py
View file @
6bd371c7
...
@@ -13,12 +13,13 @@ log = logging.getLogger(__name__)
...
@@ -13,12 +13,13 @@ log = logging.getLogger(__name__)
class
Client
(
object
):
class
Client
(
object
):
"""
"""
Analytics API client
Analytics API client
.
The instance has attributes `status` and `courses` that provide access to instances of
The instance has attributes `status` and `courses` that provide access to instances of
:class: `~analyticsclient.status` and :class: `~analyticsclient.course`. This is the preferred (and only supported)
:class: `~analyticsclient.status` and :class: `~analyticsclient.course`. This is the preferred (and only supported)
way to get access to those classes and their methods.
way to get access to those classes and their methods.
"""
"""
def
__init__
(
self
,
base_url
,
auth_token
=
None
):
def
__init__
(
self
,
base_url
,
auth_token
=
None
):
"""
"""
Initialize the client.
Initialize the client.
...
...
analyticsclient/course.py
View file @
6bd371c7
...
@@ -2,9 +2,7 @@ import analyticsclient.activity_type as at
...
@@ -2,9 +2,7 @@ import analyticsclient.activity_type as at
class
Course
(
object
):
class
Course
(
object
):
"""
""" Course-related analytics. """
Course-related analytics.
"""
def
__init__
(
self
,
client
,
course_id
):
def
__init__
(
self
,
client
,
course_id
):
"""
"""
...
...
analyticsclient/demographic.py
View file @
6bd371c7
"""
""" Course demographics. """
Course demographics
"""
BIRTH_YEAR
=
'birth_year'
BIRTH_YEAR
=
'birth_year'
EDUCATION
=
'education'
EDUCATION
=
'education'
...
...
analyticsclient/status.py
View file @
6bd371c7
...
@@ -2,10 +2,7 @@ from analyticsclient.exceptions import ClientError
...
@@ -2,10 +2,7 @@ from analyticsclient.exceptions import ClientError
class
Status
(
object
):
class
Status
(
object
):
""" API server status. """
"""
API server status.
"""
def
__init__
(
self
,
client
):
def
__init__
(
self
,
client
):
"""
"""
...
...
analyticsclient/tests/__init__.py
View file @
6bd371c7
...
@@ -4,11 +4,10 @@ from analyticsclient.client import Client
...
@@ -4,11 +4,10 @@ from analyticsclient.client import Client
class
ClientTestCase
(
TestCase
):
class
ClientTestCase
(
TestCase
):
"""
""" Base class for client-related tests. """
Base class for client-related tests.
"""
def
setUp
(
self
):
def
setUp
(
self
):
""" Configure Client. """
self
.
api_url
=
'http://localhost:9999/api/v0'
self
.
api_url
=
'http://localhost:9999/api/v0'
self
.
client
=
Client
(
self
.
api_url
)
self
.
client
=
Client
(
self
.
api_url
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment