Commit Graph

216 Commits (master)

Author SHA1 Message Date
Zaahir Moolla 92a5c59213
Conversions fix (#4506) (#4580)
* conversions fix

* correction
2018-01-29 22:51:36 -05:00
Rohit Upadhyay 9c5af71177 Fixes #4520, added gigapascal to pressure units to fix broken unit (#4522)
* fixed overtriggering in Game2048

* Added two more tests to help fix issue #4473

* Added regex guard in handle function to fix #4473.

* modified regex guard for #4473

* Added a test to t/Game2048.t

* Removed trailing comma.

* Conversions: Added Gigapascal to pressure units #4520

* Update Conversions.t

* Update Conversions.t

* Added test for Gbar for conversions goodie
2018-01-29 22:35:54 -05:00
Pratheev cbd6dad6c1 Conversions: JS error (#4551) (#4557)
* Conversions: JS error

* Conversions: JS error (#4551)

* Conversions: JS error (#4551)

* Conversions: JS error (#4551)
2017-12-26 21:18:25 -05:00
tossj e6b1b62739 Conversions: Changed "=" to act like "to" in implicit conversions (#4553) 2017-12-18 11:14:49 -05:00
PJ Hampton 4783cdef4d Fix micro symbol issue. (#4484) 2017-09-11 16:35:26 -04:00
jc86035 687f7de9f2 Conversions: Add light years, astronomical units, parsecs (#4438)
* Update conversions.js

* Update conversions.js

* Update conversions.js

* Update conversions.js

* Update triggers.yml

* Update triggers.yml

* Add some tests for new units

* ce

* Update Conversions.t
2017-09-02 10:54:22 +01:00
PJ Hampton e31c2260f0 Add micron alias. (#4416) 2017-08-10 15:38:27 -04:00
PJ Hampton 27c5c308de Conversions: Add case sensitivity. Fix ambiguity collisions (#4406)
* Check in work.

* Fix casing ambiguity.

* Fix ambiguity selection.

* break out of outer loop.

* fix YAML
2017-08-08 16:37:13 -04:00
PJ Hampton d17dde90b6 Conversions: US locale defaulting (#4372)
* Add tests to drive development.

Check in work.

Fixed temp triggering ambiguity.

Add experimental conversions US default.

Update the tests.

* Update based on feedback.
2017-08-08 09:46:44 -04:00
PJ Hampton 003713f78a Conversions: Add DTR and Custom Digital Units (#4359)
* Add Data Transfer speed conversions.

* Add *bi digital units.

* Finish unit + user testing.
2017-07-18 12:08:02 -04:00
PJ Hampton 6307864f65 Conversions: Updates UI + Triggering (#4345)
* Fix floz + add n miles.

* Support fractions.

* Update conversions.

* Update based on feedback.
2017-07-13 07:51:16 -04:00
PJ Hampton 0fd68b0912 Conversions: Add expanded triggers. (#4328)
* Add expanded triggers.

* Update triggering / tests.

* Remove convert as a trigger.
2017-06-29 17:29:18 -04:00
PJ Hampton 6457fdeb33 Conversions: Add general triggers. Add aditional aliases. (#4327)
* Add general triggers. Added aditional aliases.

* Remove blocking legacy code.

* Add french word for converter.

* Add missing closing brackets
2017-06-28 11:25:58 -04:00
PJ Hampton e1fe0c8fc0 Add failing tests. (#4325)
Update triggering.

Update triggering scheme.
2017-06-28 09:41:51 -04:00
PJ Hampton e3b649c2ec Conversions: Enable single unit triggers (#4316)
* Add failing tests.

Enable single unit queries.

Add units for triggering.

* Update indentation.
2017-06-21 14:30:34 -04:00
PJ Hampton 7de983bec4 Conversions: Distinguish between Imperial/US units in volume (#4310)
* Fix Imp/US Gallons.

* Fix tbsp/tsp/cups (imp/us)
2017-06-20 16:35:48 -04:00
PJ Hampton 5daa945081 Add plural aliases (#4285)
Add speed generic trigs.

Update the natural language triggering scheme.

Update yml file. Remove dep

Reduce yaml file.

mint/mool refactor requests.

Update stuff.
2017-06-20 16:25:14 -04:00
Zaahir Moolla 1c867979c1 Conversions: Support single unit input, case-insensitive fallback check (#4261)
* Allow celcisu typo, updated tests accordingly

* Store regex captures in variables

* Allow single unit inputs through guard

* Pass through single unit input to frontend

* Explcitly match guard regex, better check for valid result

* Cleanup whitespace and indentation

* Lowercase symbols that are case-insensitive

* Fix and simplify guard regex

* Better handling of named captures, ensure left unit is not only match

* Case sensitive match first, fall back to lowercase match on symbol

* fix indentation

* remove redundant m on regex match

* Removed default if duplicate.
2017-06-15 15:51:24 +01:00
PJ Hampton 9b7556fbf0 Add speed base + units. (#4282) 2017-06-12 16:08:33 -04:00
Zaahir Moolla e9e378f3c3 Conversions: Allow "celcius" typo, updated tests (#4260)
* Allow celcisu typo, updated tests accordingly

* correct typo, move new tests below

* simplify celsius regex
2017-06-09 18:17:11 +02:00
PJ Hampton 8c5ac1d651 Conversions: Broaden Triggering (#4239)
* Add triggers to list.

* Remove smart match.

* Stash.

* Broaden triggering.

* Update test formatting.

* Revert "Update test formatting."

This reverts commit 390186743c07bffa5d57025e04926d2473a3ff2e.
Reverting because this creates big conflicts in the PR. We can address
the formatting later

* simply language trigger loading

* Add acronyms for teaspoon

* remove trailing spaces

* Add test for abbreviated teaspoon and tablespoon

* remove trailing spaces
2017-06-05 20:18:18 +02:00
Parth Mehta db13126409 Conversions Suggestion: (ANGLE) - Add Missing Units (#4224)
* added custom units for angle conversions

* added triggers for angle custom units

* added front-end tests for custom angle units

* Refactoring. Categorized queries by the quantity they represent

* minor update

* added trigger for the word - microarcseconds

* replaced exponent-based values with decimal-based ones

* Updated tests to use defined units

* added the missing commas

* removed duplicate e+12 from test spec
2017-06-03 15:35:10 +01:00
PJ Hampton 07a5ba3e85 Add missing energy units. (#4223) 2017-05-24 18:06:25 -04:00
PJ Hampton afddef774c Conversions: (VOLUME) Merge Volumes / Update Triggering (#4193)
* Merged vol/liquid vol

* Added triggering for volume units.

* Added in imperial gallon name

* Fix yaml file.

* Fix triggers based on feedback.
2017-05-23 12:37:05 -04:00
PJ Hampton 4c789c0c85 Conversions: add 'deg' to temperature aliases (#4218)
* Add deg c/f to temperature aliases.

* Add aliases for c/f (temperature)
2017-05-22 15:08:03 -04:00
Yashhwanth Ram 03c20c1587 Conversions: Add pressure units (#4214)
* Add extra units for pressure conversion (#4178)

* Fix KPa to kPa and Kbar to kbar

* Fix Kbar to kbar in customUnits
2017-05-18 12:35:01 +01:00
Aditya Tandon 8e21782c41 Conversions: Adds generic triggers (#4168)
* adding triggers

* indenting key value pairs

* using smart match

* removing liq vol for now

* shortening regex

* adding test

* removing earlier test but stil it fails

* update test

* formatting test
2017-05-16 15:49:13 +01:00
Futtetennista 479aaa3f0e Conversions: Add missing units (POWER) (#4185)
* Add power custom unit and some tests

* Update triggering

* Fix spec

* Add missing comma

* Amend symbols

* Fix specs

* Fix kilowatt symbol

* Use unit value from yml file

* Amend units
2017-05-15 17:05:14 +01:00
PJ Hampton 1ce7de6bdb Add in missing duration units. (#4195) 2017-05-12 14:55:36 -04:00
Aditya Tandon 07d1553b1d Conversions: Adds missing units for Force conversion type (#4197)
* adds kilonewton unit to force type

* adds remaining units

* formats the file and  comma correction

* fixing the test

* fixing the test 2

* fixing the test part 3

* fixing the test part 4 perhaps the final one

* fixing the test part 4 surely the final one

* fixing the test part 4 definetly the final one
2017-05-12 14:20:43 -04:00
PJ Hampton aed0d1adde Conversions: Enable Frequency Conversions (#4194)
* Add in frequency units to UI.

* Add frequency support
2017-05-11 18:00:50 -04:00
PJ Hampton 422602d17a Add missing area units. (#4196) 2017-05-11 17:50:39 -04:00
PJ Hampton 37a4483460 Added triggering support for squared meters. 2017-05-01 17:42:45 +00:00
PJ Hampton 9d82301dd3 Add support for millirads. 2017-05-01 17:24:05 +00:00
PJ Hampton 0bf8da85f1 Deprecate some of the perl. 2017-04-28 21:24:10 +00:00
PJ Hampton 2cad552494 Tests adapted for mathjs 🤘 2017-04-28 20:27:51 +00:00
PJ Hampton 6f891b1a14 Checking in code (not fin.) 2017-04-28 20:15:39 +00:00
PJ Hampton dfd7d399ed Merged master. Fix conflict. 2017-04-27 17:20:10 +00:00
PJ Hampton 4651520f3e Added nat lang triggers. 2017-04-27 17:14:43 +00:00
Aditya Tandon c42daedc1e Conversions: Makes conversion queries more flexible (#4129)
* makes conversion queries more flexible

* adding removed test back and made some changes in regex
2017-04-27 11:51:04 -04:00
Aditya Tandon 40d7231443 Conversions: Improve triggering (#4118)
* Fixes #4112 conversions triggering

* test added 1

* adds alias for fahrenheit
2017-04-24 17:02:25 +01:00
Rob Emery 394cf054f3 Conversions: kB and kb (and so on) restored! (#4077)
* Conversions: Unphysical units like millibits (mb) and millibytes(mB) should be assumed as mega instead

* Conversions: Now has multiple symbols (case sensitive matches) meaning that Kb and kb both mean kilobits and KB and kB both mean kilobytes :D
2017-04-10 12:01:50 -04:00
Zaahir Moolla 71f31f7767 Revert "Remove failing test for Repo release"
This reverts commit f5c4f686f5.
2017-04-07 20:45:28 -04:00
Zaahir Moolla f5c4f686f5 Remove failing test for Repo release
/cc @mintsoft -- please fix
2017-04-06 16:58:53 -04:00
Rob Emery b6e1bd858e Conversions: Case sensitive Units/Symbol handling (#4021)
* NumbersRole: Despite the role being case insensitive, the number_style_regex isn't! Adding failing test

* NumbersRole: Fixing indentation

* Conversions: Adding tests around implicit case insensitivity in current implementation

* Conversions: Moved all case insensitive behaviour into the handle query so it's explicit rather than relying on query_lc to do the work for us

* Conversions: Adding symbol definitions for case sensitive handling

* Conversions: Fixing markup

* Conversions: UTF8 with BOM on ratios and adding symbol as a trigger

* Conversions: Symbol is now used (case sensitive) to match for factors

* Conversions: The test 'BTU to KwH' should fail (this isn't a unit), however it was causing a division by zero as get_matches wasn't finding a match and this condition wasn't handled correctly

* Conversions: Typo! KwH shouldn't trigger

* Conversions: Tests involving symbols now need to be correct according to SI

* Conversions: Tests around "oz" that should be interpreted as fl oz if the answer should unambiguously be a volume

* Conversions: Will handle ambiguity around oz for more units

* Conversions: Uncommenting tests around digital storage units and fixing them so they're actually correct
2017-04-05 18:39:19 -04:00
Rob Emery 874850ea66 Conversions: Improving triggering for degrees [cf] (#3993)
* Conversions: Handling `convert 65 degrees c to f`

* Conversions: Improving test coverage around degrees
2017-03-09 12:38:57 -05:00
Rob Emery 95c8c84dac Conversions: Improving result aesthetics (#3988)
* Conversions: User feedback has indicated a preference for 3 sig figs for small(ish) results: #3984

* Conversions: Introducing the ability to have significant figures rather than decimal places for numbers <1

* Conversions: The reality is users want to see decimal places for 'normal numbers' (1,765.432 for example) but sig figs for something around 1 so that fractions can be expressed (0.0625 for example)

* Conversions: Bringing tests inline with 3 SF for results < 1; this is more aesthetically pleasing in my opinion
2017-03-08 15:30:22 -05:00
Rob Emery 308e0675f9 Conversions: Increase significant figures in Scientific Notation (#3917)
* Conversions: The precision (i.e. number of digits after a .) and the significant digits displayed in scientific notation were the same value; there are a few issues with people requesting more accuracy in scientific notation, and none for accuracy

* Conversions: Increasing accuracy of values in tests in-line with new significant figures output

* Conversions: Adding lightyear and lightyears as accepted variants of "light year"
2017-03-07 20:19:36 +00:00
Brett Stime eb380de459 Attempts fix test again 2017-02-02 17:08:24 -06:00
Brett Stime 7bbf1f41c8 Attempts fix again 2017-02-02 17:03:21 -06:00