Skip to content

Commit a4f3a53

Browse files
committed
Update readme, remove unused dependencies.
Signed-off-by: Rahul Krishna <[email protected]>
1 parent 4a33258 commit a4f3a53

File tree

3 files changed

+68
-1116
lines changed

3 files changed

+68
-1116
lines changed

README.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ A comprehensive static analysis tool for Python source code that provides symbol
66

77
## Installation
88

9-
This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
9+
```bash
10+
pip install codeanalyzer-python
11+
```
1012

1113
### Prerequisites
1214

13-
- [uv](https://docs.astral.sh/uv/getting-started/installation/) installed
14-
- Python 3.12 or higher. You can use `uv` to install Python if it's not already installed:
15-
```bash
16-
uv python install 3.12
17-
```
15+
- Python 3.12 or higher
1816

1917
#### System Package Requirements
2018

@@ -56,36 +54,22 @@ pyenv global 3.12.0 # or pyenv local 3.12.0 for project-specific
5654

5755
> **Note:** These packages are required as the tool uses Python's built-in `venv` module to create isolated environments for analysis.
5856
59-
### Setup
60-
61-
1. Clone the repository:
62-
```bash
63-
git clone https://github.com/codellm-devkit/codeanalyzer-python
64-
cd codeanalyzer-python
65-
```
66-
67-
2. Install dependencies using uv:
68-
```bash
69-
uv sync --all-groups
70-
```
71-
This will install all dependencies including development and test dependencies.
72-
7357
## Usage
7458

7559
The codeanalyzer provides a command-line interface for performing static analysis on Python projects.
7660

7761
### Basic Usage
7862

7963
```bash
80-
uv run codeanalyzer --input /path/to/python/project
64+
codeanalyzer --input /path/to/python/project
8165
```
8266

8367
### Command Line Options
8468

85-
To view the available options and commands, run `uv run codeanalyzer --help`. You should see output similar to the following:
69+
To view the available options and commands, run `codeanalyzer --help`. You should see output similar to the following:
8670

8771
```bash
88-
uv run codeanalyzer --help
72+
❯ codeanalyzer --help
8973

9074
Usage: codeanalyzer [OPTIONS] COMMAND [ARGS]...
9175

@@ -109,46 +93,46 @@ To view the available options and commands, run `uv run codeanalyzer --help`. Yo
10993

11094
1. **Basic analysis with symbol table:**
11195
```bash
112-
uv run codeanalyzer --input ./my-python-project
96+
codeanalyzer --input ./my-python-project
11397
```
11498

11599
This will print the symbol table to stdout in JSON format to the standard output. If you want to save the output, you can use the `--output` option.
116100

117101
```bash
118-
uv run codeanalyzer --input ./my-python-project --output /path/to/analysis-results
102+
codeanalyzer --input ./my-python-project --output /path/to/analysis-results
119103
```
120104

121105
Now, you can find the analysis results in `analysis.json` in the specified directory.
122106

123107
2. **Toggle analysis levels with `--analysis-level`:**
124108
```bash
125-
uv run codeanalyzer --input ./my-python-project --analysis-level 1 # Symbol table only
109+
codeanalyzer --input ./my-python-project --analysis-level 1 # Symbol table only
126110
```
127111
Call graph analysis can be enabled by setting the level to `2`:
128112
```bash
129-
uv run codeanalyzer --input ./my-python-project --analysis-level 2 # Symbol table + Call graph
113+
codeanalyzer --input ./my-python-project --analysis-level 2 # Symbol table + Call graph
130114
```
131115
***Note: The `--analysis-level=2` is not yet implemented in this version.***
132116

133117
3. **Analysis with CodeQL enabled:**
134118
```bash
135-
uv run codeanalyzer --input ./my-python-project --codeql
119+
codeanalyzer --input ./my-python-project --codeql
136120
```
137121
This will perform CodeQL-based analysis in addition to the standard symbol table generation.
138122

139123
***Note: Not yet fully implemented. Please refrain from using this option until further notice.***
140124

141125
4. **Eager analysis with custom cache directory:**
142126
```bash
143-
uv run codeanalyzer --input ./my-python-project --eager --cache-dir /path/to/custom-cache
127+
codeanalyzer --input ./my-python-project --eager --cache-dir /path/to/custom-cache
144128
```
145129
This will rebuild the analysis cache at every run and store it in `/path/to/custom-cache/.codeanalyzer`. The cache will be cleared by default after analysis unless you specify `--keep-cache`.
146130

147131
If you provide --cache-dir, the cache will be stored in that directory. If not specified, it defaults to `.codeanalyzer` in the current working directory (`$PWD`).
148132

149133
5. **Quiet mode (minimal output):**
150134
```bash
151-
uv run codeanalyzer --input /path/to/my-python-project --quiet
135+
codeanalyzer --input /path/to/my-python-project --quiet
152136
```
153137

154138
### Output
@@ -157,6 +141,32 @@ By default, analysis results are printed to stdout in JSON format. When using th
157141

158142
## Development
159143

144+
This project uses [uv](https://docs.astral.sh/uv/) for dependency management during development.
145+
146+
### Development Setup
147+
148+
1. Install [uv](https://docs.astral.sh/uv/getting-started/installation/)
149+
150+
2. Clone the repository:
151+
```bash
152+
git clone https://github.com/codellm-devkit/codeanalyzer-python
153+
cd codeanalyzer-python
154+
```
155+
156+
3. Install dependencies using uv:
157+
```bash
158+
uv sync --all-groups
159+
```
160+
This will install all dependencies including development and test dependencies.
161+
162+
### Running from Source
163+
164+
When developing, you can run the tool directly from source:
165+
166+
```bash
167+
uv run codeanalyzer --input /path/to/python/project
168+
```
169+
160170
### Running Tests
161171

162172
```bash

pyproject.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "codeanalyzer-python"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
description = "Static Analysis on Python source code using Jedi, CodeQL and Treesitter."
55
readme = "README.md"
66
authors = [
@@ -9,18 +9,15 @@ authors = [
99
requires-python = ">=3.12"
1010

1111
dependencies = [
12-
"asteroid>=0.7.0",
1312
"astor>=0.8.1",
1413
"jedi>=0.19.2",
1514
"loguru>=0.7.3",
1615
"networkx>=3.5",
17-
"pandas>=2.3.0",
16+
"pandas>=2.3.1",
1817
"pydantic>=2.11.7",
1918
"requests>=2.32.4",
2019
"rich>=14.0.0",
21-
"ruff>=0.12.2",
22-
"toml>=0.10.2",
23-
"typer>=0.16.0",
20+
"typer>=0.16.0",
2421
]
2522

2623
[dependency-groups]

0 commit comments

Comments
 (0)