Skip to content

Commit e5989cd

Browse files
committed
Add direnv, and move from poetry to uv
Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
1 parent 1109a80 commit e5989cd

6 files changed

Lines changed: 2739 additions & 50 deletions

File tree

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source .venv/bin/activate

.github/workflows/release.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,29 @@ jobs:
6666
- name: Build Package
6767
run: poetry build
6868

69-
- name: Build Changelog
69+
- name: Get version from tag
70+
id: tag_name
71+
run: |
72+
echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
73+
shell: bash
74+
75+
- name: Read Changelog Entry
76+
id: changelog_reader
77+
uses: mindsers/changelog-reader-action@v2
78+
with:
79+
validation_level: warn
80+
version: ${{ steps.tag_name.outputs.current_version }}
81+
path: ./CHANGELOG.md
82+
83+
- name: Build changelog
7084
id: gen_changelog
7185
uses: mikepenz/release-changelog-builder-action@v5
7286
with:
7387
failOnError: "true"
7488
configuration: .github/workflows/release_config.json
7589
env:
7690
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77-
91+
7892
- name: Publish Release on GitHub
7993
uses: softprops/action-gh-release@v1
8094
with:

CHANGELOG.md

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Changed
11+
- Updated codeanalyzer jar for call argument expression and fully qualified parameter types in method signatures
12+
13+
## [v1.0.5] - 2025-06-24
14+
15+
### Fixed
16+
- Fixed issue #135
17+
- Analysis level compatibility checking for analysis.json with passed analysis level
18+
19+
### Changed
20+
- Updated treesitter analysis to use global declarations of parser and language
21+
22+
## [v1.0.4] - 2025-06-11
23+
24+
### Added
25+
- Added missing callable fields field validator
26+
27+
### Changed
28+
- Updated test fixture setup to use codeanalyzer jar from cldk/analysis/java/codeanalyzer/jar instead of test resources directory
29+
- Updated analysis.json fixtures (daytrader8 and plantsbywebsphere)
30+
31+
### Removed
32+
- Removed dangling codeanalyzer jars from test resources
33+
- Removed obsolete analysis.json fixture
34+
35+
## [v1.0.3] - 2025-06-01
36+
37+
### Added
38+
- Added code start line attribute to JCallable (corresponding to added attribute in the java code analyzer model)
39+
40+
## [v1.0.2] - 2025-05-24
41+
42+
### Added
43+
- Added test case and fixture for source analysis
44+
- Added missing attributes in compilation unit model
45+
46+
### Fixed
47+
- Fixed handling of `source_code` option in Java codeanalyzer
48+
- Updated core.py to match python analysis signature
49+
50+
## [v1.0.1] - 2025-05-07
51+
52+
### Changed
53+
- Updated treesitter analysis to use global declarations of parser and language
54+
55+
## [v1.0.0] - 2025-04-29
56+
57+
### Added
58+
- First stable release
59+
- Updated contributing guidelines
60+
61+
### Changed
62+
- Updated README.md
63+
- Updated codeanalyzer jar
64+
- Updated java version in release automation
65+
66+
## [v0.5.1] - 2025-03-13
67+
68+
### Changed
69+
- Updated Java model to comply with codeanalyzer v2.3.1
70+
- Updated codeanalyzer jar to the latest from codeanalyzer-java
71+
- Updated get_all_docstrings to return dict
72+
73+
## [v0.5.0] - 2025-02-21
74+
75+
### Added
76+
- Added release automation github actions
77+
- Added Java 11 support in github actions
78+
- Added release_config.json
79+
- Added Comment parsing APIs at file, class, method, and docstring level
80+
- Added support for parsing callable parameters and their location information
81+
- Added Dev container instructions with Python, Java, C, and Rust support
82+
- Added C/C++ analysis support
83+
- Added CRUD operations support for Java JPA applications
84+
85+
### Changed
86+
- Consolidated analysis_level enums in __init__.py
87+
- Updated codeanalyzer jar to the latest version
88+
- Changed coverage minimum to 70%
89+
- Updated documentation with mkdocs
90+
- Updated badges and logos in README
91+
- Added Discord community support
92+
93+
### Removed
94+
- Removed CodeQL dependency and refactored treesitter
95+
- Removed ABCs from analysis
96+
- Removed logic to find LLVM in linux OSes (only appears in Darwin)
97+
- Removed redundant is_entry_point fields from JCallable and JType
98+
- Removed unused parameters and code cleanup
99+
100+
### Fixed
101+
- Fixed various test cases and compatibility issues
102+
- Fixed treesitter superclass identification issues
103+
- Fixed entry point detection code
104+
- Fixed recursive error issues
105+
106+
## [v0.4.0] - 2024-11-13
107+
108+
### Fixed
109+
- Fixed issue 67 - symbol table is none
110+
111+
### Changed
112+
- Updated poetry build rules to include codeanalyzer-*.jar
113+
- Added test case to verify jar file exists
114+
115+
## [v0.3.0] - 2024-11-12
116+
117+
### Added
118+
- Support for reading slim JSON from codeanalyzer v1.1.0
119+
- Added more test tools (pylint, flake8, black, pspec, coverage)
120+
- Added test coverage reporting
121+
122+
### Changed
123+
- Updated README.md to include the arXiv paper
124+
- Removed obsolete test cases for unsupported languages
125+
126+
## [v0.2.0] - 2024-10-11
127+
128+
### Added
129+
- Added GitHub Action to publish manual releases
130+
- Added PyPi badge to README.md
131+
132+
## [v0.1.4] - 2024-10-21
133+
134+
### Fixed
135+
- Fixed codeanalyzer.jar not being a PosixPath
136+
137+
## [v0.1.3] - 2024-10-21
138+
139+
### Fixed
140+
- Fixed calling the correct codeanalyzer jar on version 0.1.3
141+
- Removed auto-download of codeanalyzer jar
142+
143+
## [v0.1.2] - 2024-10-17
144+
145+
### Fixed
146+
- Fixed tree-sitter bug
147+
- Defined self.captures explicitly
148+
149+
## [0.1.0-dev] - 2024-10-07
150+
151+
### Added
152+
- Initial development version
153+
- Set version to über json support
154+
- Support for slim JSONs from codeanalyzer
155+
- IBM Copyright added to all source files
156+
- Added code parsing support
157+
- Added support for symbol table call graph
158+
- Added notebook examples for code summarization and test generation
159+
- Basic CLDK framework implementation
160+
161+
### Changed
162+
- Updated dependencies in pyproject.toml
163+
- Added metadata for PyPi distribution
164+
- Updated README with installation instructions
165+
166+
### Fixed
167+
- Fixed caller method implementation
168+
- Fixed incremental analysis support
169+
- Fixed download jar issues
170+
171+
---
172+
173+
## Release Links
174+
175+
- [v1.0.5]: https://github.com/codellm-devkit/python-sdk/releases/tag/v1.0.5
176+
- [v1.0.4]: https://github.com/codellm-devkit/python-sdk/releases/tag/v1.0.4
177+
- [v1.0.3]: https://github.com/codellm-devkit/python-sdk/releases/tag/v1.0.3
178+
- [v1.0.2]: https://github.com/codellm-devkit/python-sdk/releases/tag/v1.0.2
179+
- [v1.0.1]: https://github.com/codellm-devkit/python-sdk/releases/tag/v1.0.1
180+
- [v1.0.0]: https://github.com/codellm-devkit/python-sdk/releases/tag/v1.0.0
181+
- [v0.5.1]: https://github.com/codellm-devkit/python-sdk/releases/tag/v0.5.1
182+
- [v0.5.0]: https://github.com/codellm-devkit/python-sdk/releases/tag/v0.5.0
183+
- [v0.4.0]: https://github.com/codellm-devkit/python-sdk/releases/tag/v0.4.0
184+
- [v0.3.0]: https://github.com/codellm-devkit/python-sdk/releases/tag/v0.3.0
185+
- [v0.2.0]: https://github.com/codellm-devkit/python-sdk/releases/tag/v0.2.0
186+
- [v0.1.4]: https://github.com/codellm-devkit/python-sdk/releases/tag/v0.1.4
187+
- [v0.1.3]: https://github.com/codellm-devkit/python-sdk/releases/tag/v0.1.3
188+
- [v0.1.2]: https://github.com/codellm-devkit/python-sdk/releases/tag/v0.1.2
189+
- [0.1.0-dev]: https://github.com/codellm-devkit/python-sdk/releases/tag/0.1.0-dev

poetry.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

pyproject.toml

Lines changed: 63 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
[tool.poetry]
1+
[project]
22
name = "cldk"
3-
version = "1.0.5"
3+
version = "1.1.0"
44
description = "The official Python SDK for Codellm-Devkit."
5-
authors = ["Rahul Krishna <i.m.ralk@gmail.com>", "Rangeet Pan <rangeet.pan@ibm.com>", "Saurabh Sinhas <sinhas@us.ibm.com>",
6-
"Raju Pavuluri <pavuluri@us.ibm.com>"]
7-
license = "Apache 2.0"
5+
authors = [
6+
{name = "Rahul Krishna", email = "i.m.ralk@gmail.com"},
7+
{name = "Rangeet Pan", email = "rangeet.pan@ibm.com"},
8+
{name = "Saurabh Sinhas", email = "sinhas@us.ibm.com"},
9+
{name = "Raju Pavuluri", email = "pavuluri@us.ibm.com"},
10+
]
11+
license = {text = "Apache-2.0"}
812
readme = "README.md"
9-
homepage = "https://codellm-devkit.info"
10-
repository = "https://github.com/codellm-devkit/python-sdk"
1113
keywords = ["ibm", "llm", "large language models", "code analyzer", "syntax tree"]
1214
classifiers = [
1315
"Development Status :: 4 - Beta",
@@ -22,52 +24,54 @@ classifiers = [
2224
"Topic :: Software Development :: Libraries :: Python Modules",
2325
"Topic :: Software Development :: Libraries :: Application Frameworks"
2426
]
25-
include = [
26-
"LICENSE",
27-
"cldk/analysis/java/codeanalyzer/jar/*.jar"
27+
requires-python = ">=3.11"
28+
dependencies = [
29+
"pydantic>=2.10.6,<3.0.0",
30+
"pandas>=2.2.3,<3.0.0",
31+
"networkx>=3.4.2,<4.0.0",
32+
"pyarrow==20.0.0",
33+
"tree-sitter==0.24.0",
34+
"rich==14.0.0",
35+
"wget==3.2",
36+
"requests>=2.32.3,<3.0.0",
37+
"tree-sitter-java==0.23.5",
38+
"tree-sitter-c==0.23.5",
39+
"tree-sitter-go==0.23.4",
40+
"tree-sitter-python==0.23.6",
41+
"tree-sitter-javascript==0.23.1",
42+
"clang==17.0.6",
43+
"libclang==17.0.6",
44+
"codeanalyzer-python>=0.1.12",
45+
]
46+
47+
[project.urls]
48+
Homepage = "https://codellm-devkit.info"
49+
Repository = "https://github.com/codellm-devkit/python-sdk"
50+
51+
[project.optional-dependencies]
52+
dev = [
53+
"ipdb>=0.13.13,<1.0.0",
54+
"ipython>=8.32.0,<9.0.0",
55+
]
56+
test = [
57+
"toml>=0.10.2,<1.0.0",
58+
"pytest==8.3.5",
59+
"pytest-pspec>=0.0.4,<1.0.0",
60+
"pytest-cov>=6.0.0,<7.0.0",
61+
"pylint>=3.3.4,<4.0.0",
62+
"flake8>=7.1.1,<8.0.0",
63+
"black>=25.1.0,<26.0.0",
64+
"coverage>=7.6.10,<8.0.0",
65+
"jupyter>=1.1.1,<2.0.0",
2866
]
2967

3068

3169
[tool.backend-versions]
3270
codeanalyzer-java = "2.3.3"
3371

34-
[tool.poetry.dependencies]
35-
python = ">=3.11"
36-
pydantic = "^2.10.6"
37-
pandas = "^2.2.3"
38-
networkx = "^3.4.2"
39-
pyarrow = "20.0.0"
40-
tree-sitter = "0.24.0"
41-
rich = "14.0.0"
42-
wget = "3.2"
43-
requests = "^2.32.3"
44-
tree-sitter-java = "0.23.5"
45-
tree-sitter-c = "0.23.5"
46-
tree-sitter-go = "0.23.4"
47-
tree-sitter-python = "0.23.6"
48-
tree-sitter-javascript = "0.23.1"
49-
clang = "17.0.6"
50-
libclang = "17.0.6"
51-
52-
[tool.poetry.group.dev.dependencies]
53-
ipdb = "^0.13.13"
54-
ipython = "^8.32.0"
55-
56-
[tool.poetry.group.test.dependencies]
57-
# Test dependencies
58-
toml = "^0.10.2"
59-
pytest = "8.3.5"
60-
pytest-pspec = "^0.0.4"
61-
pytest-cov = "^6.0.0"
62-
pylint = "^3.3.4"
63-
flake8 = "^7.1.1"
64-
black = "^25.1.0"
65-
coverage = "^7.6.10"
66-
jupyter = "^1.1.1"
67-
6872
[build-system]
69-
requires = ["poetry-core"]
70-
build-backend = "poetry.core.masonry.api"
73+
requires = ["hatchling"]
74+
build-backend = "hatchling.build"
7175

7276
########################################
7377
# Tool configurations
@@ -121,3 +125,16 @@ sample-c-application = "tests/resources/c/application/"
121125
sample-application = "tests/resources/java/application/"
122126
sample-application-analysis-json = "tests/resources/java/analysis_json/"
123127
codeanalyzer-jar-path = "cldk/analysis/java/codeanalyzer/jar/"
128+
129+
[tool.hatch.build.targets.wheel]
130+
packages = ["cldk"]
131+
include = [
132+
"LICENSE",
133+
"cldk/analysis/java/codeanalyzer/jar/*.jar"
134+
]
135+
136+
[tool.hatch.build.targets.sdist]
137+
include = [
138+
"LICENSE",
139+
"cldk/analysis/java/codeanalyzer/jar/*.jar"
140+
]

0 commit comments

Comments
 (0)