Commit graph

647 commits

Author SHA1 Message Date
Tiffany Bennett
dd866eeb4e Comment out tests failing because of fp precision 2022-12-13 18:10:16 -08:00
Tiffany Bennett
03b8b1ac07 Add --no-fail-fast to coverage build 2022-12-13 18:08:56 -08:00
dependabot[bot]
d08365d8f9
Bump express from 4.17.1 to 4.17.3 in /web (#135)
Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.17.3.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.17.3)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-13 17:53:15 -08:00
Tiffany Bennett
672c915331
Add an integration test to rink-sandbox (#128) 2022-04-16 15:58:03 -07:00
Tiffany Bennett
07bdee9eb8
Add more tests (#127) 2022-04-15 23:04:51 -07:00
Tiffany Bennett
aedcb26f40 Fix clippy warning 2022-04-15 21:51:56 -07:00
Tiffany Bennett
1612065466
Fix code coverage (#122) 2022-04-10 21:18:24 -07:00
Tiffany Bennett
8f5700110a
Quantity namespacing (#125)
Makes quantities occupy a different namespace from units. This means you can no longer write them in expressions as though they were units, which was confusing.

Fixes #12, which is one of the longest standing bugs in Rink.
2022-04-10 12:27:10 -07:00
Tiffany Bennett
1ae832a2ba Propagate errors instead of printing them 2022-04-10 11:03:58 -07:00
Tiffany Bennett
b921d7a68d
Context refactor (#124)
Yet another giant refactor PR. I'm trying to clean up the Context internals. I moved a lot of the fields into a new Registry object with the hopes of making future refactors to it easier.

A lot of things are poorly named, and I've been going through and updating those. Some of these fields I didn't even know what they did until I studied them carefully, since I'd forgotten over time.

This makes some breaking changes to the Defs serialization format, but I didn't touch Unit or Substance which are the only ones that are used by the backend currently.

Some other refactors I did:
- Updated quantities to no longer reference units, only base units and other quantities.
- Added a debug dump option to the CLI for showing the contents of the Context.
- Merged Def::BaseUnit & Canonicalization.
- Merged Def::Prefix & SPrefix. I don't actually know what SPrefix stood for originally (standalone? definitely not short).
- Prefixes are now required to be dimensionless.
- Added missing tests for the Def serialization format.

I'm not entirely done yet though. There's still one dependency on Context from the loader, which is on the eval() method, used by units and substances. I'm still thinking about how I can reduce that coupling.
2022-04-10 10:37:56 -07:00
Tiffany Bennett
4c1d138b2a Make clippy happy 2022-04-03 21:21:50 -07:00
Tiffany Bennett
2ffa977936 Add tokei ignore file 2022-04-03 21:10:38 -07:00
Tiffany Bennett
d7e497815f
Code reorganization (#123)
Much of the code organization and architecture of Rink has been the same since I hacked this project together in 2016. In this PR, I spent about a day moving files around and refactoring code.

I'm hoping that cleaning up the codebase like this will help make it easier to change going forwards. There's a lot of duplicated code, few abstractions are used.

In order to make this not break everything I did it in tiny steps, verifying the test suite each time. The original branch has >30 commits in it as a result.
2022-04-03 21:04:47 -07:00
Tiffany Bennett
6dce181bc1 Release v0.6.3 2022-03-24 19:35:06 -07:00
Tiffany Bennett
e9dcf57926 Fix readme reference 2022-03-24 19:34:58 -07:00
Tiffany Bennett
5e9d36edc3 Move cli to member of workspace 2022-03-24 19:25:38 -07:00
Tiffany Bennett
98835ae604 Add NO_COLOR support (fixes #120) 2022-03-24 19:03:44 -07:00
Tiffany Bennett
85c7ea921c Update rustyline to v9 2022-03-24 18:35:03 -07:00
Tiffany Bennett
ebf7bca80e Update color-eyre to v0.6 2022-03-24 18:34:00 -07:00
Tiffany Bennett
5be14432af Update dirs to v4 2022-03-24 18:32:16 -07:00
Tiffany Bennett
c222af5f4a Update to clap v3 2022-03-24 18:29:49 -07:00
Tiffany Bennett
4689cc7a56 Run cargo update (Fixes #121) 2022-03-24 18:23:05 -07:00
Tiffany Bennett
f10a39c01e Quick fix for ECB API no longer including Ruble 2022-03-08 21:19:06 -08:00
Stephanie Wilde-Hobbs
f7e2ffdf11
Save history on error as well as success (#112)
Saving line history is important when there's a syntax error so you can recall the line to fix it.
2021-12-23 11:38:54 -08:00
Tiffany Bennett
6e3fecff57 Version 0.6.2 2021-10-31 15:10:02 -07:00
Tiffany Bennett
aa303062f9 Better reciprocal unit formatting (Fixes #91) 2021-10-31 15:00:53 -07:00
Tiffany Bennett
61814eeb72 Add updated element names (Fixes #105) 2021-10-31 14:48:35 -07:00
Tiffany Bennett
11a04b89b2 Fix missing whitespace in to_spans impl 2021-10-31 14:30:04 -07:00
Tiffany Bennett
0b9991333e Make previous result configurable 2021-10-31 14:18:52 -07:00
Tiffany Bennett
1db8030548
[README] Add scoop to package manager list 2021-09-19 11:28:01 -07:00
Adrian
474c407d15
Provide access to result of previous calculation (#107) 2021-08-20 20:44:37 -07:00
V
c36a666174
Make "now" respect system timezone (#101)
Most users probably want to manipulate time relative to the present in
their local timezone. This brings rink's functionality closer to similar
tools.

In date(1):

	> date -d 'now + 1 hour'
	Fri 23 Jul 09:54:02 CEST 2021

Before:

	> now
	2021-07-23 06:54:05.699222874 +00:00 (now)
	> now + 1 hour
	2021-07-23 07:54:10.940110380 +00:00 (in an hour)

After:

	> now
	2021-07-23 08:54:13.219044877 +02:00 (now)
	> now + 1 hour
	2021-07-23 09:54:15.555096329 +02:00 (in an hour)
2021-07-23 00:14:19 -07:00
Tiffany Bennett
0f4ebf9451
Sandboxing (#100) 2021-06-05 18:18:00 -07:00
Tiffany Bennett
ffd31b320e Fix clippy warnings 2021-05-30 16:46:27 -07:00
Tiffany Bennett
2ffe164f60 Fix warnings 2021-05-30 16:18:53 -07:00
kat
f7399b1dfd
Fixed CTRL+C behaviour (#95) 2021-05-12 13:45:13 -07:00
Tiffany Bennett
8d73153565 Bump CLI to 0.6.1 2021-04-25 14:24:36 -07:00
Tiffany Bennett
5eb5b135fe Create tempfile in final dir (Fixes #92) 2021-04-25 14:22:51 -07:00
Tiffany Bennett
af49f5d8b1 Release v0.6.0 2021-04-05 17:31:39 -07:00
Tiffany Bennett
b1b8d89b65
Remove repology badge 2021-04-05 16:30:00 -07:00
Tiffany Bennett
709b5d01b4
Output highlighting (#90)
Adds a token tree based representation for Rink's output, allowing it to be colored. Adds support for this to Rink CLI to get improved appearance.
2021-04-05 16:04:46 -07:00
Tiffany Bennett
c453dfdeb9
Update dependencies (#89) 2021-04-01 16:13:17 -07:00
Tiffany Bennett
31834d1092 Add user agent string 2021-04-01 14:18:26 -07:00
Tiffany Bennett
622dd31901
CLI improvements (#86) 2021-02-14 20:25:27 -08:00
Tiffany Bennett
20cc99c583 Cache currency data in a file for better reliability 2021-02-14 16:46:17 -08:00
Yeechan Lu
d2dbd1d3d9
Fix month in JavaScript binding (#84)
In JavaScript, Date.getMonth returns a zero-based value
(where zero indicates the first month of the year).
2020-11-25 00:14:52 -08:00
Tiffany Bennett
492da8cfca
Add release build action (#83)
Create build artifacts for multiple platforms using Github Actions
2020-11-07 17:51:46 -08:00
Tiffany Bennett
e9561ded3d
Add link to contribution guide 2020-10-01 19:15:53 -07:00
Tiffany Bennett
b1fad6be3c
Use unified currency API endpoint (#76) 2020-09-20 20:45:22 -07:00
Tiffany Bennett
1921c42986 Add Repology badge & update homepage link 2020-09-20 13:32:32 -07:00