-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support for ActorPacks #66
Conversation
Thanks for the PR. Are there any test actorpacks to test with in the repo? And some tags that use those actors? Would be great for testing (tests/testfiles). I have not done a full review yet but here are a couple of things I noticed. Problems
Nits
|
tagpack/db/tagstore_schema.sql
Outdated
CREATE TABLE actor_jurisdictions ( | ||
id SERIAL PRIMARY KEY, | ||
actor_id VARCHAR REFERENCES actor(id) ON DELETE CASCADE, | ||
country_id VARCHAR REFERENCES concept(id) ON DELETE CASCADE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this constraint to the concepts table intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe i misunderstand the schema. Have seen that the tests also treat coutries as concepts.
tagpack/tagstore.py
Outdated
@@ -227,7 +332,7 @@ def get_quality_measures(self, currency="") -> float: | |||
keys = ["count", "avg", "stddev"] | |||
return {keys[i]: v for row in self.cursor.fetchall() for i, v in enumerate(row)} | |||
|
|||
def calculate_quality_measures(self) -> float: | |||
def calculate_quality_measures(self) -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this quality view something we want to keep up to date in general? If so maybe add call to this to tp-tool tagstore refresh_views
Thanks for the feedback,
|
Thanks for the clarification and updates. I have tested what I can test so far (import of actors, computing quality stats etc.) and quickly skimmed over the source-code. I think its got to go like it is right now. Any objections? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested validation and insert for tagpacks and actorpacks, looking good so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have integrated recent changes from develop. I think it all looks fine. Will merge into develop now.
@cybersec-code: there have been some changes regarding folder structure of the repo and some others infrastructure change like enforced formatting and linting via pre-commit hooks. If you have any questions or troubles while developing, let me know.
Thanks everyone for the effort.
An initial set of features to support ActorPack validation and insertion into the database. A new taxonomy was introduced (country) as well as new tables to the schema.