Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 87 #88

Merged
merged 3 commits into from
Aug 25, 2019
Merged

Fix issue 87 #88

merged 3 commits into from
Aug 25, 2019

Conversation

l0n3star
Copy link
Contributor

Issue 87: Fix practicalplants name properties to start with upper case letter

Copy link
Collaborator

@petteripitkanen petteripitkanen left a comment

Choose a reason for hiding this comment

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

Thanks, before creating such general rule I'd like to know what exactly are these erroneous cases that would be replaced, would you create a list of these and post it here?

Please don't change package-lock.json unless there is a problem with the dependencies, in that case would you revert this change?

db/practicalplants.js Show resolved Hide resolved
@l0n3star
Copy link
Contributor Author

l0n3star commented Aug 24, 2019

Sorry about modifying package-lock.json. I have reverted it.

I updated code to log erroroneous objects to stderr. Only 1 object found:

{"binomialName":"Phaseolus vulgaris","commonName":"common bean, string bean, field bean, flageolet bean, French bean, garden bean, haricot bean, pop bean, snap bean","poorNutrition":"false","hardinessZone":10,"soilTexture":["sandy","loamy","clay"],"soilPh":["neutral","alkaline"],"soilWaterRetention":["well drained"],"shade":"no shade","sun":"full sun","water":"moderate","drought":"intolerant","ecosystemNiche":[],"lifeCycle":["annual"],"herbaceousOrWoody":null,"deciduousOrEvergreen":null,"growthRate":null,"matureMeasurementUnit":null,"matureHeight":2,"matureWidth":null,"flowerType":"hermaphrodite","pollinators":[],"wind":"false","maritime":"false","pollution":"false","functions":["nitrogen fixer"],"growFrom":[],"cuttingType":[],"fertility":["self fertile"],"rootZone":null,"family":"Leguminosae","genus":"Phaseolus","salinity":null}

Copy link
Collaborator

@petteripitkanen petteripitkanen left a comment

Choose a reason for hiding this comment

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

Thanks, this fixes #87, and is related to #31.

The logging in readCrops is okay for now as this function is used only for the migration process and tests (for tests it can be disabled with npm run test 2>/dev/null), but will probably be modified during #89 when more abstract modules are created for managing the Crop and PracticalplantsCrop types.

@l0n3star
Copy link
Contributor Author

l0n3star commented Aug 25, 2019 via email

@petteripitkanen
Copy link
Collaborator

It could be clearer to log in the tests, but only if ENABLE_LOGGING is true. Then this constant would be committed as false and used only locally when needed.

@l0n3star
Copy link
Contributor Author

l0n3star commented Aug 25, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants