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

show feature availability in API specification #289

Merged
merged 1 commit into from
May 21, 2019

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented May 21, 2019

Issue Number

N/A

Overview

  • I have removed the"priority" from the specification and added a "status" indicating the availability of a particular feature in the API.

Comments

As requested by Chris. Makes it easier for externals to know what's available or not.

A preview:

image

image

image

image

image

@KtorZ KtorZ requested a review from piotr-iohk May 21, 2019 06:20
@KtorZ KtorZ self-assigned this May 21, 2019
@KtorZ KtorZ force-pushed the KtorZ/feature-availability branch from 114d587 to accd9b3 Compare May 21, 2019 06:46

Return a list of known wallets, ordered from oldest to newest.

> (1) Wallets are currently returned without any particular ordering.
Copy link
Member

@jonathanknowles jonathanknowles May 21, 2019

Choose a reason for hiding this comment

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

Hi @KtorZ. A quick question: don't the following statements contradict one another?

Return a list of known wallets, ordered from oldest to newest.

Wallets are currently returned without any particular ordering.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Hence the "incomplete" status 😅

Copy link
Member

Choose a reason for hiding this comment

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

@KtorZ Fair enough.
One more question: is it actually desirable that we (eventually) return wallets in order from oldest to newest? Where does this requirement come from? I see there is a related issue here: #250

Copy link
Member Author

Choose a reason for hiding this comment

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

The requirement comes from Daedalus, as the first consumers of this API they requested this and, I believe it makes sense from the API-perspective to have some sort of ordering available when listing resources on a particular endpoint such that clients may expect the same response from the same request and somewhat predict what the answer should be.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for clarifying!

@@ -798,16 +798,21 @@ paths:
tags: ["Wallets"]
summary: List
description: |
Priority [Very High]
<p align="right">status: <strong>incomplete¹</strong></p>
Copy link
Member

@jonathanknowles jonathanknowles May 21, 2019

Choose a reason for hiding this comment

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

@KtorZ

Interesting that it is possible to embed HTML within these fields. Questions:

  1. Is this HTML specific to one tool?
  2. Does this embedding of HTML affect interoperability with other tools that visualize swagger specifications?

Copy link
Member Author

@KtorZ KtorZ May 21, 2019

Choose a reason for hiding this comment

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

Hmmm.

  1. No.
  2. No -- shouldn't.

The swagger specification is quite clear about the "description" field and says:

A short description of the application. GFM syntax can be used for rich text representation.

Where GFM here stands for Github Flavored Markdown. Being markdown means that, we are allowed to put basic HTML too since that's what markdown is the end :)

Copy link
Member Author

Choose a reason for hiding this comment

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

It means we should be able to add emojis too

O-M-G.

Copy link
Member

Choose a reason for hiding this comment

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

Understood. Thanks for the clarification!

@KtorZ
Copy link
Member Author

KtorZ commented May 21, 2019

bors try

iohk-bors bot added a commit that referenced this pull request May 21, 2019
@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 21, 2019

try

Build succeeded

@@ -887,7 +897,8 @@ paths:
operationId: listTransactions
tags: ["Transactions"]
summary: List
description: Priority [High]
description: |
<p align="right">status: <strong>not implemented</strong></p>
Copy link
Member

Choose a reason for hiding this comment

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

To me, the phrase "not implemented" might be read as a deliberate decision to not implement something.

Perhaps we could write "not yet implemented" here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm... I don't think so 😅 ... If something wasn't going to be implemented, it wouldn't be in the API specification at all in a first place. Here the meaning is quite unambiguous.

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough. (My original thinking was prompted by the use of "isn't yet supported." elsewhere.)


Return a list of known wallets, ordered from oldest to newest.

> (1) Wallets are currently returned without any particular ordering.
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for clarifying!

@@ -887,7 +897,8 @@ paths:
operationId: listTransactions
tags: ["Transactions"]
summary: List
description: Priority [High]
description: |
<p align="right">status: <strong>not implemented</strong></p>
Copy link
Member

Choose a reason for hiding this comment

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

Fair enough. (My original thinking was prompted by the use of "isn't yet supported." elsewhere.)

@KtorZ
Copy link
Member Author

KtorZ commented May 21, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request May 21, 2019
289: show feature availability in API specification r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

N/A

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have removed the"priority" from the specification and added a "status" indicating the availability of a particular feature in the API.

# Comments

<!-- Additional comments or screenshots to attach if any -->

As requested by Chris. Makes it easier for externals to know what's available or not. 

A preview:

![image](https://user-images.githubusercontent.com/5680256/58074137-bdc26f00-7ba4-11e9-95b5-33ff723e0f2a.png)

![image](https://user-images.githubusercontent.com/5680256/58074150-c6b34080-7ba4-11e9-83a5-943877e14fd7.png)

![image](https://user-images.githubusercontent.com/5680256/58074161-cfa41200-7ba4-11e9-8d83-0948b129e856.png)

![image](https://user-images.githubusercontent.com/5680256/58074177-dd599780-7ba4-11e9-867e-5047012b1f93.png)

![image](https://user-images.githubusercontent.com/5680256/58074188-e5193c00-7ba4-11e9-845c-cacfd34a9fc9.png)

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


295:  fix shuffle tests in CoinSelectionSpec once and for all  r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#291 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have removed the precondition about the list length in favor of a correct generator

# Comments

<!-- Additional comments or screenshots to attach if any -->

Turns out that the problem wasn't much the confidence interval that was being too strict as I thought in the past, but simply that the precondition was too hard to satistify. Indeed, quickcheck does generate empty lists quite often, (more than 10% of the generated values actually) and this caused the `checkCoverage` to give up very early despite the coverage being okay. 

I've switched to using a generator of `NonEmptyList` instead of the precondition and re-run both statistical tests a thousand times:

```
            replicateM_ 1000 $ quickCheck (checkCoverageWith lowerConfidence prop_shuffleNotDeterministic)
```

without observing any failure. So I've got quite some confidence that this is now fixed..

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <matthias.benkort@gmail.com>
@KtorZ
Copy link
Member Author

KtorZ commented May 21, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request May 21, 2019
283: Sqlite: add checkpoints and transactions to DBLayer r=KtorZ a=rvl

Relates to issue #154.

# Overview

- Implemented saving and loading of transaction history to SQLite
- Implemented saving and loading of wallet checkpoints to SQLite, including the state for sequential scheme address discovery.

# Comments

- The SqliteSpec testing is a bit light. However, there should be enough implemented for all the DBSpec tests to work. Also I plan to finish the QSM tests tomorrow which should provide even more coverage.
- Cascading deletes are not working with persistent-sqlite, which is annoying.
- DB indexes are missing on some fields. (Needs some custom SQL, can be fixed later)


289: show feature availability in API specification r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

N/A

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have removed the"priority" from the specification and added a "status" indicating the availability of a particular feature in the API.

# Comments

<!-- Additional comments or screenshots to attach if any -->

As requested by Chris. Makes it easier for externals to know what's available or not. 

A preview:

![image](https://user-images.githubusercontent.com/5680256/58074137-bdc26f00-7ba4-11e9-95b5-33ff723e0f2a.png)

![image](https://user-images.githubusercontent.com/5680256/58074150-c6b34080-7ba4-11e9-83a5-943877e14fd7.png)

![image](https://user-images.githubusercontent.com/5680256/58074161-cfa41200-7ba4-11e9-8d83-0948b129e856.png)

![image](https://user-images.githubusercontent.com/5680256/58074177-dd599780-7ba4-11e9-867e-5047012b1f93.png)

![image](https://user-images.githubusercontent.com/5680256/58074188-e5193c00-7ba4-11e9-845c-cacfd34a9fc9.png)

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


292: Fix Change Calculation (#286) r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#286 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have extended our test to capture the issue highlighted in the bug
- [x] I have looked at the test failing
- [x] I have fixed the calculation of the change which was... weirdly way off the specification..

# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
Co-authored-by: Pawel Jakubas <pawel.jakubas@iohk.io>
Co-authored-by: KtorZ <matthias.benkort@gmail.com>
@KtorZ
Copy link
Member Author

KtorZ commented May 21, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request May 21, 2019
283: Sqlite: add checkpoints and transactions to DBLayer r=KtorZ a=rvl

Relates to issue #154.

# Overview

- Implemented saving and loading of transaction history to SQLite
- Implemented saving and loading of wallet checkpoints to SQLite, including the state for sequential scheme address discovery.

# Comments

- The SqliteSpec testing is a bit light. However, there should be enough implemented for all the DBSpec tests to work. Also I plan to finish the QSM tests tomorrow which should provide even more coverage.
- Cascading deletes are not working with persistent-sqlite, which is annoying.
- DB indexes are missing on some fields. (Needs some custom SQL, can be fixed later)


289: show feature availability in API specification r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

N/A

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have removed the"priority" from the specification and added a "status" indicating the availability of a particular feature in the API.

# Comments

<!-- Additional comments or screenshots to attach if any -->

As requested by Chris. Makes it easier for externals to know what's available or not. 

A preview:

![image](https://user-images.githubusercontent.com/5680256/58074137-bdc26f00-7ba4-11e9-95b5-33ff723e0f2a.png)

![image](https://user-images.githubusercontent.com/5680256/58074150-c6b34080-7ba4-11e9-83a5-943877e14fd7.png)

![image](https://user-images.githubusercontent.com/5680256/58074161-cfa41200-7ba4-11e9-8d83-0948b129e856.png)

![image](https://user-images.githubusercontent.com/5680256/58074177-dd599780-7ba4-11e9-867e-5047012b1f93.png)

![image](https://user-images.githubusercontent.com/5680256/58074188-e5193c00-7ba4-11e9-845c-cacfd34a9fc9.png)

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


292: Fix Change Calculation (#286) r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#286 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have extended our test to capture the issue highlighted in the bug
- [x] I have looked at the test failing
- [x] I have fixed the calculation of the change which was... weirdly way off the specification..

# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


296: Improve bech32 coveralls r=KtorZ a=piotr-iohk

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have replaced `isLeft` with `Left ...` here and there to improve coveralls score a bit


# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
Co-authored-by: Pawel Jakubas <pawel.jakubas@iohk.io>
Co-authored-by: KtorZ <matthias.benkort@gmail.com>
Co-authored-by: Piotr Stachyra <piotr.stachyra@iohk.io>
Copy link
Contributor

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

That's really nice thing to have! 👍

@KtorZ KtorZ merged commit b346d17 into master May 21, 2019
@iohk-bors iohk-bors bot deleted the KtorZ/feature-availability branch May 21, 2019 13:17
rvl added a commit that referenced this pull request Nov 4, 2019
Fixes stack stack/nix build errors resulting from Haskell.nix update.
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.

None yet

3 participants