Commit Graph

195 Commits (db131264090b7c41c53ca993c553437808695fe5)

Author SHA1 Message Date
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
Brett Stime cbeb0a8beb Attempts to fix test after formatting change 2017-02-02 16:35:25 -06:00
Rob Emery d05d64dfe7 Conversions: Adding support for n'm" format (#3891)
* Conversions: Failing test for n'm" format

* Conversions: Adding a totally specific workaround for 3 feet 5 inches or 6'1" queries

* Conversions: Accuracy correct relative to output

* Conversions: Improving test coverage around whitespace

* Conversions: Removing duplication

* Conversions: Handling foot and inch

* Conversions: Adding tests for feet and inches into another unit and failing test for the UK common "n foot m", commonly used for height

* Conversions: Implemeting the UK common 6 foot 1 query support
2017-01-26 09:42:27 -05:00
Nalin Bhardwaj 0baa2851c4 Added tests 2017-01-25 16:07:24 +00:00
Nalin Bhardwaj b0cc4c5ec7 Added nanometers, fixed others 2017-01-25 15:50:29 +00:00
Rob c2392f005d Conversions: Ensuring support for "degrees centigrade" 2017-01-22 18:28:43 +00:00
Rob 0793cda4e1 Conversions: Adding failing test for convert 50 centigrade to fahrenheit 2017-01-22 18:04:16 +00:00
jagtalon 7172d0d85a Update tests for the template group. 2016-08-10 19:43:28 +00:00
Rob cee4bac8d7 Conversions: Updating tests to be accurate 2016-06-10 18:43:15 +01:00
Rob b7d3e0a80a Conversions: Adding failing test for the definition of a gallon 2016-06-10 18:38:03 +01:00
Rob 5d867bd768 Conversions: Adding test for whitespace dependency https://github.com/duckduckgo/zeroclickinfo-goodies/issues/3160 2016-05-30 14:02:39 +01:00
Ben Moon 83b9bbd6b7 Fix newline at end of file 2016-05-16 14:19:39 +01:00
Ben Moon 5f85cf4121 Update Goodies to use Test::Deep
* Ensure Test::Deep is imported.

* Replace '-ANY-' with ignore()

* Replace regexes with re(...)
2016-05-16 14:07:57 +01:00
Rob Emery 10eac5a798 Conversions: Adding tests around singular for mmHg 2016-05-11 20:03:11 +01:00
Rob Emery 54ef078da5 Conversions: Singular test for ton of TNT 2016-05-11 18:54:16 +01:00
Rob Emery 3831d2bf71 Conversions: Fixing tnt vs TNT for @guiltydolphin 2016-05-11 18:45:02 +01:00
Rob Emery 3085cef17a Conversions: Again I think the intent behind the query `ml in gallons` is "how many ml are there in a gallon?" 2016-05-09 20:11:38 +01:00
Rob Emery a76e193f8d Conversions: I think the query how many cm in metres should return the answer "1 meter = 100cm" 2016-05-09 20:09:58 +01:00
Rob Emery e684a14a5f Conversions: TNT will always be returned as tnt now 2016-05-09 20:03:19 +01:00
Rob Emery 2540ff11b1 Mintsoft/conversions/squarefeet (#3006)
* Conversions: The plural of square foot is square feet NOT square foots

* Conversions: Fixing test for #3004
2016-05-08 11:25:12 +01:00
zblair cced8f79d9 Add a trailing comma to the last element in a list 2016-04-30 16:43:12 +00:00
zblair ff1fd34b1b Added some additional unit tests 2016-04-30 08:59:03 +00:00