Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
gord-nuttall-adswerve committed Jun 25, 2020
0 parents commit 866cce2
Show file tree
Hide file tree
Showing 28 changed files with 1,519 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.gcloudignore
.DS_Store
.vscode

# Python pycache:
__pycache__/
.pytest_cache

pycache/
.pycache

#Python virtual environment
venv/
env/
local/

#python compiled files
*.pyc

#sandbox files
sandbox/

#Google App Engine Standard
lib/

#windows generated files
Thumbs.db

#Binary files
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.dll
*.lib
*.sbr
*.un~
*.gz

#Pycharm

*.ndb
.idea
# node
node_modules/


29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- BSD 3-Clause license -

Copyright (c) Adswerve, Inc. All rights reserved.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

* Neither the name of Adswerve nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# README #

Temporary repo for Open Source GA Flattener tool.
Directories:
* cf : cloud function files
* tools : utilities to help with testing and backfilling data
* tests : units test

# PREREQUISITES #
1. Add "Logs Configuration Writer", "Cloud Functions Developer" pre
defined IAM roles to
[PROJECT_NUMBER]@cloudservices.gserviceaccount.com (built in service
account) otherwise deployment will fail with permission errors. See
<https://cloud.google.com/deployment-manager/docs/access-control> for
detailed explanation.
2. Install gCloud
3. Clone github open source repo
4. Create Google GCP project
5. Enable the Cloud Build API
6. Enable the Cloud Functions API
7. Create bucket for staging code during deployment (apmk-staging,
as-dev-gord-staging, aka: <project_name>-staging. TODO: automatic
this

# Commands #
* gcloud config set project analyticspros.com:spotted-cinnamon-834
* gcloud config set account [email protected]
* gcloud deployment-manager deployments create deployment-ga-flattene
--config ga_flattener.yaml
* gcloud deployment-manager deployments delete
deployment-ga-flattener -q

# Notes #
* name of deployment in gcloud command is accessed with {{
env["deployment"] }} in JINJA templates
* main.py cannot have numerous blank lines at the end.

# TODO #
* apply labels to all resources (where possible) to help with cost
measuring
* develop default flattening queries
* develop initial configuration for datasets
* develop initial confiugraiton for custom dimensions
Loading

0 comments on commit 866cce2

Please sign in to comment.