Skip to content

Commit

Permalink
Test OSX Support (#110)
Browse files Browse the repository at this point in the history
* Test on MacOS

First step is to see if it runs

* Only start redis on Linux

Not supported on OSX

* Fix if statement

Two problems: 1) they call ubuntu-latest "Linux" and 2) we don't need the expression part

* Update the if again

Following the example from here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts

* Skip Redis tests on OSX

* Do not need the module-level scope

* Test for connection to redis, not CLI

Redis can still be accessible not on the Path

* Test using Python 3.8

* Update Python requirements

* Write Parsl logs and proxies to different directories
  • Loading branch information
WardLT authored Jul 31, 2023
1 parent 728d2e8 commit a1a3145
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 12 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ on: [push]

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

matrix:
os: [ubuntu-latest, macos-latest]
max-parallel: 5
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.7 # Start with the earliest version
python-version: 3.8 # Start with the earliest version
- name: Install dependencies
run: |
pip install -U pip setuptools
pip install -e.[globus,test]
- name: Start Redis
if: ${{ runner.os == 'Linux' }}
uses: supercharge/[email protected]
- name: Lint with flake8
run: |
Expand Down
16 changes: 15 additions & 1 deletion colmena/queue/tests/test_queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@
from multiprocessing import Pool

from pytest import fixture, raises, mark
from redis import Redis, ConnectionError

from colmena.exceptions import TimeoutException, KillSignalException
from colmena.queue.base import ColmenaQueues
from colmena.queue.python import PipeQueues
from colmena.queue.redis import RedisQueues

# Determine which classes to test

@fixture(params=[PipeQueues, RedisQueues])
has_redis = True
try:
client = Redis()
client.ping()
except ConnectionError:
has_redis = False

to_test = [PipeQueues]
if has_redis:
to_test.append(RedisQueues)


@fixture(params=to_test)
def queue(request) -> ColmenaQueues:
return request.param(['a', 'b'])

Expand Down
12 changes: 6 additions & 6 deletions colmena/task_server/tests/test_parsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

from parsl import HighThroughputExecutor
from parsl.config import Config
from proxystore.connectors.file import FileConnector
from pytest import fixture, mark

from proxystore.connectors.redis import RedisConnector
from proxystore.store import Store
from proxystore.store import register_store
from proxystore.store import unregister_store
Expand Down Expand Up @@ -39,17 +39,17 @@ def count_nodes(x, _resources: ResourceRequirements):
def config(tmpdir):
return Config(
executors=[
HighThroughputExecutor(max_workers=1, address='localhost')
HighThroughputExecutor(max_workers=1)
],
strategy=None,
run_dir=str(tmpdir),
run_dir=str(tmpdir / 'run'),
)


# Make a proxy store for larger objects
@fixture(scope='module')
def store():
connector = RedisConnector(hostname='localhost', port=6379)
@fixture()
def store(tmpdir):
connector = FileConnector(store_dir=str(tmpdir / 'proxy-store'))
with Store('store', connector=connector, metrics=True) as store:
register_store(store)
yield store
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
]
description = 'colmena: Intelligent Steerable Pipelines on HPC'
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = { file = "LICENSE.txt" }
keywords = ["HPC", "AI", "Workflows"]
classifiers = [
Expand Down

0 comments on commit a1a3145

Please sign in to comment.