Skip to content

Commit 61ca129

Browse files
authored
Merge pull request #14 from codefuse-ai/cyz_dev
Update VS Code local tutorial launching note & fix Java tutorial code…
2 parents c0b270d + c773bfe commit 61ca129

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "ghcr.io/lonrun/codefuse-query-tutorial:0.5",
2+
"image": "ghcr.io/lonrun/codefuse-query-tutorial:0.6",
33
"hostRequirements": {
44
"cpus": 4
55
},

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ CodeFuse-Query为CodeFuse代码大模型提供了以下数据清洗能力:
121121
- `language`:各语言的数据化核心(extractor)和数据建模(lib)。关于开放度的问题,请参见《关于开源范围的一些说明》章节
122122
- `doc`:参考文档
123123
- `examples`:Gödel 查询语言示例
124+
- `tutorial`:CodeFuse-Query 开发容器使用教程
124125

125126
## 关于开源范围的一些说明
126127
截止目前,从源码**不能**构建出可执行的程序,原因在于本次开源并没有开放所有的模块,缺少的模块会在之后的一年陆续开源。尽管如此,为保障完整的体验,我们开放了**完整的安装包**下载,请见Release页面。

tutorial/README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
## CodeFuse-Query使用教程
22

3-
### 使用Github Codespaces 来体验CodeFuse-Query分析能力
4-
我们编写了Jupyter Notebook形式的教程,你可以在 CodeFuse-Query 预置好的 Github Codespace 中打开,在阅读的同时执行代码,观察执行结果,也可以修改代码观察反馈,亲手体验 CodeFuse-Query 强大的自定义分析能力。
3+
我们编写了Jupyter Notebook形式的教程,你可以使用项目配置的开发容器(devcontainer) 来体验 CodeFuse-Query,在阅读的同时执行代码,观察执行结果,也可以修改代码观察反馈,亲手体验 CodeFuse-Query 强大的自定义分析能力。
4+
5+
关于教程所运行的开发容器,你可以使用 GitHub Codespaces 功能进行远程加载体验,无需额外配置开发环境,通过浏览器访问,享受远程访问的便利性;也可以使用 VS Code在本地使用开发容器(dev container)功能体验 CodeFuse-Query 的使用教程(需要本地预装 VS Code和 Docker)。
56

67
#### 扩展阅读
78
- [Github Codespaces](https://github.com/features/codespaces)
89
- [Jupyter Notebook](https://jupyter.org/)
10+
- [VS Code devcontainer](https://code.visualstudio.com/docs/devcontainers/containers)
11+
12+
### 1. 使用 Github Codespaces 来体验CodeFuse-Query分析能力
913

1014
#### 体验步骤
1115
1. 创建 Codespaces。依次点击项目首页的 Code -> Codespaces,在当前分支创建一个 Codespaces。
@@ -14,7 +18,15 @@
1418
4. 在右上角的 "选择内核" 弹出框中,依次选择 "Jupyter Kernel..." -> "Godel Kernel"。
1519
5. 开始体验。
1620

17-
### Jupyter kernel for CodeFuse-Query 介绍
21+
### 2. 使用 VS Code 本地开发容器来体验CodeFuse-Query分析能力
22+
23+
#### 体验步骤
24+
1. 克隆代码到本地,然后使用VS Code 打开项目
25+
2. VS Code 会自动检测到 devcontainer 配置文件( .devcontainer/devcontainer.json)。它将会提示你是否要重新打开仓库以应用 devcontainer 配置。点击「重新打开」按钮即可。
26+
3. 加载完成后,切换至项目 tutorial/notebook 目录下
27+
4. 选择示例下的 Jupyter Notebook 分析教程,即可开始体验
28+
29+
## Jupyter kernel for CodeFuse-Query 介绍
1830
Jupyter kernel for CodeFuse-Query(以下称 Godel Kernel) 是 Jupyter 的一个特定内核,它为 Jupyter 环境提供了与 CodeFuse-Query 相关的交互式功能。该内核提供以下能力:
1931
- 支持在 Jupyter Notebook 中编写和执行 Godel 脚本。
2032
- 支持 `%%python` 命令编写并执行 Python 代码,以便对查询到的数据进行更深入的数据可视化和数据后处理操作。

tutorial/notebook/java_analysis.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
" m in Callable(db()),\n",
6767
" c in Class(db())\n",
6868
"where\n",
69-
" c.id = m.getBelongedClass().id\n",
69+
" c.key_eq(m.getBelongedClass())\n",
7070
"select\n",
7171
" c.getQualifiedName() as className,\n",
7272
" m.getName() as methodName,\n",

0 commit comments

Comments
 (0)