Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Install dependencies into a virtualenv for gitpod #2749

Merged
merged 9 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .gitpod.Dockerfile

This file was deleted.

14 changes: 12 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# https://www.gitpod.io/docs/config-gitpod-file
image:
file: .gitpod.Dockerfile
tasks:
- init: |
python -m venv venv
source venv/bin/activate

pip install pre-commit
pre-commit install --hook-type pre-commit --hook-type pre-push
pip install '.[dev]'
make compile-protos-python
make compile-protos-go
make compile-go-lib
env:
PYTHONUSERBASE: "/workspace/.pip-modules"
command: |
source venv/bin/activate

git config --global alias.ci 'commit -s'
git config --global alias.sw switch
git config --global alias.st status
Expand All @@ -31,3 +37,7 @@ github:
addComment: false
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: false

vscode:
extensions:
- ms-python.python
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ def _generate_python_protos(self, path: str):
self.python_folder,
]
+ proto_files,
env=os.environ
)

def run(self):
Expand Down Expand Up @@ -335,8 +334,6 @@ def _generate_go_protos(self, path: str):
proto_files = glob.glob(os.path.join(self.proto_folder, path))

try:
e = os.environ.copy()
e["PATH"] = self.path_val
subprocess.check_call(
self.go_protoc
+ [
Expand All @@ -350,7 +347,7 @@ def _generate_go_protos(self, path: str):
"--go-grpc_opt=module=github.com/feast-dev/feast/go/protos",
]
+ proto_files,
env=e,
env={"PATH": self.path_val},
)
except CalledProcessError as e:
print(f"Stderr: {e.stderr}")
Expand Down Expand Up @@ -499,6 +496,7 @@ def copy_extensions_to_source(self):
"grpcio",
"grpcio-tools==1.44.0",
"mypy-protobuf==3.1",
"pybindgen==0.22.0",
"sphinx!=4.0.0",
],
cmdclass={
Expand Down