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

Change Base image purpose code #145

Merged
merged 5 commits into from
Mar 3, 2022
Merged

Change Base image purpose code #145

merged 5 commits into from
Mar 3, 2022

Conversation

josecelano
Copy link
Member

Issue: #143

Verified

This commit was signed with the committer’s verified signature.
josecelano Jose Celano

Verified

This commit was signed with the committer’s verified signature.
josecelano Jose Celano
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2022

MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.05s
✅ CREDENTIALS secretlint yes no 1.29s
✅ GIT git_diff yes no 0.01s
✅ JSON eslint-plugin-jsonc 8 0 1.48s
✅ JSON jsonlint 2 0 0.67s
✅ JSON prettier 2 0 1.74s
✅ JSON v8r 2 0 2.86s
✅ MARKDOWN markdownlint 16 0 0.6s
✅ MARKDOWN markdown-link-check 16 0 13.89s
✅ MARKDOWN markdown-table-formatter 16 0 0.37s
✅ SPELL cspell 47 0 3.79s
✅ SPELL misspell 47 0 0.09s
✅ YAML prettier 3 0 1.49s
✅ YAML v8r 3 0 4.25s
✅ YAML yamllint 3 0 0.19s

See errors details in artifact MegaLinter reports on CI Job page

You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:

Verified

This commit was signed with the committer’s verified signature.
josecelano Jose Celano
@josecelano
Copy link
Member Author

The Gold Drawings Processing workflow fails because we are using the new Base image purpose code (52):

image

I'm working on the Librarian to fix it.

@josecelano
Copy link
Member Author

josecelano commented Mar 1, 2022

I've fixed the previous error but now I have a new one: https://github.com/Nautilus-Cyberneering/chinese-ideographs/runs/5375335931?check_suite_focus=true#step:8:56

We are pulling from DVC remote storage only new or modified images but we validate the image size also for the renamed images. In this case, I've only renamed the images and it fails because the image is not found.

We have to modified this function:

def extract_list_of_media_file_changes_from_dvc_diff_output(
    dvc_diff, only_basename=True
):
    return extract_added_and_modified_and_renamed_files_from_dvc_diff(
        dvc_diff, only_basename
    )

To not include the renamed ones.

cc @yeraydavidrodriguez

EDIT: I've created a new issue on the Librarian repo.

Verified

This commit was signed with the committer’s verified signature.
josecelano Jose Celano

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@josecelano
Copy link
Member Author

There was one more bug. Filepath validation for renamed files was failing because renamed files in dvc diff are not a plain path (string) but a dict with the old and new name. Only the new name has to be validated.

@josecelano
Copy link
Member Author

There is another bug: nautilus-cyberneering/nautilus-librarian#101. The check_image_changes action does not work with renamed files either :-(

I've added a new task to issue nautilus-cyberneering/nautilus-librarian#100 to refactor that code. I think this different format for renamed files is causing a lot of problems.

And another thing we should consider is using more or full typing. We are using types only in some cases and I think we should enforce it like in Typescript.

@da2ce7 @yeraydavidrodriguez do you agree?

I wonder if you can enforce full typing with mypy.

@josecelano josecelano marked this pull request as ready for review March 2, 2022 16:26
@josecelano
Copy link
Member Author

It seems the workflow is finally working. We should definitively improve the command output:

image

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.

Adapt image filenames to the new specification
1 participant