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

Implement Comprehensive Development Mode #174

Closed
24 tasks
dhirenmathur opened this issue Nov 9, 2024 · 12 comments
Closed
24 tasks

Implement Comprehensive Development Mode #174

dhirenmathur opened this issue Nov 9, 2024 · 12 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@dhirenmathur
Copy link
Contributor

dhirenmathur commented Nov 9, 2024

Overview

The isDevelopmentMode flag is designed to disable third-party services (Firebase, GitHub, Portkey, AgentOps) to enable local development with minimal setup. Several components need to be modified to properly handle this development mode.

Current Issue

  • High time to get started with contribution

Required Changes

1. Main Application (main.py)

  • Add validation to ensure isDevelopmentMode is only enabled when ENV='development'
  • Implement error handling for mismatched configurations
  • Add logging for development mode status on startup

2. Authentication Service (auth_service.py)

  • Prevent Firebase initialization in development mode
  • Implement mock authentication that returns:
    {"user_id": os.getenv("defaultUsername")}
  • Add clear logging when using mock authentication

3. Provider Service (provider_service.py)

  • Modify ChatOpenAI initialization to bypass Portkey in development mode
  • Modify ChatAnthropic initialization to bypass Portkey in development mode
  • Add configuration validation for both providers
  • Implement logging for provider initialization status

4. GitHub Service (github_service.py)

  • Prevent GitHub client initialization in development mode
  • Implement local repository operations:
    • Directory scanning
    • Local git operations for metadata
    • File reading capabilities
  • Modify get_code functions to read from neo4j node 'text' key for local repos
  • Add validation for required local repo structure

5. Secret Manager

  • Prevent secret manager initialization in development mode
  • Implement local alternative for secrets (env variables)
  • Add validation for required development environment variables

Documentation Updates Needed

Update teh Getting Started file with -

  • Development mode setup instructions
  • Local repository requirements
  • Environment variable documentation
  • Troubleshooting guide

Acceptance Criteria

  1. Application starts successfully in development mode with single start.sh file
  2. No third-party service initialization occurs in development mode
  3. All core functionality works with local alternatives
  4. Clear error messages for misconfiguration
  5. Comprehensive logging of development mode status
@dhirenmathur dhirenmathur added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 9, 2024
@waveywaves
Copy link
Contributor

For the provider is it possible for the user to use a locally hosted model such as something fro huggingface ?

For the GitHub service which focuses on GitHub, it should be possible for users to use their own git server like gittea.

@dhirenmathur
Copy link
Contributor Author

dhirenmathur commented Nov 11, 2024

@waveywaves

For the provider is it possible for the user to use a locally hosted model such as something fro huggingface ?

We do have support for other local as well as open source models planned as a separate feature.

For the GitHub service which focuses on GitHub, it should be possible for users to use their own git server like gittea.

For Github the future integrations will be more along the lines of bitbucket etc which are more widely used

Do you want to work on this issue?

@waveywaves
Copy link
Contributor

waveywaves commented Nov 11, 2024

@dhirenmathur yep can you assign me to this issue ?

@dhirenmathur
Copy link
Contributor Author

Let me know if you need any help @waveywaves

@dhirenmathur
Copy link
Contributor Author

@waveywaves were you able to get started?

@waveywaves
Copy link
Contributor

waveywaves commented Nov 13, 2024

Hey @dhirenmathur getting started on it today and plan on working through it tomorrow, I'll update this issue with a draft PR soon

@vineetshar
Copy link
Contributor

hi @waveywaves I am going to pick up the accommodation for tools / code fetching services for supporting local repos , removing their tight coupling with GitHub as part of another internal improvement.

you can continue with rest of the implementation.

@waveywaves
Copy link
Contributor

@vineetshar sounds good to me

@waveywaves
Copy link
Contributor

first PR for this issue
#192

@waveywaves
Copy link
Contributor

waveywaves commented Nov 28, 2024

@dhirenmathur we can mark 1,2,3 over here as done. Shall open a PR for 5 soon.

@vineetshar
Copy link
Contributor

@waveywaves 1,2,3,4,5 all are done now.

@waveywaves
Copy link
Contributor

waveywaves commented Nov 29, 2024

@vineetshar that's awesome ! Do we still need comprehensive documentation on this ? If so I can contribute to it.
just saw #195 PR, looking forward to testing it out locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants