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

Recenter yaml files around brands instead of companies #7

Merged
merged 3 commits into from
Jan 8, 2024
Merged

Conversation

idris
Copy link
Contributor

@idris idris commented Jan 7, 2024

Brands are now top-level and the most important entity.
Companies are a secondary entity, which you can link brands to if it's useful/relevant.

Added a status enum to brands and companies, to decide whether they are neutral, brands to support, or brands to avoid.
Thus, there is no difference between an alternative brand and a brand, other than the status. This also allows brands to transition from "avoid" to "neutral" or "support", if they cease harmful activities.

Also added a schema, with validation (#4), to ensure that all yaml files match the schema.

@idris idris requested a review from THM222 January 7, 2024 19:17
@idris idris force-pushed the unify-brands branch 2 times, most recently from 657c1b0 to 26f0ce5 Compare January 7, 2024 19:24
print('Validating', len(company_files), 'companies')
for file in company_files:
if not validate_with_schema(file, company_schema):
exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of exitting on first failure, i think it'd be good to check and log messages for all failures, then exit

@THM222 THM222 merged commit bda1caf into main Jan 8, 2024
2 checks passed
@THM222 THM222 deleted the unify-brands branch January 31, 2024 21:26
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.

2 participants