Skip to content

Commit

Permalink
environment dev/prod fixes ios + back
Browse files Browse the repository at this point in the history
  • Loading branch information
josancamon19 committed Aug 6, 2024
1 parent 6c88e24 commit 6011e39
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 37 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ backend/pretrained_models/
/backend/scripts/
/backend/pretrained_models/

google-credentials.json
backend/google-credentials.json
backend/google-credentials-dev.json

startup-script.sh
/app/lib/firebase_options_dev.dart
Expand Down
8 changes: 4 additions & 4 deletions app/flavorizr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ flavors:
applicationId: "com.friend.ios"
icon: "assets/images/app_launcher_icon.png"
firebase:
config: "apps/AppWithWearable/android/app/src/prod/google-services.json"
config: "app/android/app/src/prod/google-services.json"
ios:
bundleId: "com.friend-app-with-wearable.ios12"
icon: "assets/images/app_launcher_icon.png"
firebase:
config: "apps/AppWithWearable/ios/Config/Prod/GoogleService-Info.plist"
config: "app/ios/Config/Prod/GoogleService-Info.plist"
dev:
app:
name: "Friend Dev"
Expand All @@ -21,9 +21,9 @@ flavors:
icon: "assets/images/app_launcher_icon.png"
applicationId: "com.friend.ios.dev"
firebase:
config: "apps/AppWithWearable/android/app/src/dev/google-services.json"
config: "app/android/app/src/dev/google-services.json"
ios:
bundleId: "com.friend-app-with-wearable.ios12.development"
icon: "assets/images/app_launcher_icon.png"
firebase:
config: "apps/AppWithWearable/ios/Config/Dev/GoogleService-Info.plist"
config: "app/ios/Config/Dev/GoogleService-Info.plist"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
18 changes: 12 additions & 6 deletions app/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
426B89AC2C46919D00E24442 /* Config */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Config; sourceTree = "<group>"; };
556416C8748DD3DD2C06A9DB /* devProfile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = devProfile.xcconfig; path = Flutter/devProfile.xcconfig; sourceTree = "<group>"; };
5F7FD4162BF1232500923839 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
5F9F4EDC2C61EDA0002DDE6A /* OneSignalNotificationServiceExtensionRelease-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "OneSignalNotificationServiceExtensionRelease-dev.entitlements"; sourceTree = "<group>"; };
5F9F4EDD2C61EDA6002DDE6A /* OneSignalNotificationServiceExtensionProfile-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "OneSignalNotificationServiceExtensionProfile-dev.entitlements"; sourceTree = "<group>"; };
5F9F4EDE2C61EDB3002DDE6A /* OneSignalNotificationServiceExtensionDebug-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "OneSignalNotificationServiceExtensionDebug-dev.entitlements"; sourceTree = "<group>"; };
5FCEB2FA2C27586C00B17EE8 /* RunnerDebug-prod.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerDebug-prod.entitlements"; sourceTree = "<group>"; };
5FCEB2FB2C27587100B17EE8 /* RunnerProfile-prod.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerProfile-prod.entitlements"; sourceTree = "<group>"; };
5FCEB2FC2C2758B700B17EE8 /* RunnerRelease-prod.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RunnerRelease-prod.entitlements"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -158,6 +161,9 @@
42127D832C2839B60005AB40 /* OneSignalNotificationServiceExtension */ = {
isa = PBXGroup;
children = (
5F9F4EDE2C61EDB3002DDE6A /* OneSignalNotificationServiceExtensionDebug-dev.entitlements */,
5F9F4EDD2C61EDA6002DDE6A /* OneSignalNotificationServiceExtensionProfile-dev.entitlements */,
5F9F4EDC2C61EDA0002DDE6A /* OneSignalNotificationServiceExtensionRelease-dev.entitlements */,
42127D952C2839F60005AB40 /* OneSignalNotificationServiceExtension.entitlements */,
42127D842C2839B60005AB40 /* NotificationService.swift */,
42127D862C2839B60005AB40 /* Info.plist */,
Expand Down Expand Up @@ -1023,7 +1029,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
CODE_SIGN_ENTITLEMENTS = "OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtensionDebug-dev.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -1044,7 +1050,7 @@
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.friend-app-with-wearable.ios12.OneSignalNotificationServiceExtension";
PRODUCT_BUNDLE_IDENTIFIER = "com.friend-app-with-wearable.ios12.development.OneSignalNotificationServiceExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
Expand All @@ -1071,7 +1077,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
CODE_SIGN_ENTITLEMENTS = "OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtensionProfile-dev.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -1092,7 +1098,7 @@
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.friend-app-with-wearable.ios12.OneSignalNotificationServiceExtension";
PRODUCT_BUNDLE_IDENTIFIER = "com.friend-app-with-wearable.ios12.development.OneSignalNotificationServiceExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
Expand All @@ -1118,7 +1124,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
CODE_SIGN_ENTITLEMENTS = "OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtensionRelease-dev.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -1139,7 +1145,7 @@
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.friend-app-with-wearable.ios12.OneSignalNotificationServiceExtension";
PRODUCT_BUNDLE_IDENTIFIER = "com.friend-app-with-wearable.ios12.development.OneSignalNotificationServiceExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
Expand Down
4 changes: 0 additions & 4 deletions app/ios/Runner/RunnerDebug-dev.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,5 @@
<array>
<string>Default</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.friend-app-with-wearable.ios12.onesignal</string>
</array>
</dict>
</plist>
4 changes: 0 additions & 4 deletions app/ios/Runner/RunnerProfile-dev.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,5 @@
<array>
<string>Default</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.friend-app-with-wearable.ios12.onesignal</string>
</array>
</dict>
</plist>
4 changes: 0 additions & 4 deletions app/ios/Runner/RunnerRelease-dev.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,5 @@
<array>
<string>Default</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.friend-app-with-wearable.ios12.onesignal</string>
</array>
</dict>
</plist>
7 changes: 1 addition & 6 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@

modal_app = App(
name='api',
secrets=[
Secret.from_name("gcp-credentials"),
Secret.from_name("huggingface-token"),
Secret.from_dotenv('.env'),
],
mounts=[mount.Mount.from_local_dir('templates/', remote_path='templates/')]
secrets=[Secret.from_name("gcp-credentials"), Secret.from_name('envs')],
)
image = (
Image.debian_slim()
Expand Down
12 changes: 6 additions & 6 deletions backend/models/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def from_json(cls, json_data: dict):
class ExternalIntegration(BaseModel):
triggers_on: str
webhook_url: str
setup_completed_url: Optional[str]
setup_completed_url: Optional[str] = None
setup_instructions_file_path: str
# TODO: refactor to be read from backend, so frontend doesn't do extra request (cache)
# setup_instructions_markdown: str = ''
Expand All @@ -36,12 +36,12 @@ class Plugin(BaseModel):
description: str
image: str # TODO: return image_url: str with the whole repo + path
capabilities: Set[str]
memory_prompt: Optional[str]
chat_prompt: Optional[str]
external_integration: Optional[ExternalIntegration]
memory_prompt: Optional[str] = None
chat_prompt: Optional[str] = None
external_integration: Optional[ExternalIntegration] = None
reviews: List[PluginReview] = []
user_review: Optional[PluginReview]
rating_avg: Optional[float]
user_review: Optional[PluginReview] = None
rating_avg: Optional[float] = 0
rating_count: int = 0
enabled: bool = False
deleted: bool = False
Expand Down
1 change: 1 addition & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ pydub==0.25.1
Pygments==2.18.0
PyJWT==2.9.0
pyparsing==3.1.2
python-dotenv==1.0.1
python-multipart==0.0.9
PyYAML==6.0.1
redis==5.0.8
Expand Down
1 change: 0 additions & 1 deletion backend/routers/memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from fastapi import APIRouter, Depends, HTTPException

import database.chat as chat_db
import database.memories as memories_db
from database.vector import upsert_vector, delete_vector, upsert_vectors
from models.memory import *
Expand Down
7 changes: 6 additions & 1 deletion backend/routers/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ def disable_plugin_endpoint(plugin_id: str, uid: str = Depends(auth.get_current_
return {'status': 'ok'}


@router.get('/v1/plugins', tags=['v1']) # No auth while migration happens for all.
@router.get('/plugins') # No auth while migration happens for all.
def get_plugins(uid: str):
return get_plugins_data(uid, include_reviews=True)


@router.get('/v1/plugins', tags=['v1'])
def get_plugins(uid: str):
return get_plugins_data(uid, include_reviews=True)

Expand Down

0 comments on commit 6011e39

Please sign in to comment.