env to .env to be caught by .gitignore
This commit is contained in:
parent
34f2234e8b
commit
bd01bcb807
9 changed files with 35 additions and 30 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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`"""))
|
||||
|
|
|
|||
|
|
@ -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"""\
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -93,5 +93,5 @@ class SetUpVenvStep(Step):
|
|||
if os == "Windows":
|
||||
await sdk.run("python -m venv env; .\\env\\Scripts\\activate")
|
||||
else:
|
||||
await sdk.run("python3 -m venv env && source env/bin/activate") # MacOS and Linux
|
||||
await sdk.run("python3 -m venv .env && source .env/bin/activate") # MacOS and Linux
|
||||
```
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
|
|||
<div className="flex px-2" ref={divRef} hidden={!isOpen}>
|
||||
<MainTextInput
|
||||
disabled={props.disabled}
|
||||
placeholder="Ask anything:"
|
||||
placeholder="Type an instruction or question."
|
||||
{...getInputProps({
|
||||
onKeyDown: (event) => {
|
||||
if (event.key === "Enter" && (!isOpen || items.length === 0)) {
|
||||
|
|
|
|||
|
|
@ -194,15 +194,17 @@ function StepContainer(props: StepContainerProps) {
|
|||
<ReactMarkdown
|
||||
key={1}
|
||||
className="overflow-scroll"
|
||||
components={{
|
||||
pre: ({ node, ...props }) => {
|
||||
return (
|
||||
<CodeBlock
|
||||
children={props.children[0] as string}
|
||||
></CodeBlock>
|
||||
);
|
||||
},
|
||||
}}
|
||||
components={
|
||||
{
|
||||
// pre: ({ node, ...props }) => {
|
||||
// return (
|
||||
// <CodeBlock
|
||||
// children={props.children[0] as string}
|
||||
// ></CodeBlock>
|
||||
// );
|
||||
// },
|
||||
}
|
||||
}
|
||||
>
|
||||
{props.historyNode.step.description as any}
|
||||
</ReactMarkdown>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue