Skip to content

Commit

Permalink
feat(competencies): Add initial data set (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
72636c authored Jul 14, 2020
1 parent 9f964b7 commit 942867b
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 3 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,27 @@ We use this to generate mock data for our [GraphQL Playground] and [Wingman mock
## Table of contents

- [API](#api)
- [competencies](#competencies)
- [education.institutions](#educationinstitutions)
- [Development](#development)
- [Release](#release)

## API

### `competencies`

Get a list of competencies.

```typescript
import { fakeHr } from 'fake-hr';

fakeHr.competencies.all;
// string[]

fakeHr.competencies.all[0];
// Active Learning
```

### `education.institutions`

Get a list of education institutions.
Expand All @@ -34,6 +50,13 @@ fakeHr.education.institutions.all;

fakeHr.education.institutions.filter({ country: 'au', level: [6, 7] });
// EducationInstitution[]

fakeHr.education.institutions.all[0];
// {
// countries: [ 'au' ],
// name: 'Canberra Institute of Technology',
// levels: [ 2, 3, 4, 5 ]
// }
```

## Development
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
"format": "skuba format",
"lint": "skuba lint",
"release": "yarn build && skuba release",
"start": "skuba start src/readme.ts",
"test": "skuba test"
},
"sideEffects": false,
"skuba": {
"entryPoint": "src/index.ts",
"entryPoint": null,
"template": "oss-npm-package",
"type": "package",
"version": "3.7.4"
Expand Down
7 changes: 7 additions & 0 deletions src/competencies/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as oNet from './oNet';
import * as theSims from './theSims';

/**
* A list of all competencies in our limited data set.
*/
export const all: string[] = [oNet.abilitiesAndSkills, theSims.skills].flat();
98 changes: 98 additions & 0 deletions src/competencies/oNet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/**
* A selection of abilities and skills from the O*NET 24.3 Database, sponsored
* by the U.S. Department of Labor, Employment and Training Administration.
*
* The database is licensed under a Creative Commons Attribution 4.0
* International License.
*
* {@link https://www.onetcenter.org/license_db.html}
*/
export const abilitiesAndSkills: string[] = [
'Active Learning',
'Active Listening',
'Arm-Hand Steadiness',
'Auditory Attention',
'Category Flexibility',
'Complex Problem Solving',
'Control Precision',
'Coordination',
'Critical Thinking',
'Deductive Reasoning',
'Depth Perception',
'Dynamic Flexibility',
'Dynamic Strength',
'Equipment Maintenance',
'Equipment Selection',
'Explosive Strength',
'Extent Flexibility',
'Far Vision',
'Finger Dexterity',
'Flexibility of Closure',
'Fluency of Ideas',
'Glare Sensitivity',
'Gross Body Coordination',
'Gross Body Equilibrium',
'Hearing Sensitivity',
'Inductive Reasoning',
'Information Ordering',
'Installation',
'Instructing',
'Judgment and Decision Making',
'Learning Strategies',
'Management of Financial Resources',
'Management of Material Resources',
'Management of Personnel Resources',
'Manual Dexterity',
'Mathematical Reasoning',
'Mathematics',
'Memorization',
'Monitoring',
'Multilimb Coordination',
'Near Vision',
'Negotiation',
'Night Vision',
'Number Facility',
'Operation and Control',
'Operation Monitoring',
'Operations Analysis',
'Oral Comprehension',
'Oral Expression',
'Originality',
'Perceptual Speed',
'Peripheral Vision',
'Persuasion',
'Problem Sensitivity',
'Programming',
'Quality Control Analysis',
'Rate Control',
'Reaction Time',
'Reading Comprehension',
'Repairing',
'Response Orientation',
'Science',
'Selective Attention',
'Service Orientation',
'Social Perceptiveness',
'Sound Localization',
'Spatial Orientation',
'Speaking',
'Speech Clarity',
'Speech Recognition',
'Speed of Closure',
'Speed of Limb Movement',
'Stamina',
'Static Strength',
'Systems Analysis',
'Systems Evaluation',
'Technology Design',
'Time Management',
'Time Sharing',
'Troubleshooting',
'Trunk Strength',
'Visual Color Discrimination',
'Visualization',
'Wrist-Finger Speed',
'Writing',
'Written Comprehension',
'Written Expression',
];
129 changes: 129 additions & 0 deletions src/competencies/theSims.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/**
* A selection of skills from The Sims, a popular video game series developed by
* Maxis and published by Electronic Arts.
*
* {@link https://en.wikipedia.org/w/index.php?title=The_Sims&oldid=967293808}
*
* {@link https://sims.fandom.com/wiki/Skill?oldid=921991}
*
* {@link https://sims.fandom.com/wiki/Secret_skill?oldid=921396}
*/
export const skills: string[] = [
'Acting',
'Air Guitar',
'Alchemy',
'Anger Management',
'Archaeology',
'Baking',
'Ball Fighting',
'Ballet',
'Bass',
'Blocks',
'Bot Building',
'Bowling',
'Broom Riding',
'Bubble Blowing',
'Bug Eating',
'Charisma',
'Chess',
'Cleaning',
'Club Dancing',
'Collecting',
'Comedy',
'Communication',
'Consignment',
'Cooking',
'Couple Counselling',
'Creativity',
'Dancing',
'Darts',
'Diving',
'DJ Mixing',
'Dominoes',
'Drafting',
'Driving',
'Drums',
'Entertainer',
'Fabrication',
'Fairy Magic',
'Fire Prevention',
'Firewalking',
'Fishing',
'Flower Arranging',
'Foosball',
'Gambling',
'Gardening',
'Golfing',
'Gourmet Cooking',
'Guitar',
'Hacking',
'Handiness',
'Herbalism',
'Homework',
'Hopscotch',
'Horseshoes',
'Hunting',
'Imagination',
'Inventing',
'Juice Fizzing',
'Juice Pong',
'Jumping',
'Karaoke',
'Knitting',
'Lifelong Happiness',
'Logic',
'Lycantropy',
'Magic',
'Martial Arts',
'Media Production',
'Meditation',
'Mischief',
'Mixology',
'Nectar Making',
'Nursery Rhyme',
'Painting',
'Parenting',
'Performance Artist',
'Pet Training',
'Photography',
'Physiology',
'Piano',
'Ping Pong',
'Pipe Organ',
'Racing',
'Research & Debate',
'Riding',
'Robotics',
'Rock Climbing',
'Rocket Science',
'Rubble Clearing',
'Sales',
'Scouting',
'Scuba Diving',
'Sculpting',
'Shuffleboard',
'Singing',
'Skating',
'Snake Charming',
'Snowboarding',
'Social Networking',
'Spellcasting',
'Street Art',
'Styling',
'Tai Chi',
'Talking',
'Tattooing',
'Thinking',
'Trampoline',
'Veterinarian',
'Video Gaming',
'Violin',
'Walking',
'Waterskiing',
'Wellness',
'Wildlife',
'Windsurfing',
'Work Ethic',
'Xylophone',
'Yoga',
];
1 change: 1 addition & 0 deletions src/fakeHr.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * as competencies from './competencies';
export * as education from './education';
6 changes: 4 additions & 2 deletions src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { fakeHr } from '.';

describe('app', () => {
it('defines education exports', () => {
expect(fakeHr.education.institutions).toBeDefined();
it('defines exports', () => {
expect(fakeHr.competencies.all).toBeDefined();
expect(fakeHr.education.institutions.all).toBeDefined();
expect(fakeHr.education.institutions.filter).toBeDefined();
});
});
9 changes: 9 additions & 0 deletions src/readme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable no-console */

import { fakeHr } from '.';

console.log('hello there');

console.log(fakeHr.competencies.all[0]);

console.log(fakeHr.education.institutions.all[0]);

0 comments on commit 942867b

Please sign in to comment.