Skip to content

rewrite test.js / ajv / YAMLParser to fix error #12

@niclaz

Description

@niclaz

Last 2 months I have been trying fix why there were several errors in the deployments and tests: #2 #3 #6 #7 #8 #9 #10 #11

None of my previous attempts seems to have resolved the underlying issues.

Here are some details about what I discovered in trying to fix these errors and see if someone with more knowledge can make a PR edit that won't allow the test to fail once a caption throws a hyphen it's way.... or just simply rewrite the test.js

Files of relevance:**

MAKEFILE
/schema/index.yaml
/utils/test.js

PR CHANGELOG

PR 8

This error was thrown in last PR commit to fix the Github Actions issues:
https://github.com/web3privacy/data/actions/runs/10537593173/job/29199162508

  • found a typo of O instead of 0 in package
  • reviewing the full error log also noticed that action/github-pages-artifact@v3 has been bumped to v4 (depreciation deadline November 2024). I opted to rename the package actions/upload-artifact@v4

PR 9

Following up on this error:
https://github.com/web3privacy/data/actions/runs/10602350927/job/29384187270

Investigated to find that the error was because the caption entry of a speaker had many URL links within then, so breaking the configuration - added the following regex to the pattern for caption:

'^((([A-Za-z]{3,9}:(?://)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:/[+~%/.\w-]*)???(?:[-+=&;%@.\w])#?(?:[\w][A-Za-z0-9.-]+)((?:/[+~%/.\w-]*)???(?:[-+=&;%@.\w])#?(?:[\w])))?)'

PR 10

In PR 9 an attempt was made to fix an error in test.js

After some research this error came from the - symbol within the URL of one of the speakers in the data set tim-bansemer.yaml

With last PR I attempted to add an extended regex to the 'pattern' section of the schema, but it failed to fix the issue within the test run pre-deployment. This is because regex uses the hyphen symbol '-' to define a range and can not work as a string entry as a result.

To fix the root of the problem an improved test.js needs to be written that can accept hyphens '-' within the entries in 'caption' field of the speakers or other entries within the database. Potentially this would meant parsing the caption field or some other workaround, or simply defining an exception to the test parameters defined in test.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Open / Looking for Dev

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions