diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad62d9543f8d4bb1659ee7a3afe3547316edce39..48d7cd3fa690c8a7fd5dd2a8c6821b11ab52c021 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,6 +67,20 @@ Python 2.7 POCL: except: - tags +Python 3.5 Conda Apple: + script: + - export LC_ALL=en_US.UTF-8 + - export LANG=en_US.UTF-8 + - export PYTEST_ADDOPTS=-k-slowtest + - CONDA_ENVIRONMENT=.test-conda-env-py3-macos.yml + - REQUIREMENTS_TXT=.test-conda-env-py3-requirements.txt + - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh + - ". ./build-and-test-py-project-within-miniconda.sh" + tags: + - apple + except: + - tags + Documentation: script: - EXTRA_INSTALL="numpy mako" diff --git a/.test-conda-env-py3-macos.yml b/.test-conda-env-py3-macos.yml new file mode 100644 index 0000000000000000000000000000000000000000..807cd6963d5328c5cbe92494f1f255cece964c4b --- /dev/null +++ b/.test-conda-env-py3-macos.yml @@ -0,0 +1,17 @@ +name: test-conda-env-py3-macos +channels: +- conda-forge +- defaults +dependencies: +- git +- conda-forge::numpy +- conda-forge::sympy +- pocl=1.0 +- islpy +- pyopencl +- python=3.5 +- symengine=0.3.0 +- python-symengine=0.3.0 +- pyfmmlib +- osx-pocl-opencl +# things not in here: loopy boxtree pymbolic meshmode sumpy diff --git a/doc/misc.rst b/doc/misc.rst index 874935f8cf8b078ff66ec29d30d2bbe0c32e33ce..7a3d9abaac86485e230212127871cede80711e3c 100644 --- a/doc/misc.rst +++ b/doc/misc.rst @@ -4,14 +4,15 @@ Installation and Usage Installing :mod:`pytential` --------------------------- -This set of instructions is intended for 64-bit Linux computers. -MacOS support is in the works. +This set of instructions is intended for 64-bit Linux and macOS computers. #. Make sure your system has the basics to build software. On Debian derivatives (Ubuntu and many more), installing ``build-essential`` should do the trick. + On macOS, run ``xcode-select --install`` to install build tools. + Everywhere else, just making sure you have the ``g++`` package should be enough. @@ -30,6 +31,8 @@ MacOS support is in the works. #. ``conda config --add channels conda-forge`` +#. (*macOS only*) ``conda install osx-pocl-opencl`` + #. ``conda install git pip pocl islpy pyopencl sympy pyfmmlib pytest`` #. Type the following command:: diff --git a/setup.cfg b/setup.cfg index 42291e82433c3c7522f8e267e41321c4d19db099..a353f3f7242d42f689d5721b8f4a104aaf3e4e6b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,4 @@ + [flake8] ignore = E126,E127,E128,E123,E226,E241,E242,E265,E402,W503,N803,N806,N802,D102,D103 max-line-length=85 @@ -5,3 +6,6 @@ exclude= pytential/symbolic/old_diffop_primitives.py, pytential/symbolic/pde/maxwell/generalized_debye.py, +[tool:pytest] +markers= + slowtest: mark a test as slow diff --git a/test/test_maxwell.py b/test/test_maxwell.py index 715a7669ed3b59ae7c3cea1bf1f3dff18d7bd070..87420a10c158e64ad7e447d1046b0312e93f893d 100644 --- a/test/test_maxwell.py +++ b/test/test_maxwell.py @@ -213,6 +213,7 @@ class EHField(object): # {{{ driver +@pytest.mark.slowtest @pytest.mark.parametrize("case", [ #tc_int, tc_ext, diff --git a/test/test_stokes.py b/test/test_stokes.py index 1b85080fb5343c0364d4851f28e92ca11ad715a0..3f456fc16265235dd6caf55290b332e2bb9bbeaf 100644 --- a/test/test_stokes.py +++ b/test/test_stokes.py @@ -26,6 +26,7 @@ THE SOFTWARE. import numpy as np import pyopencl as cl import pyopencl.clmath # noqa +import pytest from meshmode.discretization import Discretization from meshmode.discretization.poly_element import \ @@ -270,6 +271,7 @@ def run_exterior_stokes_2d(ctx_factory, nelements, return qbx.h_max, l2_err +@pytest.mark.slowtest def test_exterior_stokes_2d(ctx_factory, qbx_order=3): from pytools.convergence import EOCRecorder eoc_rec = EOCRecorder()