Skip to content

Commit fce9e20

Browse files
Remove Arguments.createArgumentsFromJSON and tests (#1313)
Remove the static createArgumentsFromJSON method from the Arguments class and clean up related references. The method implementation was deleted from python/zingg/client.py, docs references were removed from docs/pythonOss/markdown/_autosummary/zingg.client.Arguments.md and python/docs/_autosummary/zingg.client.Arguments.rst, and the corresponding unit test (test_createArgumentsFromJSON) was removed from test/testFebrl/testArgs.py.
1 parent 542c866 commit fce9e20

4 files changed

Lines changed: 1 addition & 68 deletions

File tree

docs/pythonOss/markdown/_autosummary/zingg.client.Arguments.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ This class helps supply match arguments to Zingg. There are 3 basic steps in any
1717

1818
| [`__init__`](#zingg.client.Arguments.__init__) | |
1919
|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
20-
| `copyArgs` | |
21-
| [`createArgumentsFromJSON`](#zingg.client.Arguments.createArgumentsFromJSON) | Method to create an object of this class from the JSON file and phase parameter value. |
22-
| `createArgumentsFromJSONString` | |
2320
| [`getArgs`](#zingg.client.Arguments.getArgs) | Method to get pointer address of this class |
2421
| `getModelId` | |
2522
| `getZinggBaseModelDir` | |
@@ -38,22 +35,8 @@ This class helps supply match arguments to Zingg. There are 3 basic steps in any
3835
| [`setStopWordsCutoff`](#zingg.client.Arguments.setStopWordsCutoff) | Method to set stopWordsCutoff parameter value By default, Zingg extracts 10% of the high frequency unique words from a dataset. |
3936
| [`setTrainingSamples`](#zingg.client.Arguments.setTrainingSamples) | Method to set existing training samples to be matched. |
4037
| [`setZinggDir`](#zingg.client.Arguments.setZinggDir) | Method to set the location for Zingg to save its internal computations and models. |
41-
| [`writeArgumentsToJSON`](#zingg.client.Arguments.writeArgumentsToJSON) | Method to write JSON file from the object of this class |
42-
| [`writeArgumentsToJSONString`](#zingg.client.Arguments.writeArgumentsToJSONString) | Method to create an object of this class from the JSON file and phase parameter value. |
43-
4438
#### \_\_init_\_()
4539

46-
#### *static* createArgumentsFromJSON(fileName, phase)
47-
48-
Method to create an object of this class from the JSON file and phase parameter value.
49-
50-
* **Parameters:**
51-
* **fileName** (*String*) – The CONF parameter value of ClientOption object
52-
* **phase** (*String*) – The PHASE parameter value of ClientOption object
53-
* **Returns:**
54-
The pointer containing address of the this class object
55-
* **Return type:**
56-
pointer([Arguments](#zingg.client.Arguments))
5740

5841
#### getArgs()
5942

@@ -158,23 +141,4 @@ Method to set existing training samples to be matched.
158141
Method to set the location for Zingg to save its internal computations and models. Please set it to a place where the program has to write access.
159142

160143
* **Parameters:**
161-
**f** (*String*) – Zingg directory name of the models
162-
163-
#### writeArgumentsToJSON(fileName)
164-
165-
Method to write JSON file from the object of this class
166-
167-
* **Parameters:**
168-
**fileName** (*String*) – The CONF parameter value of ClientOption object or file address of json file
169-
170-
#### writeArgumentsToJSONString()
171-
172-
Method to create an object of this class from the JSON file and phase parameter value.
173-
174-
* **Parameters:**
175-
* **fileName** (*String*) – The CONF parameter value of ClientOption object
176-
* **phase** (*String*) – The PHASE parameter value of ClientOption object
177-
* **Returns:**
178-
The pointer containing address of the this class object
179-
* **Return type:**
180-
pointer([Arguments](#zingg.client.Arguments))
144+
**f** (*String*) – Zingg directory name of the models

python/docs/_autosummary/zingg.client.Arguments.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
:nosignatures:
1818

1919
~Arguments.__init__
20-
~Arguments.copyArgs
21-
~Arguments.createArgumentsFromJSON
22-
~Arguments.createArgumentsFromJSONString
2320
~Arguments.getArgs
2421
~Arguments.getModelId
2522
~Arguments.getZinggBaseModelDir
@@ -38,8 +35,6 @@
3835
~Arguments.setStopWordsCutoff
3936
~Arguments.setTrainingSamples
4037
~Arguments.setZinggDir
41-
~Arguments.writeArgumentsToJSON
42-
~Arguments.writeArgumentsToJSONString
4338

4439

4540

python/zingg/client.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -688,22 +688,6 @@ def setColumn(self, column):
688688
"""
689689
self.args.setColumn(column)
690690

691-
@staticmethod
692-
def createArgumentsFromJSON(fileName, phase):
693-
"""Method to create an object of this class from the JSON file and phase parameter value.
694-
695-
:param fileName: The CONF parameter value of ClientOption object
696-
:type fileName: String
697-
:param phase: The PHASE parameter value of ClientOption object
698-
:type phase: String
699-
:return: The pointer containing address of the this class object
700-
:rtype: pointer(Arguments)
701-
"""
702-
obj = Arguments()
703-
obj.args = getJVM().zingg.common.client.arguments.ArgumentServiceImpl().loadArguments(fileName)
704-
return obj
705-
706-
707691
class ClientOptions:
708692
"""Class that contains Client options for Zingg object
709693
:param phase: trainMatch, train, match, link, findAndLabel, findTrainingData, recommend etc

test/testFebrl/testArgs.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -473,16 +473,6 @@ def test_setStopWordsCutoff(self):
473473
actual_stopWordsCutoff = java_args.getStopWordsCutoff()
474474

475475
self.assertEqual(actual_stopWordsCutoff, stopWordsCutoff)
476-
477-
def test_createArgumentsFromJSON(self):
478-
fileName = "examples/febrl/config.json"
479-
phase = "label"
480-
481-
obj = args.createArgumentsFromJSON(fileName, phase)
482-
print("JSON file content:", obj)
483-
print("Phase:", phase)
484-
485-
self.assertIsInstance(obj, Arguments)
486476

487477
class TestClientOptions(TestCase):
488478

0 commit comments

Comments
 (0)