diff --git a/bob/pipelines/distributed/__init__.py b/bob/pipelines/distributed/__init__.py index 4c3c515d039959a933abba6ef84b11d5d76ce92d..05a5f2094db11bbcabfa4d3798a452911e5f2311 100644 --- a/bob/pipelines/distributed/__init__.py +++ b/bob/pipelines/distributed/__init__.py @@ -1,8 +1,11 @@ -# see https://docs.python.org/3/library/pkgutil.html from pkgutil import extend_path +from .sge import SchedulerResourceRestriction + +# see https://docs.python.org/3/library/pkgutil.html __path__ = extend_path(__path__, __name__) + # DASK-click VALID_DASK_CLIENT_STRINGS # TO BE USED IN: # @click.option( @@ -93,3 +96,26 @@ def get_local_parallel_client(parallel=None, processes=True): threads_per_worker=1 if processes else parallel, ) return Client(cluster) + + +def __appropriate__(*args): + """Says object was actually declared here, and not in the import module. + Fixing sphinx warnings of not being able to find classes, when path is + shortened. + + Parameters + ---------- + *args + The objects that you want sphinx to believe that are defined here. + + Resolves `Sphinx referencing issues <https//github.com/sphinx- + doc/sphinx/issues/3048>` + """ + + for obj in args: + obj.__module__ = __name__ + + +__appropriate__( + SchedulerResourceRestriction, +) diff --git a/conda/meta.yaml b/conda/meta.yaml index 9aeb91aa79afaa1e0baeac33c38a81bbe59a90b4..b59dd1400e715db7152ed2ba4cbdf453c99c5dfd 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -41,7 +41,7 @@ requirements: run: - python - setuptools - - {{ pin_compatible('numpy') }} + - {{ pin_compatible('numpy', max_pin='x.x') }} - {{ pin_compatible('dask', max_pin='x.x') }} - {{ pin_compatible('dask-jobqueue', max_pin='x.x') }} - {{ pin_compatible('distributed', max_pin='x.x') }} @@ -55,7 +55,7 @@ test: imports: - {{ name }} commands: - - pytest --verbose --cov {{ name }} --cov-report term-missing --cov-report html:{{ project_dir }}/sphinx/coverage --cov-report xml:{{ project_dir }}/coverage.xml --pyargs {{ name }} + - pytest --verbose --cov {{ name }} --cov-report term-missing --cov-report html:{{ project_dir }}/sphinx/coverage --cov-report xml:{{ project_dir }}/coverage.xml --junitxml={{ project_dir }}/test_results.xml --pyargs {{ name }} - sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx # [linux] - sphinx-build -aEb doctest {{ project_dir }}/doc sphinx # [linux] - conda inspect linkages -p $PREFIX {{ name }} # [not win]