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

model refinements #50

Closed
BioPhoton opened this issue Sep 16, 2023 · 0 comments · Fixed by #55
Closed

model refinements #50

BioPhoton opened this issue Sep 16, 2023 · 0 comments · Fixed by #55
Assignees

Comments

@BioPhoton
Copy link
Collaborator

BioPhoton commented Sep 16, 2023

I see a couple of potential flaws in the current data structure the we should address.

  • The type RunnerOutput seems odd and I feel we should restructure the data to just and array of audit Output's and the name should be AuditOutput
  • At the moment not all meta informations are included in the report.
    The missing informations are:
    • plugin.meta
    • categories => should contain metadata
  • The naming could get more aligned
    • use xConfig for the different top level props in CoreConfig
    • use xMeta for all metaInformation and store it under a property called meta
      • use it for CoreConfig
      • use it for PluginConfig
        • is missing description to align with AuditMeatdata
      • use it for AuditMetadata
        • we should rename title to name to align with PluginConfig.meta.name
      • AuditGroup does not contain meta information => it should
    • use xOutput for the different results from a plugin execution
    • use xReport for data structures living in Report
    • remove label
    • always use title instead of name
  • To generate reports the configuration is needed. This tightly couples the report with the content of the code-pushup.config.js file at the time of execution. The report should be interpretable independent of the core config
@BioPhoton BioPhoton changed the title include all meta information in report data model refinements Sep 16, 2023
BioPhoton added a commit that referenced this issue Sep 22, 2023
This PR includes:

- [x] Replaced `RunnerOutput` schema object with `AuditOutput` array
```typescript
// before
type RunnerOutput = {
  audits: AuditOutputSchema[]
}

// after
type AuditOutputsSchema
``` 
- [x] Introduce reusable schema for `date` and `duration` 
- [x] Renamed `name` to `title` in plugin metadata to align with audit
metadata
- [x] Introduce reusable schema for meta information and use it in audit
and plugin
```typescript
// shared meta
type MetaInformation {
  slug: string,
  title: string,
  description?: string,
  docsUrl?: string
}
```
- [x] Rename `AuditMetadata` to `Audit`
- [x] Remove slug from `metaSchema`
- [x] Add `metaSchema` to `CategoryConfig`
- [x] Add `metaSchema` to `AuditGroup`
- [x] Flatten `PluginConfig#meta` information into `PluginConfig`
- [x] Remove `label` from all meat information
- [x] Add meta info to `AuditOutput`
- [x] Add meta info to `PluginOutput`
- Make report independent from config
  - [x] Add categories to report
  - [x] refactor report to MD
  - [x] refactor report to stdout 

closes #50

---------

Co-authored-by: Matěj Chalk <[email protected]>
@vmasek vmasek added this to the MVP milestone Oct 6, 2023
@BioPhoton BioPhoton mentioned this issue Oct 18, 2023
3 tasks
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.

2 participants