Repository: oppia/oppia

Issue:
Rename proto folder to a different name
When I was investigating the migration to Python 3 I discovered that there is a problem that the proto folder that we have conflicts with some proto folder inside Google libraries, we should rename our folder in order to be prepared for the Python 3 migration.
Rename proto folder to a different name
When I was investigating the migration to Python 3 I discovered that there is a problem that the proto folder that we have conflicts with some proto folder inside Google libraries, we should rename our folder in order to be prepared for the Python 3 migration.


Discussion:
@prasanna08 Any update on this? It would be nice to get this in ASAP.
Hey @vojtechjelinek, I won't be able to get to it ASAP because of some emergencies at home. If there is someone else who can help then you can ask them, I can answer any questions they have over chat.
Hi, @prasanna08  do you have any idea which files are conflicting? An example will be fine. I have also sent an invite for a chat if you want we can discuss it over there. Thanks!
Hey Arpit, you can ask Vojtech, he would know what are the conflicts.

On Thu, Apr 29, 2021, 8:37 AM Arpit ***@***.***> wrote:

> Hi, @prasanna08 <https://github.com/prasanna08> do you have any idea
> which files are conflicting? An example will be fine. I have also sent an
> invite for a chat if you want we can discuss it over there. Thanks!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/oppia/oppia/issues/12503#issuecomment-828910551>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACCGXZOQDOWY4NIADXCO2YDTLDEOXANCNFSM42Z4XGOA>
> .
>

@prasanna08 Any update on this? It would be nice to get this in ASAP.
Hey @vojtechjelinek, I won't be able to get to it ASAP because of some emergencies at home. If there is someone else who can help then you can ask them, I can answer any questions they have over chat.
Hi, @prasanna08  do you have any idea which files are conflicting? An example will be fine. I have also sent an invite for a chat if you want we can discuss it over there. Thanks!
Hey Arpit, you can ask Vojtech, he would know what are the conflicts.

On Thu, Apr 29, 2021, 8:37 AM Arpit ***@***.***> wrote:

> Hi, @prasanna08 <https://github.com/prasanna08> do you have any idea
> which files are conflicting? An example will be fine. I have also sent an
> invite for a chat if you want we can discuss it over there. Thanks!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/oppia/oppia/issues/12503#issuecomment-828910551>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACCGXZOQDOWY4NIADXCO2YDTLDEOXANCNFSM42Z4XGOA>
> .
>


Resolving patch:
diff --git a/core/controllers/classifier.py b/core/controllers/classifier.py
--- a/core/controllers/classifier.py
+++ b/core/controllers/classifier.py
@@ -24,7 +24,7 @@
 from core.domain import email_manager
 from core.domain import exp_fetchers
 import feconf
-from proto import training_job_response_payload_pb2
+from proto_files import training_job_response_payload_pb2
 
 
 def validate_job_result_message_proto(job_result_proto):
diff --git a/proto/__init__.py b/proto_files/__init__.py
similarity index 100%
rename from proto/__init__.py
rename to proto_files/__init__.py
diff --git a/scripts/linters/general_purpose_linter.py b/scripts/linters/general_purpose_linter.py
--- a/scripts/linters/general_purpose_linter.py
+++ b/scripts/linters/general_purpose_linter.py
@@ -39,7 +39,7 @@
     'core/tests/build_sources/*', '*.mp3', '*.mp4', 'node_modules/*',
     'typings/*', 'local_compiled_js/*', 'webpack_bundles/*',
     'core/tests/services_sources/*', 'core/tests/release_sources/tmp_unzip.zip',
-    'scripts/linters/test_files/*', 'proto/*',
+    'scripts/linters/test_files/*', 'proto_files/*',
     'core/tests/release_sources/tmp_unzip.tar.gz',
     'core/templates/combined-tests.spec.ts',
     'core/templates/css/oppia-material.css',


Test patch:
diff --git a/core/controllers/classifier_test.py b/core/controllers/classifier_test.py
--- a/core/controllers/classifier_test.py
+++ b/core/controllers/classifier_test.py
@@ -34,8 +34,8 @@
 from core.platform import models
 from core.tests import test_utils
 import feconf
-from proto import text_classifier_pb2
-from proto import training_job_response_payload_pb2
+from proto_files import text_classifier_pb2
+from proto_files import training_job_response_payload_pb2
 import python_utils
 
 (classifier_models,) = models.Registry.import_models([models.NAMES.classifier])
diff --git a/core/domain/classifier_services_test.py b/core/domain/classifier_services_test.py
--- a/core/domain/classifier_services_test.py
+++ b/core/domain/classifier_services_test.py
@@ -32,7 +32,7 @@
 from core.platform import models
 from core.tests import test_utils
 import feconf
-from proto import text_classifier_pb2
+from proto_files import text_classifier_pb2
 import utils
 
 (classifier_models,) = models.Registry.import_models(
diff --git a/core/domain/classifier_validators_test.py b/core/domain/classifier_validators_test.py
--- a/core/domain/classifier_validators_test.py
+++ b/core/domain/classifier_validators_test.py
@@ -29,7 +29,7 @@
 from core.platform import models
 from core.tests import test_utils
 import feconf
-from proto import text_classifier_pb2
+from proto_files import text_classifier_pb2
 import python_utils
 
 datastore_services = models.Registry.import_datastore_services()
diff --git a/core/domain/fs_services_test.py b/core/domain/fs_services_test.py
--- a/core/domain/fs_services_test.py
+++ b/core/domain/fs_services_test.py
@@ -27,7 +27,7 @@
 from core.domain import user_services
 from core.tests import test_utils
 import feconf
-from proto import text_classifier_pb2
+from proto_files import text_classifier_pb2
 import python_utils
 import utils
 
diff --git a/core/tests/test_utils.py b/core/tests/test_utils.py
--- a/core/tests/test_utils.py
+++ b/core/tests/test_utils.py
@@ -64,7 +64,7 @@
 import feconf
 import main
 import main_taskqueue
-from proto import text_classifier_pb2
+from proto_files import text_classifier_pb2
 import python_utils
 import schema_utils
 import utils