Skip to content

Commit

Permalink
Release 1.3.4 (#367)
Browse files Browse the repository at this point in the history
* fix: Cassandra config keys (#366)
  • Loading branch information
ralphrass authored Jun 28, 2024
1 parent f1d4626 commit 6df7534
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 35 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Preferably use **Added**, **Changed**, **Removed** and **Fixed** topics in each

## [Unreleased]

## [1.3.4](https://github.com/quintoandar/butterfree/releases/tag/1.3.4)
* Fix Cassandra Config and tests ([#366](https://github.com/quintoandar/butterfree/pull/366))

## [1.3.3](https://github.com/quintoandar/butterfree/releases/tag/1.3.3)
* Fix Cassandra Config and Numpy version ([#364](https://github.com/quintoandar/butterfree/pull/364))

Expand Down
6 changes: 3 additions & 3 deletions butterfree/configs/db/cassandra_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def translate(self, schema: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
"integertype": "int",
"longtype": "bigint",
"stringtype": "text",
"arraytype(longtype,true)": "frozen<list<bigint>>",
"arraytype(stringtype,true)": "frozen<list<text>>",
"arraytype(floattype,true)": "frozen<list<float>>",
"arraytype(longtype, true)": "frozen<list<bigint>>",
"arraytype(stringtype, true)": "frozen<list<text>>",
"arraytype(floattype, true)": "frozen<list<float>>",
}
cassandra_schema = []
for features in schema:
Expand Down
5 changes: 5 additions & 0 deletions docs/source/butterfree.configs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ butterfree.configs.logger module
:undoc-members:
:show-inheritance:

.. automodule:: butterfree.configs.logger
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
11 changes: 11 additions & 0 deletions docs/source/butterfree.constants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ butterfree.constants.spark\_constants module
:show-inheritance:


.. automodule:: butterfree.constants.migrations
:members:
:undoc-members:
:show-inheritance:


.. automodule:: butterfree.constants.spark_constants
:members:
:undoc-members:
Expand All @@ -66,6 +72,11 @@ butterfree.constants.window\_definitions module
:undoc-members:
:show-inheritance:

.. automodule:: butterfree.constants.window_definitions
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
17 changes: 0 additions & 17 deletions docs/source/butterfree.dataframe_service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,12 @@ butterfree.dataframe\_service package
Submodules
----------

butterfree.dataframe\_service.incremental\_strategy module
----------------------------------------------------------

.. automodule:: butterfree.dataframe_service.incremental_strategy
:members:
:undoc-members:
:show-inheritance:

butterfree.dataframe\_service.partitioning module
-------------------------------------------------

.. automodule:: butterfree.dataframe_service.partitioning
:members:
:undoc-members:
:show-inheritance:

butterfree.dataframe\_service.repartition module
------------------------------------------------

.. automodule:: butterfree.dataframe_service.incremental_strategy
:members:
:undoc-members:
:show-inheritance:

.. automodule:: butterfree.dataframe_service.partitioning
:members:
Expand Down
4 changes: 0 additions & 4 deletions docs/source/butterfree.hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ Subpackages
Submodules
----------

butterfree.hooks.hook module
----------------------------

.. automodule:: butterfree.hooks.hook
:members:
:undoc-members:
:show-inheritance:

butterfree.hooks.hookable\_component module
-------------------------------------------

.. automodule:: butterfree.hooks.hookable_component
:members:
Expand Down
4 changes: 0 additions & 4 deletions docs/source/butterfree.hooks.schema_compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ butterfree.hooks.schema\_compatibility package
Submodules
----------

butterfree.hooks.schema\_compatibility.cassandra\_table\_schema\_compatibility\_hook module
-------------------------------------------------------------------------------------------

.. automodule:: butterfree.hooks.schema_compatibility.cassandra_table_schema_compatibility_hook
:members:
:undoc-members:
:show-inheritance:

butterfree.hooks.schema\_compatibility.spark\_table\_schema\_compatibility\_hook module
---------------------------------------------------------------------------------------

.. automodule:: butterfree.hooks.schema_compatibility.spark_table_schema_compatibility_hook
:members:
Expand Down
5 changes: 0 additions & 5 deletions docs/source/butterfree.migrations.database_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@ butterfree.migrations.database\_migration package
Submodules
----------

---------------------------------------------------------------------

.. automodule:: butterfree.migrations.database_migration.cassandra_migration
:members:
:undoc-members:
:show-inheritance:

butterfree.migrations.database\_migration.database\_migration module
--------------------------------------------------------------------

.. automodule:: butterfree.migrations.database_migration.database_migration
:members:
:undoc-members:
:show-inheritance:

butterfree.migrations.database\_migration.metastore\_migration module
---------------------------------------------------------------------

.. automodule:: butterfree.migrations.database_migration.metastore_migration
:members:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import find_packages, setup

__package_name__ = "butterfree"
__version__ = "1.3.3"
__version__ = "1.3.4"
__repository_url__ = "https://github.com/quintoandar/butterfree"

with open("requirements.txt") as f:
Expand Down
14 changes: 13 additions & 1 deletion tests/unit/butterfree/migrations/database_migration/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
from pyspark.sql.types import DoubleType, FloatType, LongType, TimestampType
from pyspark.sql.types import (
ArrayType,
DoubleType,
FloatType,
LongType,
StringType,
TimestampType,
)
from pytest import fixture

from butterfree.constants import DataType
Expand Down Expand Up @@ -30,6 +37,11 @@ def fs_schema():
{"column_name": "id", "type": LongType(), "primary_key": True},
{"column_name": "timestamp", "type": TimestampType(), "primary_key": True},
{"column_name": "new_feature", "type": FloatType(), "primary_key": False},
{
"column_name": "array_feature",
"type": ArrayType(StringType(), True),
"primary_key": False,
},
{
"column_name": "feature1__avg_over_1_week_rolling_windows",
"type": FloatType(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ def test_create_table_query(self, fs_schema):
expected_query = [
"CREATE TABLE test.table_name "
"(id LongType, timestamp TimestampType, new_feature FloatType, "
"array_feature ArrayType(StringType(), True), "
"feature1__avg_over_1_week_rolling_windows FloatType, "
"PRIMARY KEY (id, timestamp));"
]

query = cassandra_migration.create_query(fs_schema, "table_name")

assert query, expected_query

0 comments on commit 6df7534

Please sign in to comment.