Skip to content

Commit 23b9cfa

Browse files
authored
chore: Update gitpod.yaml with uv (#4267)
* update gitpod.yaml with uv and pixi Signed-off-by: tokoko <[email protected]> * fix linter issues Signed-off-by: tokoko <[email protected]> * change precommit commands Signed-off-by: tokoko <[email protected]> --------- Signed-off-by: tokoko <[email protected]>
1 parent c491e57 commit 23b9cfa

File tree

17 files changed

+42
-59
lines changed

17 files changed

+42
-59
lines changed

.gitpod.Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM gitpod/workspace-base
2+
RUN sudo apt-get update && sudo apt-get install -y python3-dev python3-setuptools python3-pip python-is-python3 && sudo rm -rf /var/lib/apt/lists/*
3+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
4+
RUN curl -fsSL https://pixi.sh/install.sh | bash
5+
ENV PATH=$PATH:/home/gitpod/.cargo/bin
6+
RUN curl -s "https://get.sdkman.io" | bash
7+
SHELL ["/bin/bash", "-c"]
8+
RUN source "/home/gitpod/.sdkman/bin/sdkman-init.sh" && sdk install java 14.0.2-zulu

.gitpod.yml

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,20 @@
11
# https://www.gitpod.io/docs/config-gitpod-file
2+
image:
3+
file: .gitpod.Dockerfile
4+
25
tasks:
36
- init: |
4-
python -m venv venv
5-
source venv/bin/activate
6-
7-
pip install pre-commit
7+
uv venv
8+
uv pip install pre-commit
89
pre-commit install --hook-type pre-commit --hook-type pre-push
9-
pip install '.[dev]'
10-
make compile-protos-python
11-
make compile-protos-go
12-
make compile-go-lib
13-
env:
14-
PYTHONUSERBASE: "/workspace/.pip-modules"
15-
command: |
16-
source venv/bin/activate
17-
18-
git config --global alias.ci 'commit -s'
19-
git config --global alias.sw switch
20-
git config --global alias.st status
21-
git config --global alias.co checkout
22-
git config --global alias.br branch
23-
git config --global alias.df diff
24-
github:
25-
prebuilds:
26-
# enable for the default branch (defaults to true)
27-
master: true
28-
# enable for all branches in this repo (defaults to false)
29-
branches: false
30-
# enable for pull requests coming from this repo (defaults to true)
31-
pullRequests: true
32-
# enable for pull requests coming from forks (defaults to false)
33-
pullRequestsFromForks: false
34-
# add a check to pull requests (defaults to true)
35-
addCheck: true
36-
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
37-
addComment: false
38-
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
39-
addBadge: false
10+
source .venv/bin/activate
11+
export PYTHON=3.10 && make install-python-ci-dependencies-uv-venv
12+
# git config --global alias.ci 'commit -s'
13+
# git config --global alias.sw switch
14+
# git config --global alias.st status
15+
# git config --global alias.co checkout
16+
# git config --global alias.br branch
17+
# git config --global alias.df diff
4018
4119
vscode:
4220
extensions:

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ repos:
77
name: Format
88
stages: [ push ]
99
language: system
10-
entry: make format
10+
entry: make format-python
1111
pass_filenames: false
1212
- id: lint
1313
name: Lint
1414
stages: [ push ]
1515
language: system
16-
entry: make lint
16+
entry: make lint-python
1717
pass_filenames: false
1818
- id: template
1919
name: Build Templates

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ install-python-ci-dependencies-uv:
4646
uv pip install --system --no-deps -e .
4747
python setup.py build_python_protos --inplace
4848

49+
install-python-ci-dependencies-uv-venv:
50+
uv pip sync sdk/python/requirements/py$(PYTHON)-ci-requirements.txt
51+
uv pip install --no-deps -e .
52+
python setup.py build_python_protos --inplace
53+
4954
lock-python-ci-dependencies:
5055
uv pip compile --system --no-strip-extras setup.py --extra ci --output-file sdk/python/requirements/py$(PYTHON)-ci-requirements.txt
5156

sdk/python/feast/infra/offline_stores/contrib/athena_offline_store/tests/data_source.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def create_data_source(
4747
self,
4848
df: pd.DataFrame,
4949
destination_name: str,
50-
event_timestamp_column="ts",
5150
created_timestamp_column="created_ts",
5251
field_mapping: Optional[Dict[str, str]] = None,
5352
timestamp_field: Optional[str] = "ts",

sdk/python/feast/infra/offline_stores/contrib/mssql_offline_store/tests/data_source.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def create_data_source(
6464
self,
6565
df: pd.DataFrame,
6666
destination_name: str,
67-
event_timestamp_column="ts",
6867
created_timestamp_column="created_ts",
6968
field_mapping: Optional[Dict[str, str]] = None,
7069
timestamp_field: Optional[str] = "ts",

sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/tests/data_source.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ def create_data_source(
9191
self,
9292
df: pd.DataFrame,
9393
destination_name: str,
94-
event_timestamp_column="ts",
9594
created_timestamp_column="created_ts",
9695
field_mapping: Optional[Dict[str, str]] = None,
9796
timestamp_field: Optional[str] = "ts",
@@ -115,7 +114,7 @@ def create_offline_store_config(self) -> PostgreSQLOfflineStoreConfig:
115114
def get_prefixed_table_name(self, suffix: str) -> str:
116115
return f"{self.project_name}_{suffix}"
117116

118-
def create_online_store(self) -> PostgreSQLOnlineStoreConfig:
117+
def create_online_store(self) -> PostgreSQLOnlineStoreConfig: # type: ignore
119118
assert self.container
120119
return PostgreSQLOnlineStoreConfig(
121120
type="postgres",

sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/tests/data_source.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def create_data_source(
6969
self,
7070
df: pd.DataFrame,
7171
destination_name: str,
72-
event_timestamp_column="ts",
7372
created_timestamp_column="created_ts",
7473
field_mapping: Optional[Dict[str, str]] = None,
7574
timestamp_field: Optional[str] = "ts",

sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/tests/data_source.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def create_data_source(
8181
self,
8282
df: pd.DataFrame,
8383
destination_name: str,
84-
event_timestamp_column="ts",
8584
created_timestamp_column="created_ts",
8685
field_mapping: Optional[Dict[str, str]] = None,
8786
timestamp_field: Optional[str] = "ts",

sdk/python/tests/integration/feature_repos/repo_configuration.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,7 @@ def construct_test_environment(
500500
aws_registry_path = os.getenv(
501501
"AWS_REGISTRY_PATH", "s3://feast-int-bucket/registries"
502502
)
503-
registry: Union[str, RegistryConfig] = (
504-
f"{aws_registry_path}/{project}/registry.db"
505-
)
503+
registry = RegistryConfig(path=f"{aws_registry_path}/{project}/registry.db")
506504
else:
507505
registry = RegistryConfig(
508506
path=str(Path(repo_dir_name) / "registry.db"),

0 commit comments

Comments
 (0)