Skip to content

CG-10387: Mintlify doc fix #69

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

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,3 @@ codegen-sdk/typings/**
coverage.json
tests/verified_codemods/codemod_data/repo_commits.json

# =====[ Docs ]=====
# These are auto-generated
docs/api-reference/core/*
docs/api-reference/python/*
docs/api-reference/typescript/*
513 changes: 513 additions & 0 deletions docs/api-reference/core/Argument.mdx

Large diffs are not rendered by default.

669 changes: 669 additions & 0 deletions docs/api-reference/core/Assignment.mdx

Large diffs are not rendered by default.

471 changes: 471 additions & 0 deletions docs/api-reference/core/AssignmentStatement.mdx

Large diffs are not rendered by default.

550 changes: 550 additions & 0 deletions docs/api-reference/core/Attribute.mdx

Large diffs are not rendered by default.

442 changes: 442 additions & 0 deletions docs/api-reference/core/AwaitExpression.mdx

Large diffs are not rendered by default.

440 changes: 440 additions & 0 deletions docs/api-reference/core/BinaryExpression.mdx

Large diffs are not rendered by default.

487 changes: 487 additions & 0 deletions docs/api-reference/core/BlockStatement.mdx

Large diffs are not rendered by default.

416 changes: 416 additions & 0 deletions docs/api-reference/core/Boolean.mdx

Large diffs are not rendered by default.

551 changes: 551 additions & 0 deletions docs/api-reference/core/Callable.mdx

Large diffs are not rendered by default.

496 changes: 496 additions & 0 deletions docs/api-reference/core/CatchStatement.mdx

Large diffs are not rendered by default.

429 changes: 429 additions & 0 deletions docs/api-reference/core/ChainedAttribute.mdx

Large diffs are not rendered by default.

972 changes: 972 additions & 0 deletions docs/api-reference/core/Class.mdx

Large diffs are not rendered by default.

589 changes: 589 additions & 0 deletions docs/api-reference/core/CodeBlock.mdx

Large diffs are not rendered by default.

567 changes: 567 additions & 0 deletions docs/api-reference/core/Codebase.mdx

Large diffs are not rendered by default.

451 changes: 451 additions & 0 deletions docs/api-reference/core/Comment.mdx

Large diffs are not rendered by default.

436 changes: 436 additions & 0 deletions docs/api-reference/core/CommentGroup.mdx

Large diffs are not rendered by default.

443 changes: 443 additions & 0 deletions docs/api-reference/core/ComparisonExpression.mdx

Large diffs are not rendered by default.

467 changes: 467 additions & 0 deletions docs/api-reference/core/Decorator.mdx

Large diffs are not rendered by default.

421 changes: 421 additions & 0 deletions docs/api-reference/core/Dict.mdx

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions docs/api-reference/core/Directory.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
---
title: "Directory"
sidebarTitle: "Directory"
icon: ""
description: "Directory representation for codebase.
GraphSitter abstraction of a file directory that can be used to look for files and symbols within a specific directory.
"
---
import {Parameter} from '/snippets/Parameter.mdx';
import {ParameterWrapper} from '/snippets/ParameterWrapper.mdx';
import {Return} from '/snippets/Return.mdx';
import {HorizontalDivider} from '/snippets/HorizontalDivider.mdx';
import {GithubLinkNote} from '/snippets/GithubLinkNote.mdx';
import {Attribute} from '/snippets/Attribute.mdx';

<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L30-L216" />


## Attributes
<HorizontalDivider />
### <span className="text-primary">classes</span>
<HorizontalDivider light={true} />
<Attribute type={ <><span className="text-gray-200">list[</span> <a href="/api-reference/core/Class" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Class</a> <span className="text-gray-200">]</span></> } description="Get a recursive list of all classes in the directory and its subdirectories." />

### <span className="text-primary">dirpath</span>
<HorizontalDivider light={true} />
<Attribute type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">str</code> } description="
" />

### <span className="text-primary">files</span>
<HorizontalDivider light={true} />
<Attribute type={ <><span className="text-gray-200">list[</span> <a href="/api-reference/core/File" style={ {fontWeight: "inherit", fontSize: "inherit"} }>File</a> <span className="text-gray-200">]</span></> } description="Get a recursive list of all files in the directory and its subdirectories." />

### <span className="text-primary">functions</span>
<HorizontalDivider light={true} />
<Attribute type={ <><span className="text-gray-200">list[</span> <a href="/api-reference/core/Function" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Function</a> <span className="text-gray-200">]</span></> } description="Get a recursive list of all functions in the directory and its subdirectories." />

### <span className="text-primary">global_vars</span>
<HorizontalDivider light={true} />
<Attribute type={ <><span className="text-gray-200">list[</span> <a href="/api-reference/core/Assignment" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Assignment</a> <span className="text-gray-200">]</span></> } description="Get a recursive list of all global variables in the directory and its subdirectories." />

### <span className="text-primary">import_statements</span>
<HorizontalDivider light={true} />
<Attribute type={ <><span className="text-gray-200">list[</span> <a href="/api-reference/core/ImportStatement" style={ {fontWeight: "inherit", fontSize: "inherit"} }>ImportStatement</a> <span className="text-gray-200">]</span></> } description="Get a recursive list of all import statements in the directory and its subdirectories." />

### <span className="text-primary">items</span>
<HorizontalDivider light={true} />
<Attribute type={ <><span className="text-gray-200">dict[str,</span> <a href="/api-reference/core/File" style={ {fontWeight: "inherit", fontSize: "inherit"} }>File</a> <span className="text-gray-200">|</span> <a href="/api-reference/core/Directory" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Directory</a> <span className="text-gray-200">]</span></> } description="
" />

### <span className="text-primary">name</span>
<HorizontalDivider light={true} />
<Attribute type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">str</code> } description="Get the base name of the directory's path." />

### <span className="text-primary">parent</span>
<HorizontalDivider light={true} />
<Attribute type={ <><a href="/api-reference/core/Directory" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Directory</a> <span className="text-gray-200">| None</span></> } description="
" />

### <span className="text-primary">path</span>
<HorizontalDivider light={true} />
<Attribute type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">Path</code> } description="
" />

### <span className="text-primary">subdirectories</span>
<HorizontalDivider light={true} />
<Attribute type={ <><span className="text-gray-200">list[</span> <a href="/api-reference/core/Directory" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Directory</a> <span className="text-gray-200">]</span></> } description="Get a recursive list of all subdirectories in the directory and its subdirectories." />

### <span className="text-primary">symbols</span>
<HorizontalDivider light={true} />
<Attribute type={ <><span className="text-gray-200">list[</span> <a href="/api-reference/core/Symbol" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Symbol</a> <span className="text-gray-200">]</span></> } description="Get a recursive list of all symbols in the directory and its subdirectories." />


## Methods
<HorizontalDivider />
### <span className="text-primary">add_file</span>
Add a file to the directory.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L156-L159" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>


### <span className="text-primary">add_subdirectory</span>
Add a subdirectory to the directory.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L179-L182" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>


### <span className="text-primary">get_class</span>
Get a class by name in the directory and its subdirectories.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L148-L150" />


<Return return_type={ <><a href="/api-reference/core/Class" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Class</a> <span className="text-gray-200">| None</span></> } description=""/>


### <span className="text-primary">get_file</span>
Get a file by its name relative to the directory.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L171-L177" />


<Return return_type={ <><a href="/api-reference/core/File" style={ {fontWeight: "inherit", fontSize: "inherit"} }>File</a> <span className="text-gray-200">| None</span></> } description=""/>


### <span className="text-primary">get_function</span>
Get a function by name in the directory and its subdirectories.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L152-L154" />


<Return return_type={ <><a href="/api-reference/core/Function" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Function</a> <span className="text-gray-200">| None</span></> } description=""/>


### <span className="text-primary">get_global_var</span>
Get a global variable by name in the directory and its subdirectories.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L144-L146" />


<Return return_type={ <><a href="/api-reference/core/Assignment" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Assignment</a> <span className="text-gray-200">| None</span></> } description=""/>


### <span className="text-primary">get_import_statement</span>
Get an import statement by name in the directory and its subdirectories.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L140-L142" />


<Return return_type={ <><a href="/api-reference/core/ImportStatement" style={ {fontWeight: "inherit", fontSize: "inherit"} }>ImportStatement</a> <span className="text-gray-200">| None</span></> } description=""/>


### <span className="text-primary">get_subdirectory</span>
Get a subdirectory by its path relative to the directory.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L194-L196" />


<Return return_type={ <><a href="/api-reference/core/Directory" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Directory</a> <span className="text-gray-200">| None</span></> } description=""/>


### <span className="text-primary">get_symbol</span>
Get a symbol by name in the directory and its subdirectories.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L136-L138" />


<Return return_type={ <><a href="/api-reference/core/Symbol" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Symbol</a> <span className="text-gray-200">| None</span></> } description=""/>


### <span className="text-primary">remove_file</span>
Remove a file from the directory.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L161-L164" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>


### <span className="text-primary">remove_file_by_path</span>
Remove a file from the directory by its path.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L166-L169" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>


### <span className="text-primary">remove_subdirectory</span>
Remove a subdirectory from the directory.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L184-L187" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>


### <span className="text-primary">remove_subdirectory_by_path</span>
Remove a subdirectory from the directory by its path.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L189-L192" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>


### <span className="text-primary">rename</span>
Rename the directory.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L212-L216" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>


### <span className="text-primary">update_filepath</span>
Update the filepath of the directory.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/directory.py#L203-L210" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>



Loading
Loading