Skip to content

Commit

Permalink
relax requirements, fix numpy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Škoda committed Jul 24, 2024
1 parent b383327 commit c34f8c2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion lakeapi/_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
_store: joblib.Memory = joblib.Memory(
'.lake_cache',
compress = 0,
bytes_limit = default_bytes_limit,
verbose = verbose_cache,
)
cached: Callable[..., Callable[..., Any]] = _store.cache
Expand Down
2 changes: 1 addition & 1 deletion lakeapi/_data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def pyarrow_schema_from_pandas(

def athena_types_from_pyarrow_schema(
schema: pa.Schema,
partitions: Optional[pyarrow.parquet.ParquetPartitions],
partitions: Optional['pyarrow.parquet.ParquetPartitions'],
ignore_null: bool = False,
) -> Tuple[Dict[str, str], Optional[Dict[str, str]]]:
"""Extract the related Athena data types from any PyArrow Schema considering possible partitions."""
Expand Down
2 changes: 1 addition & 1 deletion lakeapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def partition_filter(partition: Dict[str, str]) -> bool:
if table == "trades":
df.rename(columns={"id": "trade_id"}, inplace=True)

lakeapi._cache._store.reduce_size()
lakeapi._cache._store.reduce_size(lakeapi._cache.default_bytes_limit)
return df


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

requirements = [
'pandas>=1.0.5', 'boto3>=1.24,<2', 'cachetools_ext>=0.0.8,<0.1.0', 'botocache>=0.0.4,<0.1.0',
'joblib>=1.0.0', 'tqdm>=4,<5', 'pyarrow>=2.0.0,<15', 'aws-requests-auth==0.4.3', 'numpy<2',
'joblib>=1.0.0', 'tqdm>=4,<5', 'pyarrow>=2.0.0', 'aws-requests-auth==0.4.3', 'numba',
'typing-extensions>=4.0,<5; python_version < \'3.8\''
]

Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ setenv =
; deps =
; -r{toxinidir}/requirements.txt
deps =
setuptools
pytest
commands =
pytest --basetemp={envtmpdir} --ignore=tests/test_orderbook.py
; pip list
; test_orderbook.py requires numba and is not included in package

0 comments on commit c34f8c2

Please sign in to comment.