Skip to content

feat(examples-plugins): add package-json plugin 📦 #354

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

Merged
merged 42 commits into from
Dec 17, 2023

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Dec 11, 2023

This PR includes:

  • docs
  • logic
  • unit-tests
  • integration-tests

Additional changes:

  • adopted scoring logic. the scoring logic returned NaN for some cases. Now it throws for empty refs
  • adopted validation of CategoryConfig. Now it throws for empty refs
  • adopt validators of CategoryRef. Now min length 1
  • adopted plugin-eslint exports

@BioPhoton BioPhoton changed the title feat(examples-packages): add package-json plugin 📦 feat(examples-plugins): add package-json plugin 📦 Dec 11, 2023
@BioPhoton BioPhoton marked this pull request as ready for review December 12, 2023 19:09
@BioPhoton
Copy link
Collaborator Author

@matejchalk the currently failing 'CI / Code PushUp (push) ' job may be due to server bug in scoring logic. I DMed you.

@vmasek
Copy link
Collaborator

vmasek commented Dec 14, 2023

@BioPhoton did the discussion we had on "it's 100 not 0" yesterday help to unblock the failing problem or is it still a blocker?
I like this plugin as is and consider using it for some of the categories in projects we will be soon connecting

@BioPhoton
Copy link
Collaborator Author

Well I guess it is also a change for the backend no?

@matejchalk
Copy link
Collaborator

Well I guess it is also a change for the backend no?

Maybe, depends on what the agreement is. Our last chat was inconclusive.

  • If we don't want to support categories with all refs of weight 0, then changing the backend is not required (although the error message could be improved), instead this plugin should fix it (e.g. change weights from 0 to 1).
  • If we want to add an exception for such categories and give them a score of 0 or 1, then it needs to be changed both on the CLI and the BE.

@BioPhoton
Copy link
Collaborator Author

added a weight for now

@BioPhoton
Copy link
Collaborator Author

BioPhoton commented Dec 14, 2023

@matejchalk I implemented a solution for "empty" category refs.

It will get validated by the model now and throws in both cases. the schema and the scoring logic.

How should we deal with groups? Here I'm not sure.

@BioPhoton
Copy link
Collaborator Author

@matejchalk I resolved all comments. Thanks a lot for the review. I also added more tests for the type property.

Last thing would be this: #354 (comment)

@BioPhoton BioPhoton requested a review from matejchalk December 16, 2023 14:06
@BioPhoton BioPhoton merged commit e2f2abe into main Dec 17, 2023
@BioPhoton BioPhoton deleted the package-json-plugin branch December 17, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants