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

[23.0] Make point release script compatible with docutils 0.16 #16190

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Jun 5, 2023

(Please replace this header with a description of your pull request. Please include BOTH what you did and why you made the changes. The "why" may simply be citing a relevant Galaxy issue.)
(If fixing a bug, please add any relevant error or traceback)
(For UI components, it is recommended to include screenshots or screencasts)

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 23.0 milestone Jun 5, 2023
@jmchilton
Copy link
Member

RO crate unit test failures probably the result of a new pypi release an hour ago - https://pypi.org/project/rocrate/#history. Probably should just pin it in this branch - doesn't have to be part of this PR though.

@mvdbeek
Copy link
Member Author

mvdbeek commented Jun 5, 2023

Looks like we should pass in a pathlib object, that should work for the new and old version, I can open another PR with that

@mvdbeek
Copy link
Member Author

mvdbeek commented Jun 5, 2023

Oh, it seems like this is a bigger thing and at least the ro-crates that are produced in the unit test were broken, as they added files that don't exist and that wasn't verified by the ro-crate library before ?

This "fixes" the unit tests with the newer ro-crate library:

diff --git a/lib/galaxy/model/store/__init__.py b/lib/galaxy/model/store/__init__.py
index ec8a9ea1be..33dbcf34d4 100644
--- a/lib/galaxy/model/store/__init__.py
+++ b/lib/galaxy/model/store/__init__.py
@@ -1924,30 +1924,30 @@ class DirectoryModelExportStore(ModelExportStore):
                 as_dict["extra_files_path"] = extra_files_path
             return
 
-        if file_name:
-            if not os.path.exists(dir_path):
-                os.makedirs(dir_path)
-
-            target_filename = get_export_dataset_filename(as_dict["name"], as_dict["extension"], dataset_hid)
-            arcname = os.path.join(dir_name, target_filename)
-
-            src = file_name
-            dest = os.path.join(export_directory, arcname)
-            add(src, dest)
-            as_dict["file_name"] = arcname
-
-        if extra_files_path:
-            try:
-                file_list = os.listdir(extra_files_path)
-            except OSError:
-                file_list = []
-
-            if len(file_list):
-                arcname = os.path.join(dir_name, f"extra_files_path_{dataset_hid}")
-                add(extra_files_path, os.path.join(export_directory, arcname))
-                as_dict["extra_files_path"] = arcname
-            else:
-                as_dict["extra_files_path"] = ""
+        # if file_name:
+        #     if not os.path.exists(dir_path):
+        #         os.makedirs(dir_path)
+
+        #     target_filename = get_export_dataset_filename(as_dict["name"], as_dict["extension"], dataset_hid)
+        #     arcname = os.path.join(dir_name, target_filename)
+
+        #     src = file_name
+        #     dest = os.path.join(export_directory, arcname)
+        #     add(src, dest)
+        #     as_dict["file_name"] = arcname
+
+        # if extra_files_path:
+        #     try:
+        #         file_list = os.listdir(extra_files_path)
+        #     except OSError:
+        #         file_list = []
+
+        #     if len(file_list):
+        #         arcname = os.path.join(dir_name, f"extra_files_path_{dataset_hid}")
+        #         add(extra_files_path, os.path.join(export_directory, arcname))
+        #         as_dict["extra_files_path"] = arcname
+        #     else:
+        #         as_dict["extra_files_path"] = ""
 
         self.dataset_id_to_path[dataset.dataset.id] = (as_dict.get("file_name"), as_dict.get("extra_files_path"))
 

Note how as_dict["file_name"] = arcname refers to a path inside the archive that doesn't exist outside of the archive.
I worry that this might be true outside of unit tests as well.

@mvdbeek
Copy link
Member Author

mvdbeek commented Jun 6, 2023

Fix for that is in #16193

@mvdbeek mvdbeek merged commit 2a5b442 into galaxyproject:release_23.0 Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants