The world changed when I opened a big Python project (Django) on Sourcetrail (Linux)

It seems that a tool called Sourcetrail has been released, and it seems to be interesting, so I touched it. There was a article you have already touched, but it's cute. Ubuntu.

I've used it, and the big repository that came to my mind was Django, so I'll try it with a combination of Python and Django.

Install SourceTtrail

You can download it from Sourcetrail (GitHub) Release Page. Download the 64-bit Linux tar file

Then unpack it to any location with tar -xzf Sourcetrail_2019_4_61_Linux_64bit.tar.gz -C path /. The version name is appropriate.

Enter the Sourcetrail directory you answered and run ʻinstall.sh` with root privileges to complete the installation.

Open for the time being

A screen like this will appear.

Screenshot from 2019-11-22 19-28-58.png

Open Django as a project

When you do a New Project, the following screen will appear, so select it normally.

Screenshot from 2019-11-22 19-32-16.png

Select Source Group Types

Screenshot from 2019-11-22 19-36-01.png

There is only one Python, so choose this one. Note that Python support seems to be beta phase.

Environmental setting

Screenshot from 2019-11-22 19-37-32.png

Default Python varies from person to person, so specify as appropriate.

In Files & Directories to index (files and directories to index), specifydjango / django /or the directory you want to check the contents of.

After checking the next screen, let's create it.

indexing

Screenshot from 2019-11-22 20-00-36.png

When a screen like this appears, it's the next step. It seems that they are indexing well.

There are also 830 Files, so it will take some time. (It took about 40 minutes in my environment) It seems that one of the purposes is to reduce the trouble of code reading in large-scale development, so I would like to see if it can be used properly with a repository as large as Django.

Screenshot from 2019-11-22 20-39-31.png

When this screen appears, it's done! I haven't seen the details of the 65 errors ...

Try using it!

Screenshot from 2019-11-22 20-41-22.png

It will appear in the list like this.

Open the appropriate Class (HttpResponse) and the relationships will be displayed in a list. The corresponding code is on the right.

Screenshot from 2019-11-22 21-00-04.png

In this state, if you open an appropriate Function (serialize displayed in HttpResponse),

Screenshot from 2019-11-22 21-07-03.png

It opens like this. On the right side, it seems that the definition part and the call part are displayed. (Def is at the top)

Try to touch

This speeds up code reading. Currently, the only supported languages are C, C ++, Java, and Python, but if you are using this language, you should try it once.

Recommended Posts

The world changed when I opened a big Python project (Django) on Sourcetrail (Linux)
What I did when I stumbled on a Django tutorial
About the --enable-shared option when building Python on Linux
I just changed the sample source of Python a little.
A solution when you can't start project Django on Windows
A note I was addicted to when making a beep on Linux
About the error I encountered when trying to use Adafruit_DHT from Python on a Raspberry Pi
What I stumbled upon when using CodeIgniter on a Linux server
[Python] I made a bot that tells me the current temperature when I enter a place name on LINE
I measured the run queue wait time of a process on Linux
[Python, ObsPy] I drew a beach ball on the map with Cartopy + ObsPy.
I have a question! (Python, django) Easy
The Python project template I think of.
[Python] A progress bar on the terminal
I stumbled on the character code when converting CSV to JSON in Python
Create a Django project and application in a Python virtual environment and start the server
I want to be notified when the command operation is completed on linux!
When I tried to create a project using Python on Docker with PyCharm, it didn't work, but it worked with Docker Compose.
Create a Python execution environment on IBM i
I did a little research on the class
A story that was convenient when I tried using the python ip address module
[Example of Python improvement] I learned the basics of Python on a free site in 2 weeks.
The story when I was using IntelliJ on Linux and could not input Japanese
Deploy a Python 3.6 / Django / Postgres web app on Azure
[Grasshopper] When creating a data tree on Python script
Specify the volume on linux and make a sound
[CRUD] [Django] Create a CRUD site using the Python framework Django ~ 1 ~
Create a QR code for the URL on Linux
I tried python on heroku for the first time
Deploy a Django application on Google App Engine (Python3)
I got a UnicodeDecodeError when pip install on ubuntu
Make a breakpoint on the c layer with python
I made a Python3 environment on Ubuntu with direnv.
How to build a Django (python) environment on docker
SoC FPGA: A small story when using on Linux
Make the model a string on a Django HTML template
Write a log-scale histogram on the x-axis in python
[CRUD] [Django] Create a CRUD site using the Python framework Django ~ 2 ~
A memo that I touched the Datastore with python
Tasks at the start of a new python project
A memo when Django was released on VPS (preparation)
Install django on python + anaconda and start the server
How to build a Python environment on amazon linux 2
I tried installing the Linux kernel on virtualbox + vagrant
[CRUD] [Django] Create a CRUD site using the Python framework Django ~ 3 ~
[CRUD] [Django] Create a CRUD site using the Python framework Django ~ 4 ~
[CRUD] [Django] Create a CRUD site using the Python framework Django ~ 5 ~
A super introduction to Django by Python beginners! Part 6 I tried to implement the login function
Get the matched string with a regular expression and reuse it when replacing on Python3
What I thought after working on the "No comment at all" project for a year
[Shell startup] I tried to display the shell on the TV with a cheap Linux board G-cluster