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

feat: cli init #96

Merged
merged 10 commits into from Feb 14, 2024
Merged

feat: cli init #96

merged 10 commits into from Feb 14, 2024

Conversation

Keyrxng
Copy link
Contributor

@Keyrxng Keyrxng commented Feb 11, 2024

Resolves #95

Comment based parsing as opposed to permit based.

Accounting for the multiple formats going back as far as the start of 2023 I never went back any further thinking it would only be covering the last year.

See readme for usage instructions.

Originally I started with merged pull requests then grabbed the closing issue reference and worked backwards that way but after trying it from an all issues approach it felt like the results were better.

No we should include every contribution that exists.

So it's no longer just tallying contributions from the last year as per the spec but all time payments?

QA

airdrop-cli/package.json Outdated Show resolved Hide resolved
Copy link
Member

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

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

Code is looking pretty solid. Still have to get around to do that spot check but I'm optimistic.

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 11, 2024

After you give this a look over let me know if this is the way forward of if the permit based approach would be better?

I think this with a bit more refinement would be the more comprehensive approach

I started a fresh bot with fresh DB and I do not have any permits. So when you said just parse the permits you meant scrape the claim urls from comments and decode the permit data from that?

@0x4007
Copy link
Member

0x4007 commented Feb 11, 2024

I think that parsing the encoded permits from within the GitHub comments is fine. I consider basically all of those already transferred and credited for. I only invalidated a few, and its okay to give credit for them for now.

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 11, 2024

validating the non_payment repos I found one newer style comment that was missed so I'll account for that.

I'll try improve the debugging data as well

@0x4007
Copy link
Member

0x4007 commented Feb 12, 2024

I appreciate you taking the time to check your work. You can mark this as ready to review when you resolve that.

@0x4007 0x4007 marked this pull request as draft February 12, 2024 06:17
@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 12, 2024

  • Now pulling all permits: 448 tracked

  • Payments assigned to users: 434

  • Only format unaccounted for is:
    0xcodercrane **[ [ CLAIM 500 ]** ]()for 0x00868BB3BA2B36316c2fc42E4aFB6D4246b77E46 but only seen here which looks to be old testing formats.

  • Root outputs: User UBQ Totals, All Payments, All Permits, All Repos w/o Payment, Decoded permits, Unmatched permits

I've caught every case I can find and done my best to attribute the right payment to the correct user with the correct reward origin

Validating using my own figures as before it appears to be much better

There are about 25ish attributions to "No Assignee" but can be verified easily enough, I'll be happy to do the rest of the manual reviewing once we know the data processing logic isn't changing again either as part of this spec or a new one whatever the case may be.

Still trying to improve it but it's there or there abouts atm

Tally Table
devpanther,5335.849999999999
gitcoindev,4314.2
No assignee,4249.799999999999
seprintour,3833.95
wannacfuture,3750.35
sergfeldman,3743.7
Steveantor,3641.45
molecula451,2917.8
0xcodercrane,2284.4500000000003
Hodlatoor,1832.0000000000002
whilefoo,1774.9499999999998
Keyrxng,1574.5
byteballet,1336.8
pavlovcik,1294.0000000000002
zgorizzo69,1200
rndquu,1097.1999999999998
Venoox,875
bojan07,871.0000000000001
eugenioclrc,850
web4er,806.25
EtherealGlow,761.35
BeanieMen,639.4
FibrinLab,300
Draeieg,275.65
Sadaf-A,214.14999999999998
diamondnegroni,202.7
harjaapdhillon16,200
PhantomCracker,184.89999999999998
baibhavKumar1,124.5
pwilson77,100
sweetapplepumpkinpie,56.25
b4s36t4,56.25
devtestubq,56.25
rotcivegaf,50
starlitnightsky,37.5
tungbq,25
aditygrg2,18.75
rndquu2,16

@Keyrxng Keyrxng marked this pull request as ready for review February 12, 2024 07:29
@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 13, 2024

I don't think I can take this any further without input on it as is, naturally there will be some manual validation required regardless but if you've any ideas on how to further improve the validity lmk

@0x4007
Copy link
Member

0x4007 commented Feb 13, 2024

Hey last thing but I'm hoping to see a workflow run can you add that so I can have it run in the GitHub action?

You just need to yarn add tsx and then yarn tsx the script name and it should work.

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 13, 2024

Is tsx a requirement if it's running fine with tsc? I can run the action I used before and output the files to the action logs but that doesn't use tsx.

The trouble is that tsx accepts some of the tsconfig props but not all, takes no custom config itself and throws silly type errors for packages specifically viem's utility types - info from here

If it's a requirement I'll see about a workaround

@0x4007
Copy link
Member

0x4007 commented Feb 13, 2024

This doesn't sound right because I've been using tsx for probably about a year now and never saw a situation where compiling is superior or necessary. I never had issues running packages etc. Although to be fair I never used it with viem

Perhaps you can take a little while to try and make it work as I believe it was listed in the requirements. In the meantime I'm going to need to get back to my computer to review your work to make sure that it checks out. I've been away from my computer these last few days so it's been hard to thoroughly review and approve things.

Unfortunately I'm the only one working on the review team of this particular project! Thanks for your patience.

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 13, 2024

I'll see what I can do with it then pav and I'll make the final push in an hour or so, should be a bit cleaner for you to review too

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 13, 2024

Good to go now, the gha will be deleted I assume as it's only for QA?

also the commitlint seems to be failing on the ts-template, I tried to solve it using the ubq-dollar repo config file and the example config they provide through the error, swapping out the package.json mention of it but it just kept repeatedly failing for me telling me the rules were empty and to set some.

Only noticed it after trying to commit while inside my original airdrop-cli repo after having brought in the template whereas before I had been working from this repo inside /airdrop-cli so none of the hooks were hitting

The problem I had with tsx was that I was calling it against a collection of functions without calling anything but calling it with just the IIFE is fine, lesson learned :))

@0x4007
Copy link
Member

0x4007 commented Feb 14, 2024

I have to see the commit lint error you're talking about because I haven't experienced that.

I think we can keep the GitHub Action.

I started spot checking the CSVs and so far so good. I was a bit confused about the 25 permits that failed to parse in the CI log. There also seems to be a mismatch with the total amounts of payment permits issued and how many are on chain (it was like 350 on chain and like 450 in the logs if I remember correctly) I had to suddenly get off my computer am and posting this comment from a taxi.

I plan to look closer tonight.

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 14, 2024

Appreciate it Pav, I'm hoping to get this merged asap bit tight for cash atm lmao

I'll give things another once over later and see if I can improve the output any further. It's been a balancing act trying to capture everything and create useful datasets without swarming them with noise while collecting actionable debug data.

Once the CLI is complete and ready for use before the airdrop, is your vision for it to remove the need for manual validation all together or will results still be validated manually considering?

@0x4007
Copy link
Member

0x4007 commented Feb 14, 2024

Can give the full review post merge given the delay and initial approval

description: "Displays and processes the the available debug data.",
})
export default class extends Command {
@metadata
Copy link
Member

Choose a reason for hiding this comment

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

👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll be sure to remove those

Copy link
Member

Choose a reason for hiding this comment

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

Is this file necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is not I was using it to track a few things I'll be sure to remove it

@0x4007
Copy link
Member

0x4007 commented Feb 14, 2024

Screenshot 2024-02-15 at 03 01 15 lol i need to change the settings

auto-merge was automatically disabled February 14, 2024 18:02

Merge queue setting changed

@0x4007 0x4007 merged commit 371bf3a into ubiquity:main Feb 14, 2024
@Keyrxng
Copy link
Contributor Author

Keyrxng commented Feb 15, 2024

Appreciate it Pav thank you

@0x4007
Copy link
Member

0x4007 commented Feb 16, 2024

Why is it DEBUG and not parsing the correct amount? I assume DEBUG means multiple permits found on the page. Looks like there are mistakes:

Issue # Amount Repository Currency Payee Type URL                                      
14 200 devpool-directory-bounties WXDAI FernandVEYRIER assignee ubiquity/devpool-directory-bounties#14                                      
12 0 work.ubq.fi DEBUG FernandVEYRIER assignee ubiquity/work.ubq.fi#12                                      

@0x4007
Copy link
Member

0x4007 commented Feb 16, 2024

I realize now that I asked for addresses to be the identifiers instead of the user name. This is relevant because I jumbled up the addresses in the database at some point. Why dont you change the script to use addresses? Like I am pretty sure I mentioned in the specification, for the airdrop I only need addresses (GitHub username doesn't help me send an airdrop)

5 0 ubiquibot-kernel DEBUG whilefoo conversation ubiquity/ubiquibot-kernel#5

@0x4007
Copy link
Member

0x4007 commented Feb 16, 2024

@Keyrxng I just finished a high level spot check. The only thing that really needs to be changed is to use addresses instead I think.

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.

Command-Line Tool Totaling Contributor Rewards for UBQ Airdrop
2 participants