Skip to content

Fixes after tests - #189

Open
EricaCandido wants to merge 32 commits into
assetsfrom
EricaCandido-188
Open

Fixes after tests#189
EricaCandido wants to merge 32 commits into
assetsfrom
EricaCandido-188

Conversation

@EricaCandido

@EricaCandido EricaCandido commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

See #188.

This PR:

  • jsonld create now runs when data.yaml* is absent — the step condition previously only checked needs_jsonld; it now also triggers when data_exists == 'false', so assets without any data file are correctly processed.
  • Avoids duplicate data file generation when data.yaml* already exists. The step now reads the existing filename from check-files outputs and uses it as the output target, preserving the original extension.
Example

Before the fix:

Asset has subject-disciplines.data.yamlld, the step runs with:

--output subject-disciplines.data.yaml   ← new file, different extension

Result: both subject-disciplines.data.yamlld and subject-disciplines.data.yaml exist.


After the fix:

check-files finds subject-disciplines.data.yamllddata_file=subject-disciplines.data.yamlld

The step runs with:

EXISTING_DATA="subject-disciplines.data.yamlld"
OUTPUT_FILE="subject-disciplines.data.yamlld"   ← same file, overwritten in place
--output subject-disciplines.data.yamlld

Result: only subject-disciplines.data.yamlld exists, updated in place.

  • Generated data file is listed in the auto-PR body — the jsonld create step now exports data_file as an output; the PR body includes it conditionally alongside the .db artifact.

  • Also supports .data.yamlld as input for apistore create — the --jsonld argument was hardcoded to ${ASSET_NAME}.data.yaml; it now reads the filename from check-files outputs, which matches both .data.yaml and .data.yamlld.

  • apistore create was receiving an empty --jsonld argument when jsonld create had just generated the data file in the same run — check-files runs before jsonld create, so data_file was empty at that point. The step now prefers jsonld-create outputs and falls back to check-files outputs when the file already existed.

  • jsonld create now runs when data.yaml* is absent — the step condition previously only checked needs_jsonld; it now also triggers when data_exists == 'false', so assets without any data file are correctly processed.

@EricaCandido EricaCandido linked an issue Apr 8, 2026 that may be closed by this pull request
22 tasks
@EricaCandido EricaCandido self-assigned this Apr 8, 2026
@EricaCandido EricaCandido changed the title PR only for test purposes Fixes after tests Apr 9, 2026
@EricaCandido
EricaCandido requested a review from ioggstream April 9, 2026 07:58
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.

[feat]: test suite for apistore-generation workflow end-to-end flow

2 participants