Skip to content

Commit

Permalink
Pin mimesis version in setup.py. (#11906)
Browse files Browse the repository at this point in the history
The dependency pinning for `mimesis` in cudf's `setup.py` didn't match the conda environment. It was missing a pinning to `<4.1` from #8745. However, based on the conversation in #8551, this pinning of `<4.1` was only chosen because 4.1.0 wasn't yet available on conda-forge. Since the current version of mimesis is now 6.1.1, this PR updates the mimesis pinning to `>=4.1` and uses `generate_string` instead of `schoice`. I tested this locally with mimesis 6.1.1 and mimesis 4.1.0 and both passed tests.

Merge this PR concurrently with rapidsai/integration#547.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #11906
  • Loading branch information
bdice authored Oct 18, 2022
1 parent a926c52 commit cea10ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conda/environments/cudf_dev_cuda11.5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies:
- myst-nb
- scipy
- dask-cuda=22.12.*
- mimesis<4.1
- mimesis>=4.1.0
- packaging
- protobuf>=3.20.1,<3.21.0a0
- nvtx>=0.2.1
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/testing/dataset_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def rand_dataframe(
cardinality=cardinality,
null_frequency=null_frequency,
generator=lambda cardinality=cardinality: [
mimesis.random.random.schoice(
mimesis.random.random.generate_string(
string.printable,
np.random.randint(
low=0,
Expand Down Expand Up @@ -684,7 +684,7 @@ def get_values_for_nested_data(dtype, lists_max_length=None, size=None):
values = float_generator(dtype=dtype, size=cardinality)()
elif dtype.kind in ("U", "O"):
values = [
mimesis.random.random.schoice(
mimesis.random.random.generate_string(
string.printable,
100,
)
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"pytest-benchmark",
"pytest-xdist",
"hypothesis",
"mimesis",
"mimesis>=4.1.0",
"fastavro>=0.22.9",
"python-snappy>=0.6.0",
"pyorc",
Expand Down

0 comments on commit cea10ca

Please sign in to comment.