Skip to content

Commit c838e36

Browse files
committed
Update copyright
1 parent 15a6579 commit c838e36

40 files changed

+178
-140
lines changed

HACKING.md

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,100 @@
1-
Developer's Guide
2-
=================
3-
4-
Environment Setup
5-
-----------------
6-
7-
All the requirements in order to perform development on the product
8-
should be installable in a virtualenv.
9-
10-
$ pip install -r dev-requirements.txt
11-
12-
In order to build a release you will also need to install pandoc. On
13-
Ubuntu, you should be able to do:
14-
15-
$ sudo apt-get install pandoc
16-
17-
18-
Running the Unit Tests
19-
----------------------
20-
21-
### Running Tests with Nose
22-
23-
Running the tests is easy with nose (included in
24-
test-requirements.txt). From the project root:
25-
26-
$ nosetests .
27-
28-
To run the unit tests with coverage results (view cover/index.html),
29-
do the following:
30-
31-
$ nosetests --with-coverage --cover-html --cover-package=devicecloud .
32-
33-
New contributions to the library will only be accepted if they include
34-
unit test coverage (with some exceptions).
35-
36-
### Testing All Versions with Tox
37-
38-
We also support running the tests against all supported versions of
39-
python using a combination of
40-
[tox](http://tox.readthedocs.org/en/latest/) and
41-
[pyenv](https://github.com/yyuu/pyenv). To run all of the tests
42-
against all supported versions of python, just do the following:
43-
44-
$ ./toxtest.sh
45-
46-
This might take awhile the first time as it will build from source a
47-
version of the interpreter for each version supported. If you recieve
48-
errors from pyenv, there may be addition dependencies required.
49-
Please visit https://github.com/yyuu/pyenv/wiki/Common-build-problems
50-
for additional pointers.
51-
52-
### Running Integration and Unittests
53-
54-
There are some additional integration tests that run against an actual
55-
device cloud account. These are a bit more fragile and when something
56-
fails, you may need to go to your device cloud account to clean things
57-
up.
58-
59-
To run those tests, you can just do the following. This script runs
60-
the toxtest.sh script with environment variables set with your
61-
account information. The tests that were skipped before will now
62-
be run with each supported version of the interpreter:
63-
64-
$ ./inttest.sh
65-
66-
Build the Documentation
67-
-----------------------
68-
69-
Documentation (outside of this file and the README) is done via
70-
Sphinx. To build the docs, just do the following (with virtualenv
71-
activated):
72-
73-
$ cd docs
74-
$ make html
75-
76-
The docs that are built will be located at
77-
docs/_build/html/index.html.
78-
79-
The documentation for the project is published on github using a [Github
80-
Pages](https://pages.github.com/) Project Site. The process for
81-
releasing a new set of documentation is the following:
82-
83-
1. Create a fresh clone of the project and checkout the `gh-pages`
84-
branch. Although this is the same repo, the tree is completely
85-
separate from the main python-devicecloud codebase.
86-
2. Remove all contents from the working area
87-
3. From the python-devicecloud repo, `cp -r docs/_build/html/*
88-
/path/to/other/repo/`.
89-
4. Commit and push the update `gh-pages` branch to github
90-
91-
Open Source License Header
92-
--------------------------
93-
94-
Each source file should be prefixed with the following header:
95-
96-
# This Source Code Form is subject to the terms of the Mozilla Public
97-
# License, v. 2.0. If a copy of the MPL was not distributed with this
98-
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
99-
#
100-
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
1+
Developer's Guide
2+
=================
3+
4+
Environment Setup
5+
-----------------
6+
7+
All the requirements in order to perform development on the product
8+
should be installable in a virtualenv.
9+
10+
$ pip install -r dev-requirements.txt
11+
12+
In order to build a release you will also need to install pandoc. On
13+
Ubuntu, you should be able to do:
14+
15+
$ sudo apt-get install pandoc
16+
17+
18+
Running the Unit Tests
19+
----------------------
20+
21+
### Running Tests with Nose
22+
23+
Running the tests is easy with nose (included in
24+
test-requirements.txt). From the project root:
25+
26+
$ nosetests .
27+
28+
To run the unit tests with coverage results (view cover/index.html),
29+
do the following:
30+
31+
$ nosetests --with-coverage --cover-html --cover-package=devicecloud .
32+
33+
New contributions to the library will only be accepted if they include
34+
unit test coverage (with some exceptions).
35+
36+
### Testing All Versions with Tox
37+
38+
We also support running the tests against all supported versions of
39+
python using a combination of
40+
[tox](http://tox.readthedocs.org/en/latest/) and
41+
[pyenv](https://github.com/yyuu/pyenv). To run all of the tests
42+
against all supported versions of python, just do the following:
43+
44+
$ ./toxtest.sh
45+
46+
This might take awhile the first time as it will build from source a
47+
version of the interpreter for each version supported. If you recieve
48+
errors from pyenv, there may be addition dependencies required.
49+
Please visit https://github.com/yyuu/pyenv/wiki/Common-build-problems
50+
for additional pointers.
51+
52+
### Running Integration and Unittests
53+
54+
There are some additional integration tests that run against an actual
55+
device cloud account. These are a bit more fragile and when something
56+
fails, you may need to go to your device cloud account to clean things
57+
up.
58+
59+
To run those tests, you can just do the following. This script runs
60+
the toxtest.sh script with environment variables set with your
61+
account information. The tests that were skipped before will now
62+
be run with each supported version of the interpreter:
63+
64+
$ ./inttest.sh
65+
66+
Build the Documentation
67+
-----------------------
68+
69+
Documentation (outside of this file and the README) is done via
70+
Sphinx. To build the docs, just do the following (with virtualenv
71+
activated):
72+
73+
$ cd docs
74+
$ make html
75+
76+
The docs that are built will be located at
77+
docs/_build/html/index.html.
78+
79+
The documentation for the project is published on github using a [Github
80+
Pages](https://pages.github.com/) Project Site. The process for
81+
releasing a new set of documentation is the following:
82+
83+
1. Create a fresh clone of the project and checkout the `gh-pages`
84+
branch. Although this is the same repo, the tree is completely
85+
separate from the main python-devicecloud codebase.
86+
2. Remove all contents from the working area
87+
3. From the python-devicecloud repo, `cp -r docs/_build/html/*
88+
/path/to/other/repo/`.
89+
4. Commit and push the update `gh-pages` branch to github
90+
91+
Open Source License Header
92+
--------------------------
93+
94+
Each source file should be prefixed with the following header:
95+
96+
# This Source Code Form is subject to the terms of the Mozilla Public
97+
# License, v. 2.0. If a copy of the MPL was not distributed with this
98+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
99+
#
100+
# Copyright (c) 2015-2018 Digi International Inc. All rights reserved.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ License
153153

154154
This software is open-source software.
155155

156-
Copyright (c) 2015 Digi International, Inc.
156+
Copyright (c) 2015-2018 Digi International Inc.
157157

158158
This Source Code Form is subject to the terms of the Mozilla Public
159159
License, v. 2.0. If a copy of the MPL was not distributed with this file,

devicecloud/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
6+
67
import logging
78
import time
89
import json

devicecloud/apibase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66

77
class APIBase(object):
88
"""Base class for all API Classes

devicecloud/conditions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66

77
"""Module with functionality for building queries against cloud resources
88

devicecloud/data/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
5+
# Copyright (c) 2015-2018 Digi International Inc. All rights reserved.
66
#

devicecloud/devicecore.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
6+
67
import sys
78
import xml.etree.ElementTree as ET
89

devicecloud/examples/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.

devicecloud/examples/devicecore_playground.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66
from devicecloud.devicecore import dev_mac, group_path
77
from devicecloud.examples.example_helpers import get_authenticated_dc
88

devicecloud/examples/example_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66
from getpass import getpass
77
import os
88
from six.moves import input

devicecloud/examples/filedata_playground.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66

77
from devicecloud.examples.example_helpers import get_authenticated_dc
88
from devicecloud.filedata import fd_path

devicecloud/examples/streams_playground.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66
from math import pi
77
import pprint
88
import time

devicecloud/file_system_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66

77
"""Provide access to the device cloud file system service API"""
88
import base64

devicecloud/filedata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66

77
"""Provide access to the device cloud filedata API"""
88

devicecloud/monitor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
5+
# Copyright (c) 2015-2018 Digi International Inc. All rights reserved.
66
#
77
# This code is originally from another Digi Open Source Library:
88
# https://github.com/digidotcom/idigi-python-monitor-api
9+
910
import xml.etree.ElementTree as ET
1011
import logging
1112
import textwrap
@@ -209,7 +210,7 @@ def create_tcp_monitor(self, topics, batch_size=1, batch_duration=0,
209210
monitor_id = int(location.split('/')[-1])
210211
return TCPDeviceCloudMonitor(self._conn, monitor_id, self._tcp_client_manager)
211212

212-
def create_http_monitor(self, topics, transport_url, transport_token=None, transport_method='PUT',connect_timeout=0,
213+
def create_http_monitor(self, topics, transport_url, transport_token=None, transport_method='PUT', connect_timeout=0,
213214
response_timeout=0, batch_size=1, batch_duration=0, compression='none', format_type='json'):
214215
"""Creates a HTTP Monitor instance in the device cloud for a given list of topics
215216
@@ -363,6 +364,7 @@ def delete(self):
363364
"""Delete this monitor form the device cloud"""
364365
self._conn.delete("/ws/Monitor/{id}".format(id=self._id))
365366

367+
366368
class HTTPDeviceCloudMonitor(DeviceCloudMonitor):
367369
"""Device Cloud Monitor with HTTP transport type"""
368370

devicecloud/monitor_tcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
5+
# Copyright (c) 2015-2018 Digi International Inc. All rights reserved.
66
#
77
# This code is originally from another Digi Open Source Library:
88
# https://github.com/digidotcom/idigi-python-monitor-api

devicecloud/sci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66

77
"""Server Command Interface functionality"""
88
from devicecloud.apibase import APIBase

devicecloud/streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66

77
r"""Module providing classes for interacting with device cloud data streams"""
88
import json

devicecloud/test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.

devicecloud/test/integration/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
5+
# Copyright (c) 2015-2018 Digi International Inc. All rights reserved.

devicecloud/test/integration/inttest_monitor_tcp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
#
5-
# Copyright (c) 2015 Digi International, Inc.
5+
# Copyright (c) 2015-2018 Digi International Inc.
66
import pprint
77
import time
88
from devicecloud.streams import DataPoint
@@ -58,4 +58,4 @@ def receive_notification(notification):
5858

5959
if __name__ == '__main__':
6060
import unittest
61-
unittest.main()
61+
unittest.main()

0 commit comments

Comments
 (0)