Closed ishowvel closed 1 week ago
/help
Command | Description | Example |
---|---|---|
/help |
List all available commands. | /help |
/allow |
Allows the user to modify the given label. | /allow @user1 label |
/query |
Returns the user's wallet, access, and multiplier information. | /query @UbiquityOS |
/start |
Assign yourself to the issue. | /start |
/stop |
Unassign yourself from the issue. | /stop |
/wallet |
Register your wallet address for payments. | /wallet ubq.eth |
@gentlementlegen please review this :pray:
@ishowvel, this task has been idle for a while. Please provide an update.
@ishowvel You should add Jest
tests to your pull-request.
Here is my latest QA:
The decimals should not look like this. Also, I am confused about the total here. Can you walk me through the calculations?
After the total formatted reward is calculated, the priority level is multiplied to the reward for that specific comment, this all happens in the formatting evaluation. Then after the reward is passed to content evaluation to calc and multiply it with the relevance for that specific comment.
The only change here is adding a multiplication of the priority level to the formatting reward calculation
the total itself is not multiplied but the specification and comment incentives are
for jest testing, no mock result has ever contained the "priority" key. Can you help me find a way to make the mock results for this? all results starting at the formatting module would need to be changed
Just copy the priority level names? Our config is public you can see all of them .ubiquity-os repo
Just copy the priority level names? Our config is public you can see all of them .ubiquity-os repo
There are 100's and 100's of results
There's five priority levels
I am talking about the results, each result object would need to be edited to have an extra priority key and the total and reward values would need to be edited
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Task | 1 | 400 |
Issue | Specification | 1 | 15.93 |
Issue | Comment | 9 | 112.864 |
Review | Comment | 25 | 289.688 |
Comment | Formatting | Relevance | Reward |
---|---|---|---|
In the v1 of the Ubiquibot, when a result gets evaluated, a reca… |
15.93content: content: p: score: 1 elementCount: 6 a: score: 1 elementCount: 1 ul: score: 1 elementCount: 1 li: score: 1 elementCount: 3 result: 11 regex: wordCount: 98 wordValue: 0.1 result: 4.93 |
1 | 15.93 |
This needs https://github.com/ubiquity-os/conversation-rewards/p… |
5.11content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 35 wordValue: 0.2 result: 4.11 |
0.8 | 4.288 |
To me 1 is the most straightforward to do for few reasons:- th… |
19.95content: content: p: score: 1 elementCount: 5 ul: score: 1 elementCount: 1 li: score: 1 elementCount: 3 result: 9 regex: wordCount: 111 wordValue: 0.2 result: 10.95 |
0.8 | 17.76 |
I think each plugin should output JSON not html as it is not rel… |
17.29content: content: p: score: 1 elementCount: 3 code: score: 1 elementCount: 3 result: 6 regex: wordCount: 115 wordValue: 0.2 result: 11.29 |
0.8 | 15.032 |
If you want to manipulate and convey data, HTML really is not ma… |
17.85content: content: p: score: 1 elementCount: 4 a: score: 1 elementCount: 1 result: 5 regex: wordCount: 134 wordValue: 0.2 result: 12.85 |
0.8 | 15.28 |
But then how do we consider the formatting of that output?Prac… |
19.87content: content: p: score: 1 elementCount: 5 result: 5 regex: wordCount: 159 wordValue: 0.2 result: 14.87 |
0.8 | 16.896 |
This can work, but we skyrocket coupling and to me defeat purpos… |
7.03content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 55 wordValue: 0.2 result: 6.03 |
0.8 | 5.824 |
@pavlovcik To mitigate that that's why inside the comment reward… |
10.73content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 85 wordValue: 0.2 result: 8.73 |
0.8 | 8.984 |
I realized that to carry this task properly we need to handle fl… |
9.31content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 2 result: 3 regex: wordCount: 58 wordValue: 0.2 result: 6.31 |
0.8 | 8.048 |
Agreed, I think currently there are 3 possible things to annotat… |
21.94content: content: p: score: 1 elementCount: 5 ul: score: 1 elementCount: 1 li: score: 1 elementCount: 3 code: score: 1 elementCount: 7 result: 16 regex: wordCount: 54 wordValue: 0.2 result: 5.94 |
0.8 | 20.752 |
Resolves #5 Depends on #8 Reviews looks gigantic but it's on… |
3content: content: p: score: 1 elementCount: 3 result: 3 regex: wordCount: 19 wordValue: 0 result: 0 |
0.7 | 0 |
I think in this case it makes sense because this function will r… |
12.49content: content: p: score: 1 elementCount: 2 code: score: 1 elementCount: 4 result: 6 regex: wordCount: 60 wordValue: 0.2 result: 6.49 |
0.7 | 21.086 |
It is supposed to represent a comment. Would you prefer a descri… |
4.11content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 16 wordValue: 0.2 result: 2.11 |
0.7 | 6.954 |
True, just picked this up from the previous codebase. https://rp… |
3.44content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 19 wordValue: 0.2 result: 2.44 |
0.7 | 5.416 |
Seems convoluted to me and I don't know what problem that solved… |
7.6content: content: p: score: 1 elementCount: 2 code: score: 1 elementCount: 1 result: 3 regex: wordCount: 40 wordValue: 0.2 result: 4.6 |
0.7 | 12.44 |
Changed `COMMENT` to `COMMENTED`, added jsdoc de… |
6.98content: content: p: score: 1 elementCount: 2 code: score: 1 elementCount: 2 result: 4 regex: wordCount: 24 wordValue: 0.2 result: 2.98 |
0.7 | 12.172 |
Simply makes the docs linking the code within the comment, for c… |
8.37content: content: p: score: 1 elementCount: 3 result: 3 regex: wordCount: 48 wordValue: 0.2 result: 5.37 |
0.7 | 13.518 |
In the case of a string it would coerce the value and you would … |
4.09content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 25 wordValue: 0.2 result: 3.09 |
0.7 | 6.326 |
`observe` would help to chose what we want to include an… |
7.7content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 a: score: 1 elementCount: 1 result: 3 regex: wordCount: 41 wordValue: 0.2 result: 4.7 |
0.7 | 12.58 |
Not very useful indeed. I am working on the tests on a separate … |
6.31content: content: p: score: 1 elementCount: 2 result: 2 regex: wordCount: 37 wordValue: 0.2 result: 4.31 |
0.7 | 10.034 |
See https://github.com/ubiquity-os/conversation-rewards/pull/14 … |
3.22content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 17 wordValue: 0.2 result: 2.22 |
0.7 | 5.108 |
Good point, also symbol should not be DAI but ETH isn't it? … |
7.89content: content: p: score: 1 elementCount: 2 code: score: 1 elementCount: 1 result: 3 regex: wordCount: 43 wordValue: 0.2 result: 4.89 |
0.7 | 12.846 |
Had changed it everywhere else but here, now it should be fine |
2.65content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 12 wordValue: 0.2 result: 1.65 |
0.7 | 4.31 |
This matches any whitespace character (spaces, tabs, line breaks… |
4.91content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 33 wordValue: 0.2 result: 3.91 |
0.7 | 7.474 |
By definition `dump` was just outputting results to stdo… |
9.22content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 68 wordValue: 0.2 result: 7.22 |
0.7 | 14.108 |
Un-nested them one level. I think that the `buildXrow` s… |
5.09content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 25 wordValue: 0.2 result: 3.09 |
0.7 | 8.326 |
I assumed BigInt only handles integers, and we manipulate a lot … |
3.98content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 24 wordValue: 0.2 result: 2.98 |
0.7 | 6.172 |
There is one permit generated per participating user, last run:… |
4.44content: content: p: score: 1 elementCount: 2 result: 2 regex: wordCount: 19 wordValue: 0.2 result: 2.44 |
0.7 | 7.416 |
I made it according to the previous version:- Issue Specificat… |
12.8content: content: p: score: 1 elementCount: 5 ul: score: 1 elementCount: 1 li: score: 1 elementCount: 2 result: 8 regex: wordCount: 42 wordValue: 0.2 result: 4.8 |
0.7 | 22.72 |
Wouldn't that lead to precision loss in JS and after the divisio… |
5.6content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 30 wordValue: 0.2 result: 3.6 |
0.7 | 9.04 |
That is correct. I understand now why you're confused:The valu… |
21.95content: content: p: score: 1 elementCount: 8 code: score: 1 elementCount: 7 result: 15 regex: wordCount: 65 wordValue: 0.2 result: 6.95 |
0.7 | 39.73 |
I don't think is it relevant in this scenario because we are not… |
6.37content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 48 wordValue: 0.2 result: 5.37 |
0.7 | 9.518 |
@whilefoo you are correct, these were wrongly used. I corrected … |
16.31content: content: p: score: 1 elementCount: 5 code: score: 1 elementCount: 5 result: 10 regex: wordCount: 58 wordValue: 0.2 result: 6.31 |
0.7 | 28.834 |
Example of successful comment posting with results:https://git… |
4.11content: content: p: score: 1 elementCount: 2 result: 2 regex: wordCount: 16 wordValue: 0.2 result: 2.11 |
0.7 | 6.954 |
@0x4007 I believe that if I had all the tests in this PR it will… |
4.29content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 27 wordValue: 0.2 result: 3.29 |
0.7 | 6.606 |
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Task | 1 | 400 |
Issue | Specification | 1 | 63.72 |
Issue | Comment | 9 | 451.456 |
Review | Comment | 25 | 1158.752 |
Comment | Formatting | Relevance | Priority | Reward |
---|---|---|---|---|
In the v1 of the Ubiquibot, when a result gets evaluated, a reca… |
15.93content: content: p: score: 1 elementCount: 6 a: score: 1 elementCount: 1 ul: score: 1 elementCount: 1 li: score: 1 elementCount: 3 result: 11 regex: wordCount: 98 wordValue: 0.1 result: 4.93 |
1 | 4 | 63.72 |
This needs https://github.com/ubiquity-os/conversation-rewards/p… |
5.11content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 35 wordValue: 0.2 result: 4.11 |
0.8 | 4 | 17.152 |
To me 1 is the most straightforward to do for few reasons:- th… |
19.95content: content: p: score: 1 elementCount: 5 ul: score: 1 elementCount: 1 li: score: 1 elementCount: 3 result: 9 regex: wordCount: 111 wordValue: 0.2 result: 10.95 |
0.8 | 4 | 71.04 |
I think each plugin should output JSON not html as it is not rel… |
17.29content: content: p: score: 1 elementCount: 3 code: score: 1 elementCount: 3 result: 6 regex: wordCount: 115 wordValue: 0.2 result: 11.29 |
0.8 | 4 | 60.128 |
If you want to manipulate and convey data, HTML really is not ma… |
17.85content: content: p: score: 1 elementCount: 4 a: score: 1 elementCount: 1 result: 5 regex: wordCount: 134 wordValue: 0.2 result: 12.85 |
0.8 | 4 | 61.12 |
But then how do we consider the formatting of that output?Prac… |
19.87content: content: p: score: 1 elementCount: 5 result: 5 regex: wordCount: 159 wordValue: 0.2 result: 14.87 |
0.8 | 4 | 67.584 |
This can work, but we skyrocket coupling and to me defeat purpos… |
7.03content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 55 wordValue: 0.2 result: 6.03 |
0.8 | 4 | 23.296 |
@pavlovcik To mitigate that that's why inside the comment reward… |
10.73content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 85 wordValue: 0.2 result: 8.73 |
0.8 | 4 | 35.936 |
I realized that to carry this task properly we need to handle fl… |
9.31content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 2 result: 3 regex: wordCount: 58 wordValue: 0.2 result: 6.31 |
0.8 | 4 | 32.192 |
Agreed, I think currently there are 3 possible things to annotat… |
21.94content: content: p: score: 1 elementCount: 5 ul: score: 1 elementCount: 1 li: score: 1 elementCount: 3 code: score: 1 elementCount: 7 result: 16 regex: wordCount: 54 wordValue: 0.2 result: 5.94 |
0.8 | 4 | 83.008 |
Resolves #5 Depends on #8 Reviews looks gigantic but it's on… |
3content: content: p: score: 1 elementCount: 3 result: 3 regex: wordCount: 19 wordValue: 0 result: 0 |
0.7 | 4 | 0 |
I think in this case it makes sense because this function will r… |
12.49content: content: p: score: 1 elementCount: 2 code: score: 1 elementCount: 4 result: 6 regex: wordCount: 60 wordValue: 0.2 result: 6.49 |
0.7 | 4 | 84.344 |
It is supposed to represent a comment. Would you prefer a descri… |
4.11content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 16 wordValue: 0.2 result: 2.11 |
0.7 | 4 | 27.816 |
True, just picked this up from the previous codebase. https://rp… |
3.44content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 19 wordValue: 0.2 result: 2.44 |
0.7 | 4 | 21.664 |
Seems convoluted to me and I don't know what problem that solved… |
7.6content: content: p: score: 1 elementCount: 2 code: score: 1 elementCount: 1 result: 3 regex: wordCount: 40 wordValue: 0.2 result: 4.6 |
0.7 | 4 | 49.76 |
Changed `COMMENT` to `COMMENTED`, added jsdoc de… |
6.98content: content: p: score: 1 elementCount: 2 code: score: 1 elementCount: 2 result: 4 regex: wordCount: 24 wordValue: 0.2 result: 2.98 |
0.7 | 4 | 48.688 |
Simply makes the docs linking the code within the comment, for c… |
8.37content: content: p: score: 1 elementCount: 3 result: 3 regex: wordCount: 48 wordValue: 0.2 result: 5.37 |
0.7 | 4 | 54.072 |
In the case of a string it would coerce the value and you would … |
4.09content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 25 wordValue: 0.2 result: 3.09 |
0.7 | 4 | 25.304 |
`observe` would help to chose what we want to include an… |
7.7content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 a: score: 1 elementCount: 1 result: 3 regex: wordCount: 41 wordValue: 0.2 result: 4.7 |
0.7 | 4 | 50.32 |
Not very useful indeed. I am working on the tests on a separate … |
6.31content: content: p: score: 1 elementCount: 2 result: 2 regex: wordCount: 37 wordValue: 0.2 result: 4.31 |
0.7 | 4 | 40.136 |
See https://github.com/ubiquity-os/conversation-rewards/pull/14 … |
3.22content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 17 wordValue: 0.2 result: 2.22 |
0.7 | 4 | 20.432 |
Good point, also symbol should not be DAI but ETH isn't it? … |
7.89content: content: p: score: 1 elementCount: 2 code: score: 1 elementCount: 1 result: 3 regex: wordCount: 43 wordValue: 0.2 result: 4.89 |
0.7 | 4 | 51.384 |
Had changed it everywhere else but here, now it should be fine |
2.65content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 12 wordValue: 0.2 result: 1.65 |
0.7 | 4 | 17.24 |
This matches any whitespace character (spaces, tabs, line breaks… |
4.91content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 33 wordValue: 0.2 result: 3.91 |
0.7 | 4 | 29.896 |
By definition `dump` was just outputting results to stdo… |
9.22content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 68 wordValue: 0.2 result: 7.22 |
0.7 | 4 | 56.432 |
Un-nested them one level. I think that the `buildXrow` s… |
5.09content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 25 wordValue: 0.2 result: 3.09 |
0.7 | 4 | 33.304 |
I assumed BigInt only handles integers, and we manipulate a lot … |
3.98content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 24 wordValue: 0.2 result: 2.98 |
0.7 | 4 | 24.688 |
There is one permit generated per participating user, last run:… |
4.44content: content: p: score: 1 elementCount: 2 result: 2 regex: wordCount: 19 wordValue: 0.2 result: 2.44 |
0.7 | 4 | 29.664 |
I made it according to the previous version:- Issue Specificat… |
12.8content: content: p: score: 1 elementCount: 5 ul: score: 1 elementCount: 1 li: score: 1 elementCount: 2 result: 8 regex: wordCount: 42 wordValue: 0.2 result: 4.8 |
0.7 | 4 | 90.88 |
Wouldn't that lead to precision loss in JS and after the divisio… |
5.6content: content: p: score: 1 elementCount: 1 code: score: 1 elementCount: 1 result: 2 regex: wordCount: 30 wordValue: 0.2 result: 3.6 |
0.7 | 4 | 36.16 |
That is correct. I understand now why you're confused:The valu… |
21.95content: content: p: score: 1 elementCount: 8 code: score: 1 elementCount: 7 result: 15 regex: wordCount: 65 wordValue: 0.2 result: 6.95 |
0.7 | 4 | 158.92 |
I don't think is it relevant in this scenario because we are not… |
6.37content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 48 wordValue: 0.2 result: 5.37 |
0.7 | 4 | 38.072 |
@whilefoo you are correct, these were wrongly used. I corrected … |
16.31content: content: p: score: 1 elementCount: 5 code: score: 1 elementCount: 5 result: 10 regex: wordCount: 58 wordValue: 0.2 result: 6.31 |
0.7 | 4 | 115.336 |
Example of successful comment posting with results:https://git… |
4.11content: content: p: score: 1 elementCount: 2 result: 2 regex: wordCount: 16 wordValue: 0.2 result: 2.11 |
0.7 | 4 | 27.816 |
@0x4007 I believe that if I had all the tests in this PR it will… |
4.29content: content: p: score: 1 elementCount: 1 result: 1 regex: wordCount: 27 wordValue: 0.2 result: 3.29 |
0.7 | 4 | 26.424 |
@gentlementlegen are these the desired outputs?
[ 818.482 WXDAI ]
[ 2073.928 WXDAI ]
@ishowvel try with priority 3 as it is the most likely to give very long decimals if not properly handled. My comment was about the 0.3000000004
number in my screenshot.
Coming back to my calculation question, here is the detail:
I can't seem to understand how we get 11.264
.
2 + 1.88 * 0.8 = 3.504
which would be the result on priority 1, like seen in the screenshot here
So how does priority 3 make it 11.264
? Is that the expected result @0x4007 ?
I guess 3x multiplier?
@0x4007 Sure but 3.504 * 3 = 10.512
so I don't understand where this result comes from.
https://github.com/ubiquity-os-marketplace/text-conversation-rewards/blob/f1e0ab4a3a3537a3bbd1cbed097e2c6cb0bf477d/src/parser/formatting-evaluator-module.ts#L72 cant seem to understand why theres a check for comment.score.reward as this check is bound to return always false, the first time comment.score.reward is given a value is in this very module
heres the new qa @gentlementlegen, the problem was not adding the priority mul at the right time, i should have added at the absolute end
cant seem to understand why theres a check for comment.score.reward as this check is bound to return always false, the first time comment.score.reward is given a value is in this very module
Because every module can be disabled individually, the type can technically be undefined (not within this module I agree) so this has to be done for TypeScript not to complain. I'll do a new QA as well.
New QA is ok: https://github.com/Meniole/text-conversation-rewards/issues/27#issuecomment-2456148025
Before merging, I would need that you add a Jest
test with this feature thank you. Also, the tests are already failing: https://github.com/ubiquity-os-marketplace/text-conversation-rewards/actions/runs/11668599466
Done!
All tests that failed, failed because of not supporting this feature. So I just added support in all of them
@gentlementlegen can you please review these changes? Thank you!
Any updates?
@0x4007 can you review this as you have created the specification, gentlemengen may be busy
@ishowvel Sorry I have been extremely busy yes, I'll try to have a look today. In the meantime please fix the conflicts.
@ishowvel, this task has been idle for a while. Please provide an update.
Currently out for a university, will work on this task in a few hours
idk why the tests keep failing even without the changes present in this pull request, i made a branch and force reset it to this repo's dev branch, heres the test
@ishowvel tests don't pass because the import types don't match, I think @octokit/rest
is imported when it should be @octokit/core
within the tests.
@gentlementlegen @octokit/core is imported, this has become a major blocker for me as i cant debug my other pr without working tests
tests even fail on a fresh clone of this repository
@ishowvel merge the development branch into this one.
Tests are passing 🎉 🎉 🎉
@ishowvel, this task has been idle for a while. Please provide an update.
@gentlementlegen can you please review this
Do reminders exist for reviewers like the ones for assignee
@ishowvel I tried to run the plugin with your pull-request and this is what I got https://github.com/Meniole/text-conversation-rewards/actions/runs/11868228402/job/33077194863#step:2:173
Does it work on your side?
From what I have tried using @octokit/core makes the build work but makes the tests fail and @octokit/rest makes the build fail and test work
My code changes do not produce this bug as you can see here https://github.com/ubiquity-os-marketplace/text-conversation-rewards/actions/runs/11769854878 The latest merge is also failing because of the same reason
@ishowvel Okay let me try to fix the test and build then.
Seems to be ok in my latest QA: https://github.com/Meniole/text-conversation-rewards/issues/28
Resolves #175