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

As a Gitcoin contributor, I want better and updated data fixtures, so that QAing my changes and getting started is easier. #4292

Closed
danlipert opened this issue Apr 26, 2019 · 26 comments · Fixed by #4601

Comments

@danlipert
Copy link
Contributor

danlipert commented Apr 26, 2019

User Story

As a Gitcoin contributor, I want better and updated data fixtures, so that QAing my changes and getting started is easier.

Why Is this Needed

There are currently some fixtures which help bootstrap the process of creating test data when running Gitcoin locally. These fixtures are automatically added when you run Gitcoin via docker, and include things like creating users and adding tokens. Adding fixtures to include newer features like Grants, and updating the current fixtures will make developers' lives easier.

More info: https://docs.djangoproject.com/en/2.2/howto/initial-data/

Description

Type: Feature

Current Behavior

Booting the Gitcoin app via docker for the first time adds some initial data.

Expected Behavior

Booting the Gitcoin app via docker should add more data to cover the new features that have been integrated into the app.

Definition of Done

Additional fixtures are present when booting the app for the first time. Every feature in the app contains a variety of data on a fresh build, including Bounties. For each feature, there should be different model instances that demonstrate the variations of models we see in the production app. For example: in Grants, there should be grants that are set to various funding levels, which grant contributions already in place from various test users. For Bounties, there should be a combination of both public and private bounties, a demonstration Hackathon event set up, etc. For users, there should be a variety of test users already set up that have initiated various activities, such as applying to work on bounties, setting up their profile, sending Kudos, etc. These are just examples and are in no way comprehensive. All test data should be on the Rinkeby testnet if applicable.

Data Requirements

The success of the new fixture data can be measured in how many more community contributions we receive, as well as decreasing the amount of bugs in PRs and deploy regressions.

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1.2 ETH (187.8 USD @ $156.5/ETH) attached to it.

@aahutsal
Copy link

@owocki I'd take that if I could ;)
my this and that are still under review

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Workers have applied to start work.

These users each claimed they can complete the work by 12 months from now.
Please review their action plans below:

1) speedyfixer has applied to start work (Funders only: approve worker | reject worker).

Mi roadmap:

  1. Check current fixtures
  2. Design good fixtures for easy testing purpose
  3. Create fixtures

I could start on next Thursday.

Learn more on the Gitcoin Issue Details page.

@owocki
Copy link
Contributor

owocki commented Apr 29, 2019

@gutsal-arsen -- hey @danlipert did this bounty not me!

@kuhnchris
Copy link
Contributor

Also this kind of depends on what @danlipert wants - the test system usually is bound to the Rinkeby test net. What we could do is that we use the already delivered geth localnet, deploy our contracts there and sync couple of older "live" bounties there and pack it up.
Or do you just want to have the django dataset/migrations prefilled?

@acolytec3
Copy link
Contributor

Is this still an open bounty? I'd like to work on it if so as it was a pain point for me when working on another PR and would love to take a stab at resolving. :-)

@danlipert, any input what direction you are looking to take regarding where test data/contracts should live (localnet vs rinkeby) given @kuhnchris's comment?

@danlipert
Copy link
Contributor Author

Hi @acolytec3 - I'd love for you to work on this bounty, I just sent you an invite via email as well. And yes, lets put all the blockchain data on rinkeby please 👍

@gitcoinbot
Copy link
Member

gitcoinbot commented May 24, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 4 months from now.
Please review their action plans below:

1) acolytec3 has been approved to start work.

  1. Work out a comprehensive list of data elements needed and validate with bounty funder to se what I'm missing (e.g. bounties, users, grants)
  2. Identify what can be setup as fixtures using manage.py loaddata and then create fixtures
  3. Identify all the elements that need to be on rinkeby and then setup
  4. See how much can be automated as part of docker-compose process (presumably most or all)

Learn more on the Gitcoin Issue Details page.

@kuhnchris
Copy link
Contributor

Hey @danlipert - great, thanks for the info!
@acolytec3 - most of the stuff should be syncable via opensea/rinkeby (kudos, bounties), the contracts should be available in the settings.py for rinkeby, if you are done, the easiest would prolly be to dump the data via django dumpdata and django loaddata as you mentioned (https://docs.djangoproject.com/en/2.2/howto/initial-data/), that can easily be integrated into the docker process, where we already do the provisioning.

If you got any indepth questions let us know in here. :-)

Thanks,
Chris

@acolytec3
Copy link
Contributor

acolytec3 commented May 28, 2019 via email

@kuhnchris
Copy link
Contributor

Regarding your Kudos/Grants - if you are just seeing the "signing up form" then you are missing the permission in the backend to create grants - this may be a legacy issue due to them joining later.from there you can create grants via the grant-creation modal within the gitcoin app. hope that helps, else let me know in slack/here!

@danlipert
Copy link
Contributor Author

@acolytec3 I'd like to see more users, maybe 20 or more so that we can test the user directory pagination effectively, along with applying filters, etc. For bounties, lets have at least two different accounts with two different addresses funding them. For kudos and grants, you just need to be a superuser to access those pages directly.

@acolytec3
Copy link
Contributor

acolytec3 commented May 31, 2019 via email

@acolytec3
Copy link
Contributor

Just to confirm I am still working on this. I've got fixtures for grants and then basic user profiles that seem to load consistently across a DB refresh but getting bounty activity to stay in sync is proving tricky. Since only certain parts of the process get stored on Rinkeby, things tend to get out of sync when I refresh. I'll get a WIP PR up today or tomorrow with the fixtures that seem to work reliably.

acolytec3 pushed a commit to acolytec3/web that referenced this issue Jun 5, 2019
@gitcoinbot
Copy link
Member

@acolytec3 Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link
Member

@acolytec3 Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@acolytec3
Copy link
Contributor

@gitcoinbot, I did, see PR #4601.

@gitcoinbot
Copy link
Member

@acolytec3 Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@acolytec3
Copy link
Contributor

@danlipert Why is the bot spamming this thread? Do I need to submit work on the issue on gitcoin to get it to shut up? I still need to clean up some of the fixtures and probably add a few more bounties before I think it's really done.

@owocki
Copy link
Contributor

owocki commented Jun 24, 2019

it will follow up every few days when it doesnt see action on the github issue or PR. can set it to snooze if it's annoying.

@acolytec3
Copy link
Contributor

acolytec3 commented Jun 24, 2019 via email

@gitcoinbot
Copy link
Member

@acolytec3 Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1.2 ETH (366.32 USD @ $305.26/ETH) has been submitted by:

  1. @acolytec3

@danlipert please take a look at the submitted work:


acolytec3 pushed a commit to acolytec3/web that referenced this issue Aug 31, 2019
danlipert pushed a commit that referenced this issue Dec 17, 2019
* First pass at required data - no kudos

* Fixes #4292

* Data round 2

* More fixtures

* Add initial kudos data

* Add profiles, tips, and custom avatars.

* Clean up junk fixtures and add usage guidelines

* Add more kudos/feedback

* Add DAI

* New users//bounties/feedback

* More bounties

* Fixes #4292

* Fix broken grant data

* Fix grant issues

* Load profiles data!

* Data loading tweaks

* One more tweak for grants

* Add additional grant subscription.

* Additional grants data

* Skip updated_avatar activity if loading from fixture
@gitcoinbot
Copy link
Member

Backend Star ⚡️ A *Backend Star* Kudos has been sent to @acolytec3 for this issue from @danlipert. ⚡️

Nice work @acolytec3!
Your Kudos has automatically been sent in the ETH address we have on file.

@gitcoinbot
Copy link
Member

⚡️ A tip worth 0.24000 ETH (31.54 USD @ $131.41/ETH) has been granted to @acolytec3 for this issue from @danlipert. ⚡️

Nice work @acolytec3! Your tip has automatically been deposited in the ETH address we have on file.

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 1.2 ETH (152.37 USD @ $126.97/ETH) attached to this issue has been approved & issued to @acolytec3.

Additional Tips for this Bounty:

  • danlipert tipped 0.2400 ETH worth 30.47 USD to acolytec3.

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 a pull request may close this issue.

6 participants