[ARVADOS] updated: 1.3.0-1919-g7d7d3e5cd

Git user git at public.curoverse.com
Tue Nov 26 19:50:29 UTC 2019


Summary of changes:
 doc/_includes/_vocabulary_migrate_py.liquid        | 122 +--------------------
 .../workbench2-vocabulary.html.textile.liquid      |   2 +
 .../vocabulary-migrate/vocabulary-migrate.py       |  16 ++-
 3 files changed, 10 insertions(+), 130 deletions(-)
 mode change 100644 => 120000 doc/_includes/_vocabulary_migrate_py.liquid
 copy doc/_includes/_vocabulary_migrate_py.liquid => tools/vocabulary-migrate/vocabulary-migrate.py (91%)

       via  7d7d3e5cd000558929b354b9facfce8484446698 (commit)
       via  8819cac2d6c8e0d1673a2126b5cb5664e1ec776e (commit)
      from  8e1ca7677e20b4b2e3eb3c473bd062de19a26e36 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 7d7d3e5cd000558929b354b9facfce8484446698
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Tue Nov 26 16:49:31 2019 -0300

    15849: Adds symlink to script from doc's includes subdir.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/doc/_includes/_vocabulary_migrate_py.liquid b/doc/_includes/_vocabulary_migrate_py.liquid
new file mode 120000
index 000000000..9cd36294f
--- /dev/null
+++ b/doc/_includes/_vocabulary_migrate_py.liquid
@@ -0,0 +1 @@
+../../tools/vocabulary-migrate/vocabulary-migrate.py
\ No newline at end of file

commit 8819cac2d6c8e0d1673a2126b5cb5664e1ec776e
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Tue Nov 26 16:46:14 2019 -0300

    15849: Moves script to 'tools/' subdir, with some fixes.
    
    * Fixed --vocabulary-file argument requirement check
    * Modified API server querying to get stable listings
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/doc/admin/workbench2-vocabulary.html.textile.liquid b/doc/admin/workbench2-vocabulary.html.textile.liquid
index 4ff35c363..e259f7862 100644
--- a/doc/admin/workbench2-vocabulary.html.textile.liquid
+++ b/doc/admin/workbench2-vocabulary.html.textile.liquid
@@ -60,6 +60,8 @@ This script will not run if the vocabulary file has duplicated labels for differ
 
 Please take into account that this script requires admin credentials. It also offers a @--dry-run@ flag that will report what changes are required without applying them, so it can be reviewed by an administrator.
 
+Also, take into consideration that this example script does case-sensitive matching on labels.
+
 {% codeblock as python %}
 {% include 'vocabulary_migrate_py' %}
 {% endcodeblock %}
\ No newline at end of file
diff --git a/doc/_includes/_vocabulary_migrate_py.liquid b/tools/vocabulary-migrate/vocabulary-migrate.py
similarity index 91%
rename from doc/_includes/_vocabulary_migrate_py.liquid
rename to tools/vocabulary-migrate/vocabulary-migrate.py
index 3bccf6108..c2b9da63b 100644
--- a/doc/_includes/_vocabulary_migrate_py.liquid
+++ b/tools/vocabulary-migrate/vocabulary-migrate.py
@@ -1,9 +1,8 @@
 #!/usr/bin/env python
-{% comment %}
-Copyright (C) The Arvados Authors. All rights reserved.
-
-SPDX-License-Identifier: CC-BY-SA-3.0
-{% endcomment %}
+#
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: CC-BY-SA-3.0
 
 import argparse
 import copy
@@ -23,7 +22,7 @@ class VocabularyError(Exception):
 
 opts = argparse.ArgumentParser(add_help=False)
 opts.add_argument('--vocabulary-file', type=str, metavar='PATH', default=None,
-                  help="""
+                  required=True, help="""
 Use vocabulary definition file at PATH for migration decisions.
 """)
 opts.add_argument('--dry-run', action='store_true', default=False,
@@ -43,9 +42,7 @@ def parse_arguments(arguments):
     args = arg_parser.parse_args(arguments)
     if args.debug:
         logger.setLevel(logging.DEBUG)
-    if args.vocabulary_file is None:
-        arg_parser.error('Please specify the vocabulary file with --vocabulary-file')
-    elif not os.path.isfile(args.vocabulary_file):
+    if not os.path.isfile(args.vocabulary_file):
         arg_parser.error("{} doesn't exist or isn't a file.".format(args.vocabulary_file))
     return args
 
@@ -96,6 +93,7 @@ def main(arguments=None):
         for resource in [arv.collections(), arv.groups()]:
             objs = arvados.util.list_all(
                 resource.list,
+                order=['created_at'],
                 select=['uuid', 'properties'],
                 filters=[['properties', 'exists', key_label]]
             )

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list