Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Initial Implementation #1

Merged
merged 9 commits into from
Mar 15, 2018
Merged

Initial Implementation #1

merged 9 commits into from
Mar 15, 2018

Conversation

markysoft
Copy link
Contributor

No description provided.

@markysoft markysoft added the WIP label Mar 14, 2018
@markysoft markysoft removed the WIP label Mar 14, 2018
Copy link
Contributor

@st3v3nhunt st3v3nhunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a number of trailing commas that need adding. I've added a comment about updating to the latest version of the eslint config which should point them out. The same goes for the ordering of object keys.

There are a few modules that have been updated in the latest pharmacy-data-etl. I think I've commented on the files that applies to. It would be worth using them as the basis.

package.json Outdated
"coveralls": "^3.0.0",
"eslint": "^4.6.1",
"eslint-config-airbnb-base": "^12.0.0",
"eslint-config-nhsuk": "^0.8.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest version is 0.10.0, can it be updated please?
Also, are there other, more recent versions of other dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All packages explicitly updated to latest

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need updating to the latest version of the config once the change has been merged. See nhsuk/eslint-config-nhsuk#22 for additional information

lib/config.js Outdated
@@ -0,0 +1,13 @@
const version = require('../package').version;

const config = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the object's fields be alphabetised please?

@@ -0,0 +1,135 @@
const log = require('./utils/logger');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pharmacy-data-etl has the recent improvements in. Perhaps take that file as a basis?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I brought the changes across, I've removed a few things though.
The lastRunDate is related to the ETL and not used within the toolkit, so that has been pushed up to the ETL file in the shis data ETL branch I'm verifying this against.

I've removed the tracking of the modifiedIDs and its display in the summary for now as this is not used in the shis ETL. This should be revisited when the pharmacy-data-etl is updated to use the toolkit.

I think better use could be made of tracking a modified ID list in the toolkit. At the moment the pharmacy-data-etl deletes modified records, then relies on the ETL refreshing missing records. The downside with this is if there's an error updating the record after deletion it won't be replaced. It's probably better to have out of date data than no data.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point about errors during updates on modified records. Ofc, we know that would never happen!
Perhaps they should only be removed once the new data has been acquired. That would work when the modified list doesn't contain records that have been removed, as is the case for syndication.

@@ -0,0 +1,80 @@
const async = require('async');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, have a look at the pharmacy-data-etl latest version.

@@ -0,0 +1,30 @@
const fs = require('fs');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest file in pharmacy-data-etl has a changes in for the output directory coming from config.

Code changes to abide by new lint rules
@markysoft
Copy link
Contributor Author

Changes made, the lint rule doesn't seem to be picking up missing trailing commas though.

@st3v3nhunt
Copy link
Contributor

The next latest version of eslint-config-nhsuk is needed as the changes in rules had not been exported properly. 0.12.0 should be ok.

Copy link
Contributor

@st3v3nhunt st3v3nhunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a sneaky blank line to get rid of please.

lib/config.js Outdated
@@ -1,13 +1,17 @@
const version = require('../package').version;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a blank line has snuck in.

Copy link
Contributor

@st3v3nhunt st3v3nhunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@st3v3nhunt st3v3nhunt merged commit 0dd60bd into master Mar 15, 2018
@st3v3nhunt st3v3nhunt deleted the feature/initial-work branch March 15, 2018 15:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants