Skip to content

Commit

Permalink
updates for privacy information.
Browse files Browse the repository at this point in the history
* added PRIVACY.md
* basic info displayed at end of configuration

also switched to add more info to 'label' when dispatching metrics.  this includes the UW version number, and number of procs.
  • Loading branch information
jmansour committed Jan 20, 2016
1 parent 600806a commit 49e3e98
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# use glob syntax.
syntax: glob

_uwid.py
*~
.build_success
.config_success
Expand Down
38 changes: 38 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Privacy
=======

Basic information about Underworld usage is collected via Google Analytics. This
information helps us to further develop and improve Underworld.

We collect **only** the following information:

* Platform type (eg. Darwin, linux, docker, etc).
* Number of processes being utilised.
* Underworld version.

A random number (generated at configure time) is also used to help distinguish
unique users. Google Analytics also provides an anonymised version of your IP
for geolocational purposes.

For implementation details, see 'underworld/__init__.py' and 'underworld/_net/__init__.py'


Participation
-------------

You may opt out by setting the UW_NO_USAGE_METRICS environment variable.


Policy
------

1. Underworld respects the privacy of individuals and will not collect personal
information.

2. Underworld will collect information only where this is necessary for one or
more of its functions or activities.

3. Underworld will only use this information for the purpose for which it was
collected.


14 changes: 14 additions & 0 deletions docs/development/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@ Bug reporting
Use the github issue tracker! Changes relating to issue tracker issues should register
which issue they relate to in the commit log.

Version Numbering
=================
Underworld uses the convention

X.Y.Z

where

X = Major version number. This will be '2' for the foreseeable future.
Y = Minor version number. This will increment major feature releases, or with scheduled
releases (such as quarterly releases).
Z = Patch version. While on the development branch, this will be '0'. It will switch to
'1' when a stable branch is first created, and increment from there on the stable
branch as bug fixes are ported through.

Testing
=======
Expand Down
17 changes: 8 additions & 9 deletions docs/test/integral.ipynb

Large diffs are not rendered by default.

26 changes: 20 additions & 6 deletions libUnderworld/SConfigure
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,29 @@ if not (GetOption('help') or GetOption('clean')):
#
# Create a test file. This file is the indicator of a successful build
#
open(conf_success_file, 'w').close()
open(conf_success_file, 'w').close()

#
# Print success message.
# Create an installation ID file if it doesn't already exist.
#

idfile = "../underworld/_uwid.py"
if not os.path.isfile(idfile):
import uuid
with open(idfile,"w+") as f:
f.write("uwid = \'" + str(uuid.uuid4()) + "\'" )

print
print '***************************************'
print '* Successfully configured. *'
print '* Now run \'./scons.py\' to build. *'
print '***************************************'
print '*****************************************************************'
print '* Successfully configured. *'
print '* *'
print '* Note that basic usage metrics are dispatched when you use *'
print '* Underworld. *'
print '* To opt out, set the UW_NO_USAGE_METRICS environment variable. *'
print '* See PRIVACY.md for full details. *'
print '* *'
print '* Now run \'./scons.py\' to build. *'
print '*****************************************************************'
print


15 changes: 13 additions & 2 deletions underworld/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
on a geological timescale.
"""

__version__ = "2.0.0b"

# ok, first need to change default python dlopen flags to global
# this is because when python imports the module, the shared libraries are loaded as RTLD_LOCAL
# and then when MPI_Init is called, OpenMPI tries to dlopen its plugin, they are unable to
Expand All @@ -49,6 +51,12 @@
import swarm
import systems
import utils

try:
from ._uwid import uwid as _id
except:
import uuid
_id = str(uuid.uuid4())
import _net

# ok, now set this back to the original value
Expand Down Expand Up @@ -142,14 +150,17 @@ def __del__(self):

# lets shoot off some usage metrics
if rank() == 0:
import pdb
pdb.set_trace()
def _sendData():
import os
# disable collection of data if requested
if "UW_NO_USAGE_METRICS" not in os.environ:
label = ""
# get platform info
import platform
label += platform.system()
label = 'v'+__version__
label += "__" + 'n'+str(nProcs())
label += "__" + platform.system()
label += "__" + platform.release()
# check if docker
import os.path
Expand Down
11 changes: 2 additions & 9 deletions underworld/_net/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,10 @@
import httplib
import urllib
import uuid
import underworld as uw

GA_TRACKING_ID = "UA-35748138-7"

# The following should return the mac address as a machine identifier.
# This is useful to get an idea about unique users, but note that
# where no mac address is found, a random number is instead returned,
# but it's irrelevant as if there's no mac address, there's
# no network, so metrics will not be dispatched.
from uuid import getnode
GA_CLIENT_ID = str(getnode())

GA_CLIENT_ID = uw._id

def PostGAEvent( category, action, label=None, value=None ):
"""
Expand Down

0 comments on commit 49e3e98

Please sign in to comment.