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

Use rewrite_remote instead of rewrite.remote #109

Merged
merged 13 commits into from
Dec 18, 2024
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In the setup described here it is at the time of writing important that the GitH
idea ~/git/openrewrite/rewrite-python/rewrite
```
6. Make sure that the Python plugin is installed and also that the interpreter from the created venv is configured and used
7. Create a new run configuration which runs the Python module `rewrite.remote.server` (typically in debug mode)
7. Create a new run configuration which runs the Python module `rewrite_remote.server` (typically in debug mode)
8. Now open `~/git/openrewrite/rewrite-python` in a second IDEA workspace and run the JUnit tests from there

### Resources
Expand Down
4 changes: 2 additions & 2 deletions rewrite/.run/rewrite.remote.server.run.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="rewrite.remote.server" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
<configuration default="false" name="rewrite_remote.server" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
<module name="rewrite" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
Expand All @@ -14,7 +14,7 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="rewrite.remote.server" />
<option name="SCRIPT_NAME" value="rewrite_remote.server" />
<option name="PARAMETERS" value="54322 1000000" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
Expand Down
2 changes: 1 addition & 1 deletion rewrite/rewrite/java/remote/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Type, Callable, TypeVar, Optional

from rewrite.java import *
from rewrite.remote import SenderContext, ReceiverContext
from rewrite_remote import SenderContext, ReceiverContext

T = TypeVar('T')

Expand Down
2 changes: 1 addition & 1 deletion rewrite/rewrite/java/remote/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from rewrite.java.support_types import *
from rewrite.java.visitor import JavaVisitor

from rewrite.remote import Receiver, ReceiverContext, T, ReceiverFactory
from rewrite_remote import Receiver, ReceiverContext, T, ReceiverFactory
from . import extensions

class JavaReceiver(Receiver):
Expand Down
2 changes: 1 addition & 1 deletion rewrite/rewrite/java/remote/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Optional, TypeVar, cast

from rewrite import Tree, TreeVisitor, Markers, Marker, Cursor
from rewrite.remote import Sender, SenderContext
from rewrite_remote import Sender, SenderContext
from rewrite.java import *
from rewrite.java.support_types import *
from . import extensions
Expand Down
2 changes: 1 addition & 1 deletion rewrite/rewrite/python/remote/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from rewrite.java import *
from rewrite.python.tree import PyComment
from rewrite.remote import SenderContext, ReceiverContext
from rewrite_remote import SenderContext, ReceiverContext

T = TypeVar('T')

Expand Down
2 changes: 1 addition & 1 deletion rewrite/rewrite/python/remote/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from rewrite.python.visitor import PythonVisitor
from rewrite.java import *

from rewrite.remote import Receiver, ReceiverContext, T, ReceiverFactory
from rewrite_remote import Receiver, ReceiverContext, T, ReceiverFactory
from . import extensions

class PythonReceiver(Receiver):
Expand Down
2 changes: 1 addition & 1 deletion rewrite/rewrite/python/remote/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Optional, TypeVar, cast

from rewrite import Tree, TreeVisitor, Markers, Marker, Cursor
from rewrite.remote import Sender, SenderContext
from rewrite_remote import Sender, SenderContext
from rewrite.python import *
from rewrite.java import *
from rewrite.python.support_types import *
Expand Down
4 changes: 2 additions & 2 deletions rewrite/rewrite/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def with_parsers(self, parsers: Iterable[ParserBuilder]) -> RecipeSpec:


def rewrite_run(*source_specs: Iterable[SourceSpec], spec: RecipeSpec = None):
from rewrite.remote import RemotingContext, RemotePrinterFactory
from rewrite.remote.server import register_remoting_factories
from rewrite_remote import RemotingContext, RemotePrinterFactory
from rewrite_remote.server import register_remoting_factories
remoting_context = RemotingContext()
register_remoting_factories()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Expand Down
4 changes: 2 additions & 2 deletions rewrite/tests/manual_parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

path = sys.argv[1] if len(sys.argv) > 1 else '/Users/knut/git/moderneinc/moderne-cli/working-set/face-alignment/examples/detect_landmarks_in_image.py'

from rewrite.remote import RemotingContext, RemotePrinterFactory
from rewrite.remote.server import register_remoting_factories
from rewrite_remote import RemotingContext, RemotePrinterFactory
from rewrite_remote.server import register_remoting_factories

remoting_context = RemotingContext()
register_remoting_factories()
Expand Down
Loading