DCausse has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/387608 )

Change subject: Fixup bugs in the upload utility
......................................................................


Fixup bugs in the upload utility

* The auto-naming of models was getting undesirable results, as it
 was running against the full path. Grab just the directory basename
 for deciding on names
* Upload_models was being called with cli arguments using * instead of **,
 which meant ordering of arguments made it behave differently.

Change-Id: Ic827cdd713ce313fc4bb201083fe68ab7de88203
---
M mjolnir/utilities/upload.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  DCausse: Verified; Looks good to me, approved



diff --git a/mjolnir/utilities/upload.py b/mjolnir/utilities/upload.py
index 87b58ea..871a74e 100644
--- a/mjolnir/utilities/upload.py
+++ b/mjolnir/utilities/upload.py
@@ -24,7 +24,7 @@
         if wikis and wiki not in wikis:
             continue
         # Take the portion of the directory name before the first _ as portion 
of model name
-        name = os.path.dirname(fnames[0]).split('_')[0]
+        name = os.path.basename(os.path.dirname(fname)).split('_')[0]
         # TODO: v1?
         model_name = '%s_%s_v1' % (name, wiki)
 
@@ -86,7 +86,7 @@
 def main(argv=None):
     args = parse_arguments(argv)
     # ???
-    upload_models(*args)
+    upload_models(**args)
 
 
 if __name__ == "__main__":

-- 
To view, visit https://gerrit.wikimedia.org/r/387608
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic827cdd713ce313fc4bb201083fe68ab7de88203
Gerrit-PatchSet: 5
Gerrit-Project: search/MjoLniR
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to