From 3cd81f142047731f28accc83bbfd9d4403e72ac4 Mon Sep 17 00:00:00 2001 From: William Song <30965609+Freakwill@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:37:31 +0800 Subject: [PATCH] test[skip test] --- .github/workflows/pytest.yml | 2 +- pyrimidine/parallel.py | 58 ++++++++++++++++++------------------ pyrimidine/qga.py | 3 ++ tests/__init__.py | 2 ++ 4 files changed, 35 insertions(+), 30 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b443eef..4acf5be 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -31,7 +31,7 @@ jobs: pip install -r requirements.txt - name: Run tests - if: ! contains(github.head_ref, "-skip-tests") + if: ! contains(github.event.head_commit.message, "skip test") run: | pip install pytest pytest diff --git a/pyrimidine/parallel.py b/pyrimidine/parallel.py index cbc0f32..53b9436 100755 --- a/pyrimidine/parallel.py +++ b/pyrimidine/parallel.py @@ -133,34 +133,34 @@ def dask_apply(cls): return cls -if __name__ == '__main__': +# if __name__ == '__main__': - @dask_apply - class C: - - def __init__(self, v=[1,2,3]): - self.v = v - self._map = MTMap(type_=tuple) - - @property - def map(self): - return self._map - - @map.setter - def map(self, v): - self._map = v - - def __iter__(self): - return iter(self.v) - - c = C([1,2,3,4]) - print(c.map) - print(c.map(lambda x:x+1, c)==(2, 3, 4, 5)) - print(c.apply(lambda x:x+2)) - c.map = DaskMap(type_=tuple) - print(c.map) - print(c.map(lambda x:x+1, c)) - c.map = map - print(c.map) - print(tuple(c.map(lambda x:x+1, c))) +# @dask_apply +# class C: + +# def __init__(self, v=[1,2,3]): +# self.v = v +# self._map = MTMap(type_=tuple) + +# @property +# def map(self): +# return self._map + +# @map.setter +# def map(self, v): +# self._map = v + +# def __iter__(self): +# return iter(self.v) + +# c = C([1,2,3,4]) +# print(c.map) +# print(c.map(lambda x:x+1, c)==(2, 3, 4, 5)) +# print(c.apply(lambda x:x+2)) +# c.map = DaskMap(type_=tuple) +# print(c.map) +# print(c.map(lambda x:x+1, c)) +# c.map = map +# print(c.map) +# print(tuple(c.map(lambda x:x+1, c))) \ No newline at end of file diff --git a/pyrimidine/qga.py b/pyrimidine/qga.py index c44a32b..5a67f29 100755 --- a/pyrimidine/qga.py +++ b/pyrimidine/qga.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +"""Quantum GA +""" + from .chromosome import QuantumChromosome from .population import HOFPopulation diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..4bdf97b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,2 @@ + +# test \ No newline at end of file