diff options
Diffstat (limited to 'continuedev/src')
6 files changed, 22 insertions, 19 deletions
| diff --git a/continuedev/src/continuedev/core/policy.py b/continuedev/src/continuedev/core/policy.py index 51135f70..2b50307a 100644 --- a/continuedev/src/continuedev/core/policy.py +++ b/continuedev/src/continuedev/core/policy.py @@ -58,7 +58,7 @@ class DemoPolicy(Policy):                  # AnswerQuestionChroma(question=user_input),                  # EditFileChroma(request=user_input),                  (SimpleChatStep(user_input=user_input), -                 "Respond to the user with a chat message"), +                 "Respond to the user with a chat message. Can answer questions about code or anything else."),              ], default_step=EditHighlightedCodeStep(user_input=user_input))          state = history.get_current() diff --git a/continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py b/continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py index f042424c..6a743fb5 100644 --- a/continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py +++ b/continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py @@ -24,15 +24,15 @@ class SetUpChessPipelineStep(Step):          # running commands to get started when creating a new dlt pipeline          await sdk.run([ -            'python3 -m venv env', -            'source env/bin/activate', +            'python3 -m venv .env', +            'source .env/bin/activate',              'pip install dlt',              'dlt --non-interactive init chess duckdb',              'pip install -r requirements.txt',              'pip install pandas streamlit'  # Needed for the pipeline show step later          ], name="Set up Python environment", description=dedent(f"""\ -            - Create a Python virtual environment: `python3 -m venv env` -            - Activate the virtual environment: `source env/bin/activate` +            - Create a Python virtual environment: `python3 -m venv .env` +            - Activate the virtual environment: `source .env/bin/activate`              - Install dlt: `pip install dlt`              - Create a new dlt pipeline called "chess" that loads data into a local DuckDB instance: `dlt init chess duckdb`              - Install the Python dependencies for the pipeline: `pip install -r requirements.txt`""")) diff --git a/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py b/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py index ea4607da..88e27d2a 100644 --- a/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py +++ b/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py @@ -35,15 +35,15 @@ class SetupPipelineStep(Step):          # running commands to get started when creating a new dlt pipeline          await sdk.run([ -            'python3 -m venv env', -            'source env/bin/activate', +            'python3 -m venv .env', +            'source .env/bin/activate',              'pip install dlt',              f'dlt --non-interactive init {source_name} duckdb',              'pip install -r requirements.txt'          ], description=dedent(f"""\              Running the following commands: -            - `python3 -m venv env`: Create a Python virtual environment -            - `source env/bin/activate`: Activate the virtual environment +            - `python3 -m venv .env`: Create a Python virtual environment +            - `source .env/bin/activate`: Activate the virtual environment              - `pip install dlt`: Install dlt              - `dlt init {source_name} duckdb`: Create a new dlt pipeline called {source_name} that loads data into a local DuckDB instance              - `pip install -r requirements.txt`: Install the Python dependencies for the pipeline"""), name="Setup Python environment") @@ -156,7 +156,7 @@ class RunQueryStep(Step):      hide: bool = True      async def run(self, sdk: ContinueSDK): -        output = await sdk.run('env/bin/python3 query.py', name="Run test query", description="Running `env/bin/python3 query.py` to test that the data was loaded into DuckDB as expected", handle_error=False) +        output = await sdk.run('.env/bin/python3 query.py', name="Run test query", description="Running `.env/bin/python3 query.py` to test that the data was loaded into DuckDB as expected", handle_error=False)          if "Traceback" in output or "SyntaxError" in output:              suggestion = sdk.models.gpt35.complete(dedent(f"""\ diff --git a/continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py b/continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py index 5cf89ccf..4b8971c2 100644 --- a/continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py +++ b/continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py @@ -27,15 +27,15 @@ class SetUpChessPipelineStep(Step):          # running commands to get started when creating a new dlt pipeline          await sdk.run([ -            'python3 -m venv env', -            'source env/bin/activate', +            'python3 -m venv .env', +            'source .env/bin/activate',              'pip install dlt',              'dlt --non-interactive init chess duckdb',              'pip install -r requirements.txt',          ], name="Set up Python environment", description=dedent(f"""\              Running the following commands: -            - `python3 -m venv env`: Create a Python virtual environment -            - `source env/bin/activate`: Activate the virtual environment +            - `python3 -m venv .env`: Create a Python virtual environment +            - `source .env/bin/activate`: Activate the virtual environment              - `pip install dlt`: Install dlt              - `dlt init chess duckdb`: Create a new dlt pipeline called "chess" that loads data into a local DuckDB instance              - `pip install -r requirements.txt`: Install the Python dependencies for the pipeline""")) @@ -75,7 +75,7 @@ class LoadDataStep(Step):      async def run(self, sdk: ContinueSDK):          # Run the pipeline again to load data to BigQuery -        output = await sdk.run('env/bin/python3 chess_pipeline.py', name="Load data to BigQuery", description="Running `env/bin/python3 chess_pipeline.py` to load data to Google BigQuery") +        output = await sdk.run('.env/bin/python3 chess_pipeline.py', name="Load data to BigQuery", description="Running `.env/bin/python3 chess_pipeline.py` to load data to Google BigQuery")          if "Traceback" in output or "SyntaxError" in output:              with open(os.path.join(os.path.dirname(__file__), "dlt_duckdb_to_bigquery_docs.md"), "r") as f: diff --git a/continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py b/continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py index ee3275e7..c9749348 100644 --- a/continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py +++ b/continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py @@ -28,15 +28,15 @@ class SetupPipelineStep(Step):      async def run(self, sdk: ContinueSDK):          await sdk.run([ -            'python3 -m venv env', -            'source env/bin/activate', +            'python3 -m venv .env', +            'source .env/bin/activate',              'pip install dlt',              f'dlt --non-interactive init {self.source_name} duckdb',              'pip install -r requirements.txt'          ], description=dedent(f"""\              Running the following commands: -            - `python3 -m venv env`: Create a Python virtual environment -            - `source env/bin/activate`: Activate the virtual environment +            - `python3 -m venv .env`: Create a Python virtual environment +            - `source .env/bin/activate`: Activate the virtual environment              - `pip install dlt`: Install dlt              - `dlt init {self.source_name} duckdb`: Create a new dlt pipeline called {self.source_name} that loads data into a local DuckDB instance              - `pip install -r requirements.txt`: Install the Python dependencies for the pipeline"""), name="Setup Python environment") diff --git a/continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py b/continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py index a19caf8b..688f44c3 100644 --- a/continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py +++ b/continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py @@ -9,6 +9,9 @@ class WritePytestsRecipe(Step):      for_filepath: Union[str, None] = None      user_input: str = "Write unit tests for this file." +    async def describe(self, models): +        return f"Writing unit tests for {self.for_filepath}" +      async def run(self, sdk: ContinueSDK):          if self.for_filepath is None:              self.for_filepath = (await sdk.ide.getOpenFiles())[0] | 
