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

runs an intergation test in linux, windows and macos #405

Merged
merged 5 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
call:
uses: SpiNNakerManchester/SupportScripts/.github/workflows/python_checks.yml@main
with:
base-package: spinnman

dependencies: SpiNNUtils SpiNNMachine
test_directories: unittests spinnman_integration_tests
coverage-package: spinnman
flake8-packages: spinnman unittests spinnman_integration_tests
pylint-packages: spinnman
mypy-packages: spinnman
secrets: inherit
14 changes: 12 additions & 2 deletions spinnman/spalloc/spalloc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""
Implementation of the client for the Spalloc web service.
"""
import os
import time
from logging import getLogger

Expand Down Expand Up @@ -108,12 +109,21 @@ def __init__(
location; if so, the ``username`` and ``password`` arguments
*must* be ``None``. If ``username`` and ``password`` are not given,
not even within the URL, the ``bearer_token`` must be not ``None``.
:param str username: The user name to use
:param str password: The password to use
:param str username:
The user name to use. If not provided nor in service_url
environment variable SPALLOC_USER will be used.
:param str password:
The password to use. If not provided nor in service_url
environment variable SPALLOC_PASSWORD will be used.
:param str bearer_token: The bearer token to use
"""
if username is None and password is None:
service_url, username, password = parse_service_url(service_url)
if username is None:
username = os.environ["SPALLOC_USER"]
if password is None:
password = os.environ["SPALLOC_PASSWORD"]

self.__session: Optional[Session] = Session(
service_url, username, password, bearer_token)
obj = self.__session.renew()
Expand Down
6 changes: 1 addition & 5 deletions spinnman_integration_tests/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import unittest

from spinn_utilities.config_holder import set_config
Expand All @@ -29,12 +28,9 @@ def setUp(self):
set_config("Machine", "version", FIVE)
self.spalloc_url = "https://spinnaker.cs.man.ac.uk/spalloc"
self.spalloc_machine = "SpiNNaker1M"
self.spalloc_user = os.environ["SPALLOC_USER"]
self.spalloc_password = os.environ["SPALLOC_PASSWORD"]

def test_create_job(self):
client = SpallocClient(
self.spalloc_url, self.spalloc_user, self.spalloc_password)
client = SpallocClient(self.spalloc_url)
# job = client.create_job_rect_at_board(
# WIDTH, HEIGHT, triad=(x, y, b), machine_name=SPALLOC_MACHINE,
# max_dead_boards=1)
Expand Down