-
Notifications
You must be signed in to change notification settings - Fork 5k
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
代码可视化 - 使用图技术为 Python 项目绘制结构图 #8071
代码可视化 - 使用图技术为 Python 项目绘制结构图 #8071
Conversation
…isualize-your-code.md 翻译1
…isualize-your-code.md 翻译2
…isualize-your-code.md 翻译3
…isualize-your-code.md 翻译完成
…isualize-your-code.md 修改校对1
…isualize-your-code.md 校对完毕
…isualize-your-code.md 修改2
…isualize-your-code.md 修改22
校对认领 @lsvih |
@chzh9311 欢迎校对! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> * 校对者: | ||
|
||
# Building a Map of Your Python Project Using Graph Technology — Visualize Your Code | ||
# 代码可视化 -使用图技术为 Python 项目绘制结构图 | ||
|
||
![Image by author](https://cdn-images-1.medium.com/max/4294/1*T9vp27fzwWkKNw681HIGAA.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
翻译一下吧~
|
||
![Image by author](https://cdn-images-1.medium.com/max/4294/1*T9vp27fzwWkKNw681HIGAA.png) | ||
|
||
As a mathematician and working data scientist, I am fascinated by programming languages, machine learning, data, and of course, mathematics. | ||
作为一名致力于数据科学的数学家,我对编程语言、机器学习、数据和数学都很感兴趣。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 working data scientist 应该是和 mathematician 并列的成分吧...
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
|
||
He needed and discovered what is now known as a mathematical graph (or just **graph** for short). | ||
为了解决这个问题,他发现了一种被称作数学图的工具(或者简称为**图**) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里就可以说是创立?了叭,发现就不太妥当了,毕竟图论就是他整出来的啊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我翻译为 发明 您看怎么样
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> * 校对者: | ||
|
||
# Building a Map of Your Python Project Using Graph Technology — Visualize Your Code | ||
# 代码可视化 -使用图技术为 Python 项目绘制结构图 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
破折号前后要加空格
另外,中文破折号是两格长,即 ——
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
|
||
**Okay… Why is this important?** | ||
**好的...这一点为什么那么重要呢?** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得这里还行…… 要和后面的 “因为” 接上的话也不太好改叭……
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
...cle/2021/building-a-map-of-your-python-project-using-graph-technology-visualize-your-code.md
Outdated
Show resolved
Hide resolved
|
||
I will leave it as an exercise to the reader to build this Python mapping him/her-self because I am not allowed to open source the code for this project. However, I will give you some hints as to how to build this yourself. | ||
我将把构建这个 Python 映射的任务留给读者作为练习,因为不打算开放这个项目的源代码。但是,我将给一些帮助您构建的提示。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
【因为不打算开放这个项目的源代码。】
=>
【因为我不方便开放这个项目的源代码。】
原文说不允许,改成这个要合适一些吧,要不然显得作者是个小心眼儿一样 XD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哈哈哈哈哈哈好的~
|
||
We need to keep track of imports and calls to other files along with building a file crawler because you don't know how deep the repository is. Every object that we store has a source file where it was created and we need to store that as a property of the node because if two objects are called the same in two different files we need to be careful not to merge them into the same object when we create the graph. | ||
我们需要在构建文件爬取器的时候跟踪对其他文件的引入和调用,因为我们不知道这个项目有多深。我们存储的每个对象都有一个对应的创建它的源文件,并且我们需要将对应的源文件存储为对象的一个属性,因为如果两个对象在两个不同的文件中以相同名字被调用的时候,我们不应该在结构图中将这两个对象合并到一起。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
【我们需要在构建文件爬取器的时候跟踪对其他文件的引入和调用】
=>
【我们需要在逐行解析文件的时候跟踪对其他文件的引入和调用】
crawler 应该是指前面说的一行一行解析代码的动作吧,而且突然出现有点突兀可能不好理解~
…isualize-your-code.md 按照校对意见修改
@PassionPenguin @chzh9311 感谢两位老师校对~ 辛苦啦~ |
LGTM |
@Ashira97 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。 掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件。 |
收到 |
译文翻译完成,请各位大佬校对~ resolve #7995