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

Ecalc 1687 docs tests coupling #738

Merged
merged 7 commits into from
Dec 16, 2024
Merged

Ecalc 1687 docs tests coupling #738

merged 7 commits into from
Dec 16, 2024

Conversation

kjbrak
Copy link
Contributor

@kjbrak kjbrak commented Dec 13, 2024

Have you remembered and considered?

  • I have remembered to update documentation
  • I have remembered to update manual changelog (docs/drafts/next.draft.md)
  • I have remembered to update migration guide (docs/docs/migration_guides/)
  • I have committed with BREAKING: in footer or ! in header, if breaking
  • I have added tests (if not, comment why)
  • I have used conventional commits syntax (if you squash, make sure that conventional commit is used)
  • I have included the Jira issue ID somewhere in the commit body (ECALC-XXXX)

Why is this pull request needed?

Organization of tests and coupling between docs and tests to avoid redundancy of example test data and to assure example cases in docs are tested.

What does this pull request change?

  • Using only one version of advanced and simple example in libecalc example folder. Making sure to use the correct version and deleting the other one.
  • Modifying the mdx files to account for changes in yaml files etc.
  • Modifying the yaml files to make tests pass if needed.
  • Adding config plugin in docusaurus for example alias to make things more neat and smoother to update in the future.
  • Include Drogon in libecalc examples and integrate it into the testing framework. Add some basic tests such as validate etc.

Issues related to this change:

ECALC-1687

@kjbrak kjbrak requested review from a team as code owners December 13, 2024 12:28
Copy link
Contributor

@jsolaas jsolaas left a comment

Choose a reason for hiding this comment

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

Looks good! Now it should be easy to add a test that makes sure our examples does not have invalid results!

I didn't look at the yaml changes or snapshot changes 👀

'docusaurus-plugin-module-alias',
{
alias: {
'@examples': resolve(__dirname, '../src/libecalc/examples/'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI. I first tried to implement the webpack alias as a small custom plugin (in its own folder/files) to avoid 3rd party dependency. But that did not work. I then tried this plugin and it worked as intended.

Copy link
Contributor Author

@kjbrak kjbrak Dec 16, 2024

Choose a reason for hiding this comment

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

I just updated the snapshot for that one test since it failed after the changes. I am not sure how to validate if it is correct or not? (or if its just fine to update the snapshot when other tests passes?)

Copy link
Collaborator

@TeeeJay TeeeJay left a comment

Choose a reason for hiding this comment

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

nice. @frodehk what you think? you are more into this

Copy link
Contributor

@frodehk frodehk left a comment

Choose a reason for hiding this comment

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

Nice work!

@frodehk
Copy link
Contributor

frodehk commented Dec 13, 2024

nice. @frodehk what you think? you are more into this

The yaml changes (advanced model) are in line with the last update of the advanced model, as far as I can see. Including an update with CONTROL_MARGIN for required components.

@kjbrak kjbrak merged commit 6b0c1a0 into main Dec 16, 2024
8 checks passed
@kjbrak kjbrak deleted the ECALC-1687-docs-tests-coupling branch December 16, 2024 12:28
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.

4 participants