• Stars
    star
    402
  • Rank 107,380 (Top 3 %)
  • Language
    Python
  • Created over 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CodeReview is a Git GUI tool to perform code review (Diff Viewer) written in Python3 and Qt5.

CodeReview

CodeReview license CodeReview python version

CodeReview last version

CodeReview Home Page is located at http://fabricesalvaire.github.io/CodeReview

https://raw.github.com/FabriceSalvaire/CodeReview/master/doc/sphinx/source/images/code-review-log.png

https://raw.github.com/FabriceSalvaire/CodeReview/master/doc/sphinx/source/images/code-review-diff.png

Credits

Authors: Fabrice Salvaire

News

V1.1 2022-25-10

  • Updated install process

V1 2017-12-20

  • Redesigned INotify support

Introduction

I code using the venerable Emacs editor and the extension Magit which is a powerfull text-based user interface to Git. Despite, I am happy with Magit for most tasks, I dislike the diff view rendering in Emacs.

Thus the goal of CodeReview is to provide a more convenient tool for code review tasks on local Git repositories. Unlike software like Gerrit, CodeReview is not designed to do team-level code review, but to check the stage before a commit and show the difference between two versions. In particular, CodeReview fills the gap with IDEs that don't provide a nice side-by-side diff view.

Historically, I wrote this tool as a replacement of qbzr for Git.

How to use CodeReview ?

CodeReview provides two applications pyqgit and diff-viewer.

Disclaimer

This tool was written 10 years ago (late 2011) and I am using it for my own needs, thus it works as is.

I tried to implement a file watching feature but it is a nightmare to debug.

The Qt code is now a bit out dated, but the actual diff viewer implementation would require some works to be ported to QML.

Features

The main features of CodeReview are:

  • display and browse the log and paches of a Git repository
  • diff side by side using Patience algorithm
  • watch for file system changes

Diff viewer features:

  • stage/unstage file
  • number of context lines
  • font size
  • line number mode
  • align mode
  • complete mode
  • highlight mode

Installation

CodeReview is written in Python and uses the GUI framework PyQt5 and the Git library pygit2. Thus, CodeReview is operating system agnostic and should work on Linux, Windows and OSX.

To install CodeReview from source code, you need a working Python environment and a C compiler.

On Linux

To summarise, you can easily install CodeReview on Linux with just pip install CodeReview but read the followings.

First you need to verify that Python is installed on your distribution.

If you install CodeReview from source, you will also need the GCC C compiler.

You can create a Python virtual environment to install CodeReview in its own container:

# create the venv
python3.10 -m venv $HOME/codereview
# enter in the venv
source $HOME/codereview/bin/activate

This is not mandatory, but it is a good practice if you don't know exactly what you are doing. Especially, if you don't want to spoil your distribution.

Notice, you can later create a shell script to wrap the venv activation and the pyqgit command.

Then install CodeReview either from PyPI (official Python package repository) or from source:

# source .tar.gz or wheel/binary from PyPI (can require a GCC C compiler)
pip install CodeReview

# from Git repository (require a GCC C compiler)
pip install git+https://github.com/FabriceSalvaire/CodeReview

If the pip command is not available, you must install the corresponding package of your distribution.

Finally, run CodeReview to verify that the installation was successful:

pyqgit --help
diff-viewer --help

pyqgit git_repository_path
diff-viewer a.txt b.txt

cd git_repository_path
pyqgit

Example of shell wrapper:

#! /usr/bin/bash
PY_ENV=${HOME}/codereview
source ${PY_ENV}/bin/activate
CodeReviewLogLevel='WARNING' ${PY_ENV}/bin/pyqgit $1 &

You can also clone the repository and install it using theses commands:

git clone [email protected]:FabriceSalvaire/CodeReview.git
python setup.py build
python setup.py install

On Windows

Actually there is no installer available, but it is welcome.

You must follow the same procedure that for Linux. However it is a bit more difficult to achieve.

A suggestion is to install the Anaconda Python Distribution and got a working compiler.

On OSX

An up to date installation procedure is welcome.

Dependencies

CodeReview requires the dependencies listed in requirements.txt

How to help

  • test it on Windows and OSX
  • fix bugs: look at issues
  • sometime pyqgit is slow: profile code to find issues

More Repositories

1

qt5-vector-graphic-shaders

A Qt5 application to experiment vector graphic shaders
QML
38
star
2

redmine-improved-theme

Redmine theme forked from the vanilla Redmine theme and converted to SASS
CSS
29
star
3

Patro

A Python library to make patterns for fashion design
Python
29
star
4

PyDVI

PyDvi is a Python library to read and process DVI (DeVice Independent) files, the native output of LaTeX. The library provides a DVI machine as a base class which can be extended by the user and plugged to a TeX daemon in order to render contents on-the-fly. Also the source code provides a DVI viewer featuring an hardware accelerated rendering on GPU.
Python
14
star
5

PyOpenGLng

An OpenGL CFFI (and ctypes) binding for Python
Python
9
star
6

book-browser

An application to digitise and read books (Python3 Qt5 QML)
Python
6
star
7

pythonic-gcode-machine

A Python G-code Toolkit ( NIST RS-274 / Gcode / ISO )
Python
5
star
8

LaptopControlPanel

LaptopControlPanel is a Python module that provides a Graphical Control Panel for Lenovo Thinkpad Laptop and a console tool to monitor and manage the battery.
Python
4
star
9

Pyterate

Pyterate is Sphinx add-ons to generate documentation for Python projects
Python
4
star
10

cmsplugin-svg

SVG Plugin for Django CMS
Python
3
star
11

mupdf-cmake

CMake build for MuPDF
C
3
star
12

sphinx-css3image

This plugin provides an enhanced image directive with additional CSS properties for Sphinx Documentation Generator.
Python
3
star
13

sphinx-microdata

Microdata semantic markups support for Sphinx Documentation Generator.
Python
3
star
14

LaserWeb-Tools

Tools for LaserWeb
Python
3
star
15

copr-mao

Some MAO Fedora packages
Shell
3
star
16

libfprint-baspi

libfprint v0.5.0 with a wrapper driver that uses the proprietary libbsapi from Authentec.
C
2
star
17

pyglfw-cffi

A Python wrapper for GLFW based on CFFI
Python
2
star
18

squirrel

An experimental PDF document manager.
Python
2
star
19

sphinx-getthecode

This plugin provides an enhanced literalinclude directive for the Sphinx Documentation Generator.
Python
2
star
20

Musica

Musica is a Python toolkit for computational music.
Python
1
star
21

french-keyboard-map

A custom French Keyboard Layout for Developer
C
1
star
22

Patro-data

Data files for Patro examples
1
star
23

mamba-image

Fork of MAMBA mathematical morphology library http://www.mamba-image.org
Python
1
star
24

pyparis-2017

PyParis 2017 Talk — Circuit Simulation using Python
TeX
1
star
25

filewalker

A Python library to scan a file system, find duplicated file etc.
Python
1
star
26

linear-delta-robot

Linear Delta Robot Cinematic Study
Python
1
star
27

python-interval-arithmetic

A Python Interval Arithmetic Module
Python
1
star