Skip to content

Commit

Permalink
test[skip test]
Browse files Browse the repository at this point in the history
  • Loading branch information
Freakwill committed Dec 6, 2024
1 parent c8d0f73 commit 3cd81f1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
58 changes: 29 additions & 29 deletions pyrimidine/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

3 changes: 3 additions & 0 deletions pyrimidine/qga.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3

"""Quantum GA
"""


from .chromosome import QuantumChromosome
from .population import HOFPopulation
Expand Down
2 changes: 2 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

# test

0 comments on commit 3cd81f1

Please sign in to comment.