Skip to content

Commit

Permalink
Merge pull request #25 from OpenMined/feature/add_syftbox_install
Browse files Browse the repository at this point in the history
Feature/add Syftbox install comand
  • Loading branch information
madhavajay authored Oct 11, 2024
2 parents 9b8732d + 493ebba commit d30fd73
Show file tree
Hide file tree
Showing 13 changed files with 1,349 additions and 100 deletions.
29 changes: 29 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,41 @@ run-client name port="auto" server="http://localhost:5001":

# ---------------------------------------------------------------------------------------------------------------------

# Run a local syftbox app command
[group('app')]
run-app name command subcommand="":
#!/bin/bash
set -eou pipefail

# generate a local email from name, but if it looks like an email, then use it as is
EMAIL="{{ name }}@openmined.org"
if [[ "{{ name }}" == *@*.* ]]; then EMAIL="{{ name }}"; fi

# Working directory for client is .clients/<email>
CONFIG_DIR=.clients/$EMAIL/config
SYNC_DIR=.clients/$EMAIL/sync
mkdir -p $CONFIG_DIR $SYNC_DIR

echo -e "Config Dir : $CONFIG_DIR"

uv run syftbox/main.py app {{ command }} {{ subcommand }} --config_path=$CONFIG_DIR/config.json

# ---------------------------------------------------------------------------------------------------------------------

# Build syftbox wheel
[group('build')]
build:
rm -rf dist
uv build


# Build syftbox wheel
[group('install')]
install:
rm -rf dist
uv build
uv tool install $(ls /Users/madhavajay/dev/syft/dist/*.whl) --reinstall

# Bump version, commit and tag
[group('build')]
bump-version level="patch":
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ dependencies = [
"pydantic-settings>=2.5.2",
"pytest>=8.3.3",
"httpx>=0.27.2",
"pyyaml>=6.0.2",
"psutil>=6.0.0",
]

[project.optional-dependencies]
Expand Down
Empty file added syftbox/app/__init__.py
Empty file.
Loading

0 comments on commit d30fd73

Please sign in to comment.