Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Refactor: Use an static method to create Entities + Split Data and Metadata#110

Merged
0xGabi merged 4 commits intomasterfrom
refactor-entities-creation
Jul 5, 2020
Merged

Refactor: Use an static method to create Entities + Split Data and Metadata#110
0xGabi merged 4 commits intomasterfrom
refactor-entities-creation

Conversation

@0xGabi
Copy link
Copy Markdown
Contributor

@0xGabi 0xGabi commented Jul 4, 2020

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 4, 2020

Codecov Report

Merging #110 into master will decrease coverage by 0.17%.
The diff coverage is 3.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
- Coverage   28.12%   27.94%   -0.18%     
==========================================
  Files          54       54              
  Lines         889      873      -16     
  Branches      145      142       -3     
==========================================
- Hits          250      244       -6     
+ Misses        639      629      -10     
Flag Coverage Δ
#unittests 27.94% <3.89%> (-0.18%) ⬇️
Impacted Files Coverage Δ
packages/connect-core/src/entities/App.ts 0.00% <0.00%> (ø)
packages/connect-core/src/entities/Repo.ts 0.00% <0.00%> (ø)
packages/connect-core/src/entities/Role.ts 0.00% <0.00%> (ø)
packages/connect-thegraph/src/parsers/apps.ts 92.85% <100.00%> (-0.48%) ⬇️
packages/connect-thegraph/src/parsers/repos.ts 92.85% <100.00%> (-0.90%) ⬇️
packages/connect-thegraph/src/parsers/roles.ts 66.66% <100.00%> (-2.30%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43280b1...4ef6c80. Read the comment docs.

Comment thread docs/api-reference/app.md
data.manifest
)

const metadata: Metadata = [artifact, manifest]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Now we have a clear distinction between data and metadata. Probably during creation as well we will handle the overrides of the few contract that miss repos on aragonPM (Kernel, ACL, EVM, etc)

return this.#metadata[1] as AragonManifest
}

get abi(): Abi {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I only include getter for really useful properties. Otherwise, the dev can get them from the metadata files.

await repoEntity.create(data)

return repoEntity
return Repo.create(data, connector)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is how we create the entities now.

@0xGabi 0xGabi requested a review from bpierre July 4, 2020 00:49
Copy link
Copy Markdown
Contributor

@bpierre bpierre left a comment

Choose a reason for hiding this comment

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

😍

@0xGabi 0xGabi merged commit f56bac5 into master Jul 5, 2020
@0xGabi 0xGabi deleted the refactor-entities-creation branch July 5, 2020 17:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants