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

Allow multiple additive server connections #143

Merged
merged 16 commits into from
Nov 3, 2023

Conversation

pkrull-ansys
Copy link
Collaborator

@pkrull-ansys pkrull-ansys commented Nov 2, 2023

closes #9
closes #55

@github-actions github-actions bot added maintenance Package and maintenance related testing enhancement New features or code improvements labels Nov 2, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 2, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 2, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 2, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 2, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 2, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 2, 2023
@github-actions github-actions bot removed the testing label Nov 2, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 2, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 3, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 3, 2023
@github-actions github-actions bot added testing and removed testing labels Nov 3, 2023
@pkrull-ansys pkrull-ansys added this pull request to the merge queue Nov 3, 2023
Merged via the queue into main with commit 47cf74b Nov 3, 2023
@pkrull-ansys pkrull-ansys deleted the feat/9/refactor-startup branch November 3, 2023 19:07
Laser power (W).
scan_speed: float
Laser scan speed (m/s).
characteristic_widt: float
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
characteristic_widt: float
characteristic_width: float


# act, assert
with pytest.raises(FileNotFoundError) as excinfo:
LocalServer.launch(TEST_VALID_PORT, tmp_path, "242")
Copy link
Collaborator

@klmcadams klmcadams Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once 242 exists I think you'll have to change the version. Instead, you could choose an old version of Ansys that pyadditive does not support like 212 for example, or a fake version

Comment on lines +60 to +67
with pytest.raises(ValueError):
check_valid_port(1023)
with pytest.raises(ValueError):
check_valid_port(65536)
with pytest.raises(ValueError):
check_valid_port("1023")
with pytest.raises(ValueError):
check_valid_port("0", 1, 2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with pytest.raises(ValueError):
check_valid_port(1023)
with pytest.raises(ValueError):
check_valid_port(65536)
with pytest.raises(ValueError):
check_valid_port("1023")
with pytest.raises(ValueError):
check_valid_port("0", 1, 2)
ports = [1024, 65535, "1024"]
for port in ports:
with pytest.raises(ValueError):
check_valid_port(port)
with pytest.raises(ValueError):
check_valid_port("0", 1, 2)

Comment on lines +52 to +55
check_valid_port(1024)
check_valid_port(65535)
check_valid_port("1024")
check_valid_port("1", 0, 2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_valid_port(1024)
check_valid_port(65535)
check_valid_port("1024")
check_valid_port("1", 0, 2)
ports = [1024, 65535, "1024"]
[check_valid_port(port) for port in ports]
check_valid_port("1", 0, 2)

Comment on lines +36 to +39
check_valid_ip("1.2.3.4")
check_valid_ip("127.0.0.1")
check_valid_ip("8.8.8.8")
check_valid_ip("localhost")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_valid_ip("1.2.3.4")
check_valid_ip("127.0.0.1")
check_valid_ip("8.8.8.8")
check_valid_ip("localhost")
ips = ["1.2.3.4", "127.0.0.1", "8.8.8.8", "localhost"]
[check_valid_ip(ip) for ip in ips]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements maintenance Package and maintenance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update minimum unit test coverage to 95% Allow for multiple server connections from a single client.
3 participants