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

Rename all RPC related classes from XMLRPC* to RPC #682

Closed
asankov opened this issue Jan 2, 2019 · 3 comments
Closed

Rename all RPC related classes from XMLRPC* to RPC #682

asankov opened this issue Jan 2, 2019 · 3 comments

Comments

@asankov
Copy link
Member

asankov commented Jan 2, 2019

Currently, a lot of our classes are prefixed with XMLRPC*. However, we support both XML-RPC and JSON-RPC. Both APIS use the same logic, so all of these classes names are misleading.

A good approach would be to implement a pylint plugin for this to enforce the convention and drive the change

@nikalas004
Copy link

I found the following occurrences. Is it ok if I rename them.

kolyo@kolyo-Latitude-E4310:~/Kiwi$ grep -r "class XMLRPC" *
tcms/testruns/forms.py:class XMLRPCNewRunForm(BaseRunForm):
tcms/testruns/forms.py:class XMLRPCUpdateRunForm(XMLRPCNewRunForm):
tcms/testruns/forms.py:class XMLRPCNewExecutionForm(BaseCaseRunForm):
tcms/testruns/forms.py:class XMLRPCUpdateExecutionForm(BaseCaseRunForm):
tcms/xmlrpc/forms.py:class XMLRPCCheckboxInput(CheckboxInput):
tcms/xmlrpc/serializer.py:class XMLRPCSerializer:
tcms/testcases/forms.py:class XMLRPCBaseCaseForm(BaseCaseForm):
tcms/testcases/forms.py:class XMLRPCNewCaseForm(XMLRPCBaseCaseForm):
tcms/testcases/forms.py:class XMLRPCUpdateCaseForm(XMLRPCBaseCaseForm):

@atodorov
Copy link
Member

Note: renaming tcms/xmlrpc/ to tcms/rpc/ or even just tcms/api/ will help with false pylint errors b/c this module conflicts with the xmlrpc module coming from the standard library.

AleksMat added a commit to AleksMat/Kiwi that referenced this issue Oct 5, 2019
atodorov pushed a commit to AleksMat/Kiwi that referenced this issue Oct 8, 2019
asankov added a commit to asankov/Kiwi that referenced this issue Nov 23, 2019
- `XMLRPCUpdateCaseForm` -> `UpdateForm`
- `XMLRPCNewRunForm` -> `NewForm`
- `XMLRPCUpdateRunForm` -> `UpdateForm`
- `XMLRPCNewExecutionForm` -> `NewExecutionForm`
- `XMLRPCUpdateExecutionForm` -> `UpdateExecutionForm`
asankov added a commit to asankov/Kiwi that referenced this issue Nov 23, 2019
- `XMLRPCUpdateCaseForm` -> `UpdateForm`
- `XMLRPCNewRunForm` -> `NewForm`
- `XMLRPCUpdateRunForm` -> `UpdateForm`
- `XMLRPCNewExecutionForm` -> `NewExecutionForm`
- `XMLRPCUpdateExecutionForm` -> `UpdateExecutionForm`
asankov added a commit to asankov/Kiwi that referenced this issue Nov 23, 2019
- `XMLRPCCheckboxInput` -> `CheckboxInput`
- `XMLRPCSerializer` -> `Serializer`
@asankov
Copy link
Member Author

asankov commented Nov 23, 2019

this is the grep outline after #1218 is merged

$ grep -r 'XMLRPC' . --include \*.py
./tcms/settings/common.py:            'format': '[%(asctime)s] %(levelname)s XMLRPC %(process)d "%(message)s"'
./tcms/core/models/__init__.py:        Convert the query set for XMLRPC
./tcms/testruns/models.py:from tcms.rpc.serializer import TestExecutionXMLRPCSerializer
./tcms/testruns/models.py:from tcms.rpc.serializer import TestRunXMLRPCSerializer
./tcms/testruns/models.py:        serializer = TestRunXMLRPCSerializer(model_class=cls, queryset=qs)
./tcms/testruns/models.py:        serializer = TestExecutionXMLRPCSerializer(model_class=cls, queryset=query_set)
./tcms/management/models.py:        from tcms.rpc.serializer import ProductXMLRPCSerializer
./tcms/management/models.py:        serializer = ProductXMLRPCSerializer(model_class=cls, queryset=query_set)
./tcms/management/models.py:        from tcms.rpc.serializer import BuildXMLRPCSerializer
./tcms/management/models.py:        serializer = BuildXMLRPCSerializer(model_class=cls, queryset=query_set)
./tcms/testplans/models.py:        from tcms.rpc.serializer import TestPlanXMLRPCSerializer
./tcms/testplans/models.py:        serializer = TestPlanXMLRPCSerializer(model_class=cls, queryset=qs)
./tcms/rpc/tests/test_serializer.py:from tcms.rpc.serializer import QuerySetBasedXMLRPCSerializer
./tcms/rpc/tests/test_serializer.py:class MockTestPlanSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/rpc/tests/test_serializer.py:class MockTestCaseSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/rpc/tests/test_serializer.py:class MockProductSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/rpc/tests/test_serializer.py:    """Test QuerySetBasedXMLRPCSerializer"""
./tcms/rpc/tests/test_testcase.py:        # and we issue XMLRPC request to remove the cc
./tcms/rpc/tests/test_product.py:        self.product_xmlrpc = ProductFactory(name='XMLRPC API')
./tcms/rpc/serializer.py:    Django XMLRPC Serializer
./tcms/rpc/serializer.py:class QuerySetBasedXMLRPCSerializer(Serializer):
./tcms/rpc/serializer.py:    """XMLRPC serializer specific for TestPlan
./tcms/rpc/serializer.py:    # Define the mapping relationship of names from ORM side to XMLRPC output
./tcms/rpc/serializer.py:    # Value is the name from the the XMLRPC output side
./tcms/rpc/serializer.py:class TestPlanXMLRPCSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/rpc/serializer.py:    """XMLRPC serializer specific for TestPlan"""
./tcms/rpc/serializer.py:class TestExecutionXMLRPCSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/rpc/serializer.py:    """XMLRPC serializer specific for TestExecution"""
./tcms/rpc/serializer.py:class TestRunXMLRPCSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/rpc/serializer.py:class TestCaseXMLRPCSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/rpc/serializer.py:class ProductXMLRPCSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/rpc/serializer.py:class BuildXMLRPCSerializer(QuerySetBasedXMLRPCSerializer):
./tcms/urls.py:from modernrpc.core import XMLRPC_PROTOCOL
./tcms/urls.py:    url(r'^xml-rpc/', RPCEntryPoint.as_view(protocol=XMLRPC_PROTOCOL)),
./tcms/testcases/models.py:        from tcms.rpc.serializer import TestCaseXMLRPCSerializer
./tcms/testcases/models.py:        serializer = TestCaseXMLRPCSerializer(model_class=cls, queryset=qs)

asankov added a commit to asankov/Kiwi that referenced this issue Nov 24, 2019
- `XMLRPCUpdateCaseForm` -> `UpdateForm`
- `XMLRPCNewRunForm` -> `NewForm`
- `XMLRPCUpdateRunForm` -> `UpdateForm`
- `XMLRPCNewExecutionForm` -> `NewExecutionForm`
- `XMLRPCUpdateExecutionForm` -> `UpdateExecutionForm`
asankov added a commit to asankov/Kiwi that referenced this issue Nov 24, 2019
- `XMLRPCCheckboxInput` -> `CheckboxInput`
- `XMLRPCSerializer` -> `Serializer`
asankov added a commit to asankov/Kiwi that referenced this issue Nov 24, 2019
- `XMLRPCUpdateCaseForm` -> `UpdateForm`
- `XMLRPCNewRunForm` -> `NewForm`
- `XMLRPCUpdateRunForm` -> `UpdateForm`
- `XMLRPCNewExecutionForm` -> `NewExecutionForm`
- `XMLRPCUpdateExecutionForm` -> `UpdateExecutionForm`
asankov added a commit to asankov/Kiwi that referenced this issue Nov 24, 2019
- `XMLRPCCheckboxInput` -> `CheckboxInput`
- `XMLRPCSerializer` -> `Serializer`
atodorov pushed a commit that referenced this issue Nov 24, 2019
- `XMLRPCUpdateCaseForm` -> `UpdateForm`
- `XMLRPCNewRunForm` -> `NewForm`
- `XMLRPCUpdateRunForm` -> `UpdateForm`
- `XMLRPCNewExecutionForm` -> `NewExecutionForm`
- `XMLRPCUpdateExecutionForm` -> `UpdateExecutionForm`
atodorov pushed a commit that referenced this issue Nov 24, 2019
- `XMLRPCCheckboxInput` -> `CheckboxInput`
- `XMLRPCSerializer` -> `Serializer`
rsasov added a commit to rsasov/Kiwi that referenced this issue Jan 19, 2020
rsasov added a commit to rsasov/Kiwi that referenced this issue Jan 21, 2020
rsasov added a commit to rsasov/Kiwi that referenced this issue Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants