Skip to content

Commit

Permalink
Merge pull request #3 from nswdpc/20230928
Browse files Browse the repository at this point in the history
Merge 20230928
  • Loading branch information
JamesDPC authored Nov 27, 2023
2 parents 00cc1dd + 6966007 commit d8dab61
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# NSW Governance Arrangements

This module provides some base data files and a service class to load data from a YAML representation of the NSWDPC Governance Arrangements Chart from those files into data stuctures and return them.
This module provides some base data files and a service class to load data from a YAML representation of The Cabinet Office NSW Governance Arrangements Chart from those files into data stuctures and return them.

The data can be used to represent form controls and lists of governance data.

### Usage

Load the v20230405 dataset
Load the v20230928 dataset

```php
// @var GovernanceArrangementsService
$service = GovernanceArrangementsService::create(20230405);
$service = GovernanceArrangementsService::create(20230928);
// @var array
$data = $service->getData();
```
Expand Down Expand Up @@ -41,7 +41,7 @@ composer require nswdpc/governance-arrangements

## Configuration

+
+

## Maintainers

Expand Down
132 changes: 132 additions & 0 deletions data/yml/governance-arrangements/20230928.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
name: 'nswgov-clusters-agencies'
version: 20230928
supersedes: 20230701
created: '2023-09-28'
fromdate: '2023-09-28'
title: 'Governance Arrangements Chart from 28 September 2023'
author: 'The Cabinet Office NSW'
source: 'https://www.nsw.gov.au/departments-and-agencies/the-cabinet-office/resources/governance-arrangements-chart'
description: >
Please note: This chart contains information about Ministers, State-owned
corporations established under Schedule 5 to the State Owned Corporations Act
1989 (NSW), and those NSW Government agencies that are established under
Schedule 1 to the Government Sector Employment Act 2013 (NSW). There are a
range of other NSW statutory bodies and statutory positions that are
established under other Acts. Information on which portfolio statutory bodies
and positions holders are part of can be obtained by consulting the
Allocation of the Administration of Acts and the legislation that establishes
the statutory body or officer (available at www.legislation.nsw.gov.au). The
NSW legislation website is the primary source of information about the legal
structure of the NSW Government.
clusters:
'Premier and Cabinet':
departments:
- 'Premier''s Department'
- 'The Cabinet Office'
executive_agencies:
- 'Natural Resources Commission Staff Agency'
- 'Parliamentary Counsel''s Office'
separate_agencies:
- 'Ombudsman''s Office'
- 'Public Service Commission'
- 'New South Wales Electoral Commission Staff Agency'
- 'Office of the Law Enforcement Conduct Commission'
- 'Office of the Inspector of the Law Enforcement Conduct Commission'
- 'Independent Pricing and Regulatory Tribunal Staff Agency'
'Education':
departments:
- 'Department of Education'
other_services:
- 'Teaching Service'
separate_agencies:
- 'TAFE Commission (Senior Executives) Staff Agency'
- 'NSW Education Standards Authority Staff Agency'
'Environment and Planning':
departments:
- 'Department of Planning and Environment'
executive_agencies:
- 'NSW Reconstruction Authority Staff Agency'
separate_agencies:
- 'Office of the Independent Planning Commission'
- 'Environment Protection Authority Staff Agency'
corporations:
- 'Landcom'
- 'Essential Energy'
- 'Water NSW'
- 'Hunter Water Corporation'
- 'Sydney Water Corporation'
'Jobs and Tourism':
departments:
- 'Department of Enterprise, Investment and Trade'
executive_agencies:
- 'Destination NSW Staff Agency'
- 'Art Gallery of NSW Trust Staff Agency'
- 'Australian Museum Trust Staff Agency'
- 'Library Council of NSW Staff Agency'
- 'Trustees of the Museum of Applied Arts and Sciences Staff Agency'
- 'Sydney Opera House Trust Staff Agency'
- 'Museums of History NSW and State Records Authority NSW Staff Agency'
separate_agencies:
- 'Office of the Greyhound Welfare and Integrity Commission'
- 'Independent Liquor and Gaming Authority Staff Agency'
- 'NSW Independent Casino Commission Staff Agency'
'Treasury':
departments:
- 'Treasury'
executive_agencies:
- 'Infrastructure NSW Staff Agency'
- 'SAS Trustee Corporation Staff Agency'
'Health':
departments:
- 'Ministry of Health'
executive_agencies:
- 'Health Professional Councils Authority Office'
- 'Mental Health Commission Staff Agency'
other_services:
- 'NSW Health Service'
separate_agencies:
- 'Health Care Complaints Commission Staff Agency'
'Transport':
departments:
- 'Department of Transport'
other_services:
- 'Transport Service'
corporations:
- 'Newcastle Port Corporation (known as the Port Authority of New South Wales)'
- 'Transport Asset Holding Entity of New South Wales'
'Customer Service':
departments:
- 'Department of Customer Service'
executive_agencies:
- 'Service NSW'
separate_agencies:
- 'Information and Privacy Commission'
- 'Office of the Independent Review Officer'
'Communities and Justice':
departments:
- 'Department of Communities and Justice'
executive_agencies:
- 'Crown Solicitor''s Office'
- 'Fire and Rescue NSW'
- 'Office of the NSW Rural Fire Service'
- 'Office of the NSW State Emergency Service'
- 'Institute of Sport Staff Agency'
- 'Office of Sport'
- 'Multicultural NSW Staff Agency'
- 'Venues NSW Staff Agency'
other_services:
- 'NSW Police Force'
separate_agencies:
- 'Office of the Director of Public Prosecutions'
- 'Legal Aid Commission Staff Agency'
- 'NSW Crime Commission Staff Agency'
- 'Office of the Children''s Guardian'
- 'Office of the Ageing and Disability Commissioner'
'Regional NSW':
departments:
- 'Department of Regional NSW'
executive_agencies:
- 'Local Land Services Staff Agency'
corporations:
- 'Forestry Corporation'
39 changes: 39 additions & 0 deletions tests/v20230928Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace NSWDPC\GovernanceArrangements\Test;

require_once( dirname(__FILE__) . '/GovernanceArrangementsServiceTest.php' );

/**
* Test for v20230928
*/
class v20230928Test extends GovernanceArrangementsServiceTest {

/**
* @var float
*/
protected $dataVersion = 20230928;

/**
* @var int|null
*/
protected $totalClusters = 10;

public function testClusterDepartments() {
$data = $this->serviceInstance->getData();
$clusterData = $this->serviceInstance->getCluster('Premier and Cabinet');
$this->assertEquals(2, count($clusterData['departments']));
}

public function testClusterFromDepartment() {
$data = $this->serviceInstance->getData();
$clusterName = $this->serviceInstance->getClusterFromDepartment('Premier\'s Department');
$this->assertEquals('Premier and Cabinet', $clusterName);
}

public function testGetClusterFromAgency() {
$data = $this->serviceInstance->getData();
$cluster = $this->serviceInstance->getClusterFromAgency('Premier\'s Department');
$this->assertEquals('Premier and Cabinet', $cluster );
}
}

0 comments on commit d8dab61

Please sign in to comment.