Skip to content

Commit 244a8de

Browse files
authored
Merge pull request #420 from slayoo/dt_coal
adding test that checks for TODO annotations; updating TODO annotations
2 parents 42d46c6 + cfff23e commit 244a8de

File tree

32 files changed

+111
-49
lines changed

32 files changed

+111
-49
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- run: |
3131
pip install -r requirements.txt
3232
33-
# TODO (https://github.com/numba/numba/issues/6350#issuecomment-728174860)
33+
# TODO #184 (https://github.com/numba/numba/issues/6350#issuecomment-728174860)
3434
- if: matrix.platform == 'ubuntu-latest'
3535
env:
3636
NUMBA_THREADING_LAYER: omp

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# https://github.com/pypa/virtualenv/pull/1064/files
1717
- sed -i 's/"rU"/"r"/g' /home/travis/virtualenv/python3.8.0/lib/python3.8/site.py
1818
- cat /home/travis/virtualenv/python3.8.0/lib/python3.8/site.py
19-
- export PY_FLAGS="" # TODO numba 0.52 triggers deprecation warnings with newest numpy
19+
- export PY_FLAGS="" # TODO #408: numba 0.52 triggers deprecation warnings with newest numpy
2020
- name: "Python 3.7 on Linux numba::parallel=False"
2121
before_script:
2222
- sed -i s/parallel=True/parallel=False/g PySDM/backends/numba/conf.py
@@ -57,7 +57,7 @@ script:
5757
- NUMBA_DISABLE_JIT=1 $PYTEST PySDM_tests/unit_tests --cov-report term --cov=PySDM
5858
- $PYTEST
5959
- |
60-
python$PY_SFX -m ipykernel install --user # TODO: https://github.com/ipython/ipykernel/issues/560
60+
python$PY_SFX -m ipykernel install --user
6161
for i in PySDM_examples/*/demo.ipynb; do
6262
$NBCONVERT $i > $i.md.repo;
6363
$NBCONVERT --execute --ExecutePreprocessor.timeout=1800 $i || exit 1;

PySDM/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
from .builder import Builder
99

10-
__version__ = "TODO"
10+
__version__ = "TODO #415"

PySDM/backends/numba/impl/_algorithmic_methods.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def adaptive_sdm_gamma_body(gamma, idx, length, n, cell_id, dt_left, dt, dt_rang
4848
dt_todo = np.empty_like(dt_left)
4949
for cid in prange(len(dt_todo)):
5050
dt_todo[cid] = min(dt_left[cid], dt_range[1])
51-
for i in range(length // 2): # TODO: #401
51+
for i in range(length // 2): # TODO #401
5252
if gamma[i] == 0:
5353
continue
5454
j, k = pair_indices(i, idx, is_first_in_pair)
@@ -173,7 +173,7 @@ def compute_gamma_body(gamma, rand, idx, length, n, cell_id,
173173

174174
j, k = pair_indices(i, idx, is_first_in_pair)
175175
prop = n[j] // n[k]
176-
g = min(int(gamma[i]), prop) # TODO: test asserting that min is not needed with adaptivity
176+
g = min(int(gamma[i]), prop) # TODO #416: test asserting that min is not needed with adaptivity
177177
cid = cell_id[j]
178178
collision_rate[cid] += g * n[k]
179179
collision_rate_deficit[cid] += (int(gamma[i]) - g) * n[k]

PySDM/backends/numba/storage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def product(self, multiplicand, multiplier):
180180
impl.multiply_out_of_place(self.data, multiplicand.data, multiplier)
181181
return self
182182

183-
# TODO #352 rename (different logic than np.ravel())
184183
def ravel(self, other):
185184
if isinstance(other, Storage):
186185
self.data[:] = other.data.ravel()

PySDM/backends/thrustRTC/fakeThrustRTC/fakeThrustRTC.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def __init__(self, ndarray):
3434
self.range = lambda start, stop: FakeThrustRTC.DVRange(self.ndarray[start: stop])
3535
self.to_host = lambda: np.copy(self.ndarray)
3636

37-
# TODO: should not be needed
3837
def __setitem__(self, key, value):
3938
if isinstance(value, FakeThrustRTC.Number):
4039
value = value.ndarray
@@ -102,7 +101,7 @@ def Find(vector, value):
102101

103102
@staticmethod
104103
def device_vector(elem_cls, size):
105-
if elem_cls == 'double' or elem_cls == 'float': # TODO: distinguish np.float32 and np.float64?
104+
if elem_cls == 'double' or elem_cls == 'float': # TODO #405
106105
dtype = np.float64
107106
elif elem_cls == 'int64_t':
108107
dtype = np.int64
@@ -185,4 +184,4 @@ def Wait():
185184
@staticmethod
186185
def Sort_By_Key(keys, values):
187186
values.ndarray[:] = values.ndarray[np.argsort(keys.ndarray)]
188-
# TODO #328 Thrust sorts keys as well
187+
# TODO #328 Thrust sorts keys as well

PySDM/backends/thrustRTC/impl/_algorithmic_methods.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def adaptive_sdm_end(dt_left, cell_start):
5656
@staticmethod
5757
@nice_thrust(**NICE_THRUST_FLAGS)
5858
def adaptive_sdm_gamma(gamma, n, cell_id, dt_left, dt, dt_range, is_first_in_pair, stats_n_substep, stats_dt_min):
59-
# TODO: implement stats_dt_min
59+
# TODO #406 implement stats_dt_min
6060
dt_todo = trtc.device_vector('float', len(dt_left))
6161
d_dt_max = PrecisionResolver.get_floating_point(dt_range[1])
6262
d_dt = PrecisionResolver.get_floating_point(dt)
@@ -430,10 +430,7 @@ def remove_zero_n_or_flagged(data, idx, length) -> int:
430430
@staticmethod
431431
@nice_thrust(**NICE_THRUST_FLAGS)
432432
def _sort_by_cell_id_and_update_cell_start(cell_id, cell_idx, cell_start, idx, length):
433-
# TODO #69
434-
# if length > 0:
435-
# max_cell_id = max(cell_id.to_ndarray())
436-
# assert max_cell_id == 0
433+
# TODO #330
437434
trtc.Fill(cell_start.data, trtc.DVInt64(length))
438435
AlgorithmicMethods.___sort_by_cell_id_and_update_cell_start_body.launch_n(length - 1,
439436
[cell_id.data, cell_start.data,

PySDM/dynamics/displacement.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@ def update_cell_origin(self, cell_origin, position_in_cell):
7777
position_in_cell -= floor_of_position
7878

7979
def boundary_condition(self, cell_origin):
80-
# TODO #346 hardcoded periodic
81-
# TODO #346 droplets above the mesh
80+
# TODO #414 hardcoded periodic
81+
# TODO #414 droplets above the mesh
8282
cell_origin %= self.grid

PySDM/dynamics/eulerian_advection/mpdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def wait(self):
6363
self.thread.join()
6464

6565
def step(self):
66-
try: # TODO: move this to within PyMPDATA
66+
try: # TODO #417: move this to within PyMPDATA
6767
for mpdata in self.mpdatas.values():
6868
mpdata.advance(1)
6969
except NumbaExperimentalFeatureWarning:

PySDM/environments/kinematic_1d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def init_attributes(self, *,
5454
def sync(self):
5555
super().sync()
5656

57-
# TODO: common with 2D
57+
# TODO #418: common with 2D
5858
@property
5959
def dv(self):
6060
return self.mesh.dv

0 commit comments

Comments
 (0)