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

File fields size and name are inconsistently named in AnVIL #4642

Closed
nadove-ucsc opened this issue Oct 24, 2022 · 6 comments
Closed

File fields size and name are inconsistently named in AnVIL #4642

nadove-ucsc opened this issue Oct 24, 2022 · 6 comments
Assignees
Labels
API API change affecting callers bug [type] A defect preventing use of the system as specified demo [process] To be demonstrated at the end of the sprint demoed [process] Successfully demonstrated to team orange [process] Done by the Azul team service [subject] The service part of Azul

Comments

@nadove-ucsc
Copy link
Contributor

nadove-ucsc commented Oct 24, 2022

https://ucsc-gi.slack.com/archives/C705Y6G9Z/p1666385266978319

Should be files.file_size and files.file_name.

@nadove-ucsc nadove-ucsc added the orange [process] Done by the Azul team label Oct 24, 2022
@theathorn theathorn added bug [type] A defect preventing use of the system as specified service [subject] The service part of Azul labels Oct 25, 2022
@theathorn
Copy link

Blocked by #4617 because that changes the name of the column from byte_size to file_size and we want to avoid asking the Data Browser team to update the field name twice.

@theathorn theathorn self-assigned this Oct 25, 2022
@nadove-ucsc
Copy link
Contributor Author

Blocker is in dev.

@nadove-ucsc
Copy link
Contributor Author

name has exactly the same problem.

@nadove-ucsc
Copy link
Contributor Author

This can easily be fixed by adjusting the field mapping without changing the contents of the response:

Index: src/azul/plugins/metadata/anvil/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/azul/plugins/metadata/anvil/__init__.py b/src/azul/plugins/metadata/anvil/__init__.py
--- a/src/azul/plugins/metadata/anvil/__init__.py	(revision a82a0f7f6e7f6358c125b2a6ba9306d348addef6)
+++ b/src/azul/plugins/metadata/anvil/__init__.py	(date 1670975107560)
@@ -155,9 +155,11 @@
                             'file_id',
                             'data_modality',
                             'file_format',
+                            'file_size',
                             'file_md5sum',
                             'reference_assembly',
+                            'file_name',
                             # Not in schema
                             'crc32',
                             'sha256',
                             'drs_path',
@@ -166,8 +168,6 @@
                     # These field names are hard-coded in the implementation of
                     # the repository service/controller.
                     **{
-                        'file_size': 'size',
-                        'file_name': 'name',
                         # Not in schema
                         'version': 'fileVersion',
                         'uuid': 'fileId',

@achave11-ucsc
Copy link
Member

@hannes-ucsc: "Given that compliance is our priority, I don't think this should be high priority. The Data Browser has a workaround in place."

@hannes-ucsc hannes-ucsc changed the title AnVIL field size is inconsistently named AnVIL fields size and name are inconsistently named Dec 16, 2022
@hannes-ucsc hannes-ucsc changed the title AnVIL fields size and name are inconsistently named File fields size and name are inconsistently named in AnVIL Dec 16, 2022
@hannes-ucsc hannes-ucsc added the API API change affecting callers label Dec 16, 2022
@hannes-ucsc
Copy link
Member

For demo, show sorting and filtering by the affected fields.

@hannes-ucsc hannes-ucsc added the demo [process] To be demonstrated at the end of the sprint label Dec 16, 2022
@theathorn theathorn added the demoed [process] Successfully demonstrated to team label Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API change affecting callers bug [type] A defect preventing use of the system as specified demo [process] To be demonstrated at the end of the sprint demoed [process] Successfully demonstrated to team orange [process] Done by the Azul team service [subject] The service part of Azul
Projects
None yet
Development

No branches or pull requests

4 participants