This repository has been archived by the owner. It is now read-only.
Message Broker - Producer - User import from CSV sources.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
resources
src
tests
.editorconfig
.gitignore
.travis.yml
README.md
catchUp.sh
composer.json
gulpfile.js
mbp-user-import.config.inc
mbp-user-import.php
mbp-user-import_manageData.config.inc
mbp-user-import_manageData.php
notes.txt
package.json
phpunit.xml
ruleset.xml

README.md

User Import System

1. mbp-user-import

An application (producer) in the Quicksilver (Message Broker) system. Imports user data from CVS formatted files that create message entries in the userImportQueue.

2. mbc-user-import

An application (consumer) in the Quicksilver (Message Broker) system. Processes user data import messages in the userImportQueue.

3. mbp-logging-reports

Generate reports of the on going user import process. Reports are sent through email and Slack.


mbp-user-import

Installation

Production

  • $ composer install --no-dev

Development

  • *composer install --dev

Update

  • $ composer update

###Gulp Support Use a path directly to gulp ./node_modules/.bin/gulp or add an alias to your system config (.bash_profile) as alias gulp='./node_modules/.bin/gulp'

See gulpfile.js for configuration and combinations of tasks.

####Linting

  • gulp lint

Test Coverage

Run all tests

  • $ ./vendor/bin/phpunit --verbose tests

or

  • $ npm test

or

  • $ gulp test

PHP CodeSniffer

  • php ./vendor/bin/phpcs --standard=./ruleset.xml --colors -s mbp-user-import.php mbp-user-import.config.inc mbp-user-import_manageData.php mbp-user-import_manageData.config.inc src bin tests Listing of all coding volations by file.

  • php ./vendor/bin/phpcbf --standard=./ruleset.xml --colors mbc-user-import.php mbc-user-import.config.inc mbp-user-import_manageData.php mbp-user-import_manageData.config.inc src bin tests Automated processing of files to adjust to meeting coding standards.

References: Advanced-Usage

Watch Files

Runs PHPUnit tests and basic PHP Lint in a watchful state.

  • gulp

###From Command Line

mbp-user-import.php

$ php mbp-user-import.php <environment> <target file> <source>

  • Enviroment: <local | dev | prod>
  • Target File: <"nextFile" or specific CSV file name>
  • Source: <Niche | AfterSchool>

mbp-user-import_manageData.php

$ php mbp-user-import_manageData.php <environment> <source> <page> <start date>

  • Environment: <local | dev | prod>
  • Source: <Niche | AfterSchool>
  • Page: optional for "mobileapp" Sources, defaults to 1.
  • Start Date: optional for "mobileapp" Sources, defaults to the start of yesterday. One of:
    • Format YYYY-MM-DD
    • "all" to get all available data for source value.
    • "today" for a date for yesterday