Skip to content

Climate Action Secretariat's Greenhouse Gas Industrial Reporting and Control System

License

Notifications You must be signed in to change notification settings

bcgov/cas-ggircs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to GGIRCS

GGIRCS stands for Greenhouse Gas Industrial Reporting and Control System for the Climate Action Secretariat (CAS).

Description

GGIRCS is a tool designed to modernize the annual reporting and verification of greenhouse gas industrial emissions. This project is a fulfillment to meet the requirements of the BC government initiatives including Climate Strategy, Clean Growth and CleanBC, part of the Greenhouse Gas Industrial Reporting and Control Act [GGIRCA].

Status

  • Master Pipeline: CircleCI

  • Develop Pipeline:

  • Functional Test:

Usage

Release procedure

Clone repository

In terminal:

  • Run make verify to ensure minimum required versions of all dependencies are installed and postgres is online (see the dependencies section below)

  • Run make install to set up a development environment

  • Run make test to execute all pgTAP-based tests against a ggircs_test database

  • If needed, create a development database using $ createdb ggircs

  • Run sqitch deploy to deploy to a ggircs database

Using Sqitch


If you're new to Sqitch, the best place to start is with the tutorial and other docs.

Add Schema

  • sqitch add schema_[schema_name]

Add Table

  • sqitch add table*[table_name] --require schema*[schema_name] --set schema=[schema_name]

Dependencies


Installation

Version 10 or higher recommended. Usually available via your distribution's package system. Binaries and source are also available for download. The PostgreSQL wiki has a list of detailed installation guides where you can find some OS-specific instructions.

A role/user with the following options must be created (see this tutorial if you need information on how to create roles):

  • The role name is your current user name ($ whoami)

  • The role has the SUPERUSER option

1.7.0 or higher recommended. Usually available via your distribution's package system. Binaries and source are also available for download.

5.10.0 or higher. Included in most Unix distributions and on OS X. Windows users can install ActivePerl. The Perl website has OS-specific installation instructions.

Data

Excluding Test Data

The data-set that is parsed by the ETL process includes some test data that needs to be excluded from the actual data housed in the swrs schema. This is achieved in swrs/transform/table/ignore_organisation by adding the swrs_organisation_id of organisations that were created for test purposes to this table. A join on this table in the swrs/transform/view/final_report view then ignores these organisations when loading data into the final schema.

Data Architecture

(TBC)

Project Material Publication

The materials published include:

  • Code Repositories
  • /bcgov/cas-airflow-dags
  • /bcgov/cas-ciip-portal
  • /bcgov/cas-docker-metabase
  • /bcgov/cas-docker-sqitch
  • /bcgov/cas-ggircs
  • /bcgov/cas-ggircs-ciip-2018-extract
  • /bcgov/cas-ggircs-ciip-2018-schema
  • /bcgov/cas-ggircs-metabase
  • /bcgov/cas-ggircs-metabase-build
  • /bcgov/cas-ggircs-metabase-builder
  • /bcgov/cas-helm
  • /bcgov/cas-metascript
  • /bcgov/cas-pipeline
  • /bcgov/cas-postgres
  • /bcgov/cas-shelf
  • /bcgov/cas-shipit
  • /bcgov/cas-shipit-engine

Files in this repository


Documentation

Contributors