Skip to content

Commit 887fbb2

Browse files
authored
feat(mlop-2269): bump versions (#355)
* fix: bump versions adjust tests * add checklist * chore: bump python * bump pyspark * chore: java version all steps modified
1 parent da91b49 commit 887fbb2

File tree

61 files changed

+547
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+547
-231
lines changed

.checklist.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: quintoandar.com.br/checklist/v2
2+
kind: ServiceChecklist
3+
metadata:
4+
name: butterfree
5+
spec:
6+
description: >-
7+
A solution for Feature Stores.
8+
9+
costCenter: C055
10+
department: engineering
11+
lifecycle: production
12+
docs: true
13+
14+
ownership:
15+
team: data_products_mlops
16+
line: tech_platform
17+
18+
19+
libraries:
20+
- name: butterfree
21+
type: common-usage
22+
path: https://quintoandar.github.io/python-package-server/
23+
description: A lib to build Feature Stores.
24+
registries:
25+
- github-packages
26+
tier: T0
27+
28+
channels:
29+
squad: 'mlops'
30+
alerts: 'data-products-reports'

.github/workflows/publish.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v2
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.9'
20+
21+
- uses: actions/setup-java@v4
22+
with:
23+
java-version: '11'
24+
distribution: microsoft
25+
26+
- uses: vemonet/setup-spark@v1
27+
with:
28+
spark-version: '3.5.1'
29+
hadoop-version: '3'
1730

1831
- name: Install dependencies
1932
run: make ci-install

.github/workflows/staging.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,23 @@ jobs:
88
Pipeline:
99
if: github.ref == 'refs/heads/staging'
1010

11-
runs-on: ubuntu-22.04
12-
container: quintoandar/python-3-7-java
11+
runs-on: ubuntu-latest
1312

1413
steps:
1514
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.9'
18+
19+
- uses: actions/setup-java@v4
20+
with:
21+
java-version: '11'
22+
distribution: microsoft
23+
24+
- uses: vemonet/setup-spark@v1
25+
with:
26+
spark-version: '3.5.1'
27+
hadoop-version: '3'
1628

1729
- name: Install dependencies
1830
run: make ci-install

.github/workflows/test.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,23 @@ on:
99

1010
jobs:
1111
Pipeline:
12-
runs-on: ubuntu-22.04
13-
container: quintoandar/python-3-7-java
12+
runs-on: ubuntu-latest
1413

1514
steps:
1615
- uses: actions/checkout@v2
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.9'
19+
20+
- uses: actions/setup-java@v4
21+
with:
22+
java-version: '11'
23+
distribution: microsoft
24+
25+
- uses: vemonet/setup-spark@v1
26+
with:
27+
spark-version: '3.5.1'
28+
hadoop-version: '3'
1729

1830
- name: Install dependencies
1931
run: make ci-install

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ instance/
6666

6767
# PyBuilder
6868
target/
69+
pip/
6970

7071
# Jupyter Notebook
7172
.ipynb_checkpoints

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ style-check:
7676
@echo "Code Style"
7777
@echo "=========="
7878
@echo ""
79-
@python -m black --check -t py36 --exclude="build/|buck-out/|dist/|_build/|pip/|\.pip/|\.git/|\.hg/|\.mypy_cache/|\.tox/|\.venv/" . && echo "\n\nSuccess" || (echo "\n\nFailure\n\nYou need to run \"make apply-style\" to apply style formatting to your code"; exit 1)
79+
@python -m black --check -t py39 --exclude="build/|buck-out/|dist/|_build/|pip/|\.pip/|\.git/|\.hg/|\.mypy_cache/|\.tox/|\.venv/" . && echo "\n\nSuccess" || (echo "\n\nFailure\n\nYou need to run \"make apply-style\" to apply style formatting to your code"; exit 1)
8080

8181
.PHONY: quality-check
8282
## run code quality checks with flake8
@@ -104,8 +104,8 @@ checks: style-check quality-check type-check
104104
.PHONY: apply-style
105105
## fix stylistic errors with black
106106
apply-style:
107-
@python -m black -t py36 --exclude="build/|buck-out/|dist/|_build/|pip/|\.pip/|\.git/|\.hg/|\.mypy_cache/|\.tox/|\.venv/" .
108-
@python -m isort -rc --atomic butterfree/ tests/
107+
@python -m black -t py39 --exclude="build/|buck-out/|dist/|_build/|pip/|\.pip/|\.git/|\.hg/|\.mypy_cache/|\.tox/|\.venv/" .
108+
@python -m isort --atomic butterfree/ tests/
109109

110110
.PHONY: clean
111111
## clean unused artifacts

butterfree/_cli/migrate.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def __fs_objects(path: str) -> Set[FeatureSetPipeline]:
4646
logger.error(f"Path: {path} not found!")
4747
return set()
4848

49-
logger.info(f"Importing modules...")
49+
logger.info("Importing modules...")
5050
package = ".".join(path.strip("/").split("/"))
5151
imported = set(
5252
importlib.import_module(f".{name}", package=package) for name in modules
5353
)
5454

55-
logger.info(f"Scanning modules...")
55+
logger.info("Scanning modules...")
5656
content = {
5757
module: set(
5858
filter(
@@ -93,7 +93,8 @@ def __fs_objects(path: str) -> Set[FeatureSetPipeline]:
9393

9494

9595
PATH = typer.Argument(
96-
..., help="Full or relative path to where feature set pipelines are being defined.",
96+
...,
97+
help="Full or relative path to where feature set pipelines are being defined.",
9798
)
9899

99100
GENERATE_LOGS = typer.Option(
@@ -113,7 +114,10 @@ class Migrate:
113114
pipelines: list of Feature Set Pipelines to use to migration.
114115
"""
115116

116-
def __init__(self, pipelines: Set[FeatureSetPipeline],) -> None:
117+
def __init__(
118+
self,
119+
pipelines: Set[FeatureSetPipeline],
120+
) -> None:
117121
self.pipelines = pipelines
118122

119123
def _send_logs_to_s3(self, file_local: bool, debug_mode: bool) -> None:

butterfree/clients/cassandra_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def get_schema(self, table: str, database: str = None) -> List[Dict[str, str]]:
129129
return response
130130

131131
def _get_create_table_query(
132-
self, columns: List[CassandraColumn], table: str,
132+
self,
133+
columns: List[CassandraColumn],
134+
table: str,
133135
) -> str:
134136
"""Creates CQL statement to create a table."""
135137
parsed_columns = []

butterfree/clients/spark_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def read(
6161
if path and not isinstance(path, (str, list)):
6262
raise ValueError("path needs to be a string or a list of string")
6363

64-
df_reader: Union[
65-
DataStreamReader, DataFrameReader
66-
] = self.conn.readStream if stream else self.conn.read
64+
df_reader: Union[DataStreamReader, DataFrameReader] = (
65+
self.conn.readStream if stream else self.conn.read
66+
)
6767

6868
df_reader = df_reader.schema(schema) if schema else df_reader
6969

butterfree/extract/source.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ class Source(HookableComponent):
5858
"""
5959

6060
def __init__(
61-
self, readers: List[Reader], query: str, eager_evaluation: bool = True,
61+
self,
62+
readers: List[Reader],
63+
query: str,
64+
eager_evaluation: bool = True,
6265
) -> None:
6366
super().__init__()
6467
self.enable_pre_hooks = False

0 commit comments

Comments
 (0)