Rename the project to Eris.
This commit is contained in:
parent
a060c7f3ae
commit
8e5cc0eac9
34 changed files with 109 additions and 112 deletions
16
README.md
16
README.md
|
|
@ -1,15 +1,15 @@
|
||||||
# Vigil Code Monitor
|
# Eris Code Monitor
|
||||||
|
|
||||||
### Summary
|
### Summary
|
||||||
|
|
||||||
Vigil maintains an up-to-date set of reports for every file in a codebase.
|
Eris maintains an up-to-date set of reports for every file in a codebase.
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
(Tested in Ubuntu 18.04)
|
(Tested in Ubuntu 18.04)
|
||||||
|
|
||||||
# git clone https://github.com/ahamilton/vigil
|
# git clone https://github.com/ahamilton/eris
|
||||||
# cd vigil
|
# cd eris
|
||||||
# ./install-dependencies
|
# ./install-dependencies
|
||||||
# python3.7 -m pip install .
|
# python3.7 -m pip install .
|
||||||
|
|
||||||
|
|
@ -19,14 +19,14 @@ To test its working properly:
|
||||||
|
|
||||||
then to run:
|
then to run:
|
||||||
|
|
||||||
# vigil <directory_path>
|
# eris <directory_path>
|
||||||
|
|
||||||
### Tools
|
### Tools
|
||||||
|
|
||||||
Extensions(93) | Tools(62)
|
Extensions(94) | Tools(61)
|
||||||
----------:| -----
|
----------:| -----
|
||||||
.* | [contents](http://pygments.org/) • metadata • [git_blame](https://git-scm.com/docs/git-blame) • [git_log](https://git-scm.com/docs/git-log)
|
.* | [contents](http://pygments.org/) • metadata • [git_blame](https://git-scm.com/docs/git-blame) • [git_log](https://git-scm.com/docs/git-log)
|
||||||
.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://www.mypy-lang.org/) • [python_coverage](http://nedbatchelder.com/code/coverage/) • [pycodestyle](https://pypi.python.org/pypi/pycodestyle) • [pydocstyle](http://pydocstyle.readthedocs.org/) • [pyflakes](https://launchpad.net/pyflakes) • [pylint](http://www.pylint.org/) • [python_gut](https://github.com/ahamilton/vigil/blob/master/gut.py) • [python_modulefinder](https://docs.python.org/3/library/modulefinder.html) • [dis](https://docs.python.org/3/library/dis.html) • [python_mccabe](https://github.com/flintwork/mccabe) • [bandit](https://wiki.openstack.org/wiki/Security/Projects/Bandit)
|
.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](package) • [python_coverage](http://nedbatchelder.com/code/coverage/) • [pycodestyle](https://pypi.python.org/pypi/pycodestyle) • [pydocstyle](http://pydocstyle.readthedocs.org/) • [pyflakes](https://launchpad.net/pyflakes) • [pylint](http://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris/blob/master/gut.py) • [python_modulefinder](https://docs.python.org/3/library/modulefinder.html) • [dis](https://docs.python.org/3/library/dis.html) • [python_mccabe](https://github.com/flintwork/mccabe) • [bandit](https://wiki.openstack.org/wiki/Security/Projects/Bandit)
|
||||||
.pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/) • [perltidy](http://perltidy.sourceforge.net/)
|
.pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/) • [perltidy](http://perltidy.sourceforge.net/)
|
||||||
.pod .pod6 | [perldoc](http://perldoc.perl.org/)
|
.pod .pod6 | [perldoc](http://perldoc.perl.org/)
|
||||||
.java | [uncrustify](https://github.com/uncrustify/uncrustify)
|
.java | [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||||
|
|
@ -53,5 +53,5 @@ Extensions(93) | Tools(62)
|
||||||
.so | [nm](https://linux.die.net/man/1/nm)
|
.so | [nm](https://linux.die.net/man/1/nm)
|
||||||
.deb | [dpkg_contents](https://wiki.debian.org/Teams/Dpkg) • [dpkg_info](https://wiki.debian.org/Teams/Dpkg)
|
.deb | [dpkg_contents](https://wiki.debian.org/Teams/Dpkg) • [dpkg_info](https://wiki.debian.org/Teams/Dpkg)
|
||||||
.rpm | [rpm](http://rpm.org/)
|
.rpm | [rpm](http://rpm.org/)
|
||||||
.png .jpg .gif .bmp .ppm .tiff .tga | [identify](http://www.imagemagick.org/script/identify.php) • [pil](http://python-pillow.github.io/) • [pil_half](http://python-pillow.github.io/)
|
.png .jpg .gif .bmp .ppm .tif .tiff .tga | [identify](http://www.imagemagick.org/script/identify.php) • [pil](http://python-pillow.github.io/)
|
||||||
.mkv .mka .mks .ogg .ogm .avi .wav .mpeg .mpg .vob .mp4 .mpgv .mpv .m1v .m2v .mp2 .mp3 .asf .wma .wmv .qt .mov .rm .rmvb .ra .ifo .ac3 .dts .aac .flac .aiff .aifc .au .iff .flv .srt .ssa .ass .sami | [mediainfo](https://mediaarea.net/MediaInfo)
|
.mkv .mka .mks .ogg .ogm .avi .wav .mpeg .mpg .vob .mp4 .mpgv .mpv .m1v .m2v .mp2 .mp3 .asf .wma .wmv .qt .mov .rm .rmvb .ra .ifo .ac3 .dts .aac .flac .aiff .aifc .au .iff .flv .srt .ssa .ass .sami | [mediainfo](https://mediaarea.net/MediaInfo)
|
||||||
|
|
|
||||||
2
TODO
2
TODO
|
|
@ -3,7 +3,6 @@ Todo
|
||||||
- Make a snap build work.
|
- Make a snap build work.
|
||||||
- Make a flatpak build work.
|
- Make a flatpak build work.
|
||||||
- Check the appimage build.
|
- Check the appimage build.
|
||||||
- Rename project to Eris.
|
|
||||||
|
|
||||||
|
|
||||||
Todo (tool related)
|
Todo (tool related)
|
||||||
|
|
@ -172,6 +171,7 @@ Done
|
||||||
- Add shellcheck tool for shell scripts.
|
- Add shellcheck tool for shell scripts.
|
||||||
- Add "git log <path>".
|
- Add "git log <path>".
|
||||||
- Change to using python3.7.
|
- Change to using python3.7.
|
||||||
|
- Rename project to Eris.
|
||||||
|
|
||||||
A-syntax, B-tests, C-auto docs, D-lint, E-coverage, F-profile, G-tidy, H-import deps
|
A-syntax, B-tests, C-auto docs, D-lint, E-coverage, F-profile, G-tidy, H-import deps
|
||||||
A B C D E F G H
|
A B C D E F G H
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=Vigil
|
Name=Eris
|
||||||
Comment=
|
Comment=
|
||||||
Exec=vigil
|
Exec=eris
|
||||||
Terminal=true
|
Terminal=true
|
||||||
Icon=vigil
|
Icon=eris
|
||||||
Categories=Application;
|
Categories=Application;
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,14 @@
|
||||||
# Copyright (C) 2015-2018 Andrew Hamilton. All rights reserved.
|
# Copyright (C) 2015-2018 Andrew Hamilton. All rights reserved.
|
||||||
# Licensed under the Artistic License 2.0.
|
# Licensed under the Artistic License 2.0.
|
||||||
|
|
||||||
"""Vigil Code Monitor
|
"""Eris Code Monitor
|
||||||
|
|
||||||
Vigil maintains an up-to-date set of reports for every file in a codebase.
|
Eris maintains an up-to-date set of reports for every file in a codebase.
|
||||||
|
|
||||||
A status indicator summarises the state of each report, and a report is viewed
|
A status indicator summarises the state of each report, and a report is viewed
|
||||||
by selecting this status indicator with the cursor.
|
by selecting this status indicator with the cursor.
|
||||||
|
|
||||||
The reports are cached in the codebase's root directory in a ".vigil"
|
The reports are cached in the codebase's root directory in a ".eris"
|
||||||
directory.
|
directory.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -34,20 +34,20 @@ import docopt
|
||||||
import pygments.styles
|
import pygments.styles
|
||||||
import pyinotify
|
import pyinotify
|
||||||
|
|
||||||
from vigil import fill3
|
from eris import fill3
|
||||||
from vigil import terminal
|
from eris import terminal
|
||||||
from vigil import termstr
|
from eris import termstr
|
||||||
from vigil import tools
|
from eris import tools
|
||||||
from vigil import worker
|
from eris import worker
|
||||||
|
|
||||||
|
|
||||||
USAGE = """
|
USAGE = """
|
||||||
Usage:
|
Usage:
|
||||||
vigil [options] <directory>
|
eris [options] <directory>
|
||||||
vigil -h | --help
|
eris -h | --help
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
# vigil my_project
|
# eris my_project
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h, --help Show the full help.
|
-h, --help Show the full help.
|
||||||
|
|
@ -1082,7 +1082,7 @@ def manage_cache(root_path):
|
||||||
timestamp_path = os.path.join(cache_path, "creation_time")
|
timestamp_path = os.path.join(cache_path, "creation_time")
|
||||||
if os.path.exists(cache_path) and \
|
if os.path.exists(cache_path) and \
|
||||||
os.stat(__file__).st_mtime > os.stat(timestamp_path).st_mtime:
|
os.stat(__file__).st_mtime > os.stat(timestamp_path).st_mtime:
|
||||||
print("Vigil has been updated, so clearing the cache and"
|
print("Eris has been updated, so clearing the cache and"
|
||||||
" recalculating all results...")
|
" recalculating all results...")
|
||||||
shutil.rmtree(cache_path)
|
shutil.rmtree(cache_path)
|
||||||
if not os.path.exists(cache_path):
|
if not os.path.exists(cache_path):
|
||||||
|
|
@ -1125,7 +1125,7 @@ def check_arguments():
|
||||||
|
|
||||||
def entry_point():
|
def entry_point():
|
||||||
root_path, worker_count, editor_command, theme = check_arguments()
|
root_path, worker_count, editor_command, theme = check_arguments()
|
||||||
with terminal.terminal_title("vigil: " + os.path.basename(root_path)):
|
with terminal.terminal_title("eris: " + os.path.basename(root_path)):
|
||||||
manage_cache(root_path)
|
manage_cache(root_path)
|
||||||
with chdir(root_path): # FIX: Don't change directory if possible.
|
with chdir(root_path): # FIX: Don't change directory if possible.
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
|
@ -12,11 +12,11 @@ import os
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import vigil.urwid
|
import eris.urwid
|
||||||
import vigil.urwid.raw_display
|
import eris.urwid.raw_display
|
||||||
|
|
||||||
import vigil.terminal as terminal
|
import eris.terminal as terminal
|
||||||
import vigil.termstr as termstr
|
import eris.termstr as termstr
|
||||||
|
|
||||||
|
|
||||||
def appearance_is_valid(appearance):
|
def appearance_is_valid(appearance):
|
||||||
|
|
@ -467,7 +467,7 @@ def patch_screen(widget):
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def _urwid_screen():
|
def _urwid_screen():
|
||||||
screen = vigil.urwid.raw_display.Screen()
|
screen = eris.urwid.raw_display.Screen()
|
||||||
screen.set_mouse_tracking(True)
|
screen.set_mouse_tracking(True)
|
||||||
screen.start()
|
screen.start()
|
||||||
try:
|
try:
|
||||||
|
|
@ -15,17 +15,17 @@ import weakref
|
||||||
|
|
||||||
import pygments.formatters.terminal256
|
import pygments.formatters.terminal256
|
||||||
|
|
||||||
import vigil.ColorMap
|
import eris.ColorMap
|
||||||
import vigil.terminal as terminal
|
import eris.terminal as terminal
|
||||||
|
|
||||||
|
|
||||||
xterm_colormap = vigil.ColorMap.XTermColorMap()
|
xterm_colormap = eris.ColorMap.XTermColorMap()
|
||||||
|
|
||||||
|
|
||||||
@functools.lru_cache()
|
@functools.lru_cache()
|
||||||
def xterm_color_to_rgb(color_index):
|
def xterm_color_to_rgb(color_index):
|
||||||
"""Return the rgb color of an xterm color."""
|
"""Return the rgb color of an xterm color."""
|
||||||
return vigil.ColorMap._rgb(xterm_colormap.colors[color_index])
|
return eris.ColorMap._rgb(xterm_colormap.colors[color_index])
|
||||||
|
|
||||||
|
|
||||||
def _cache_first_result(user_function):
|
def _cache_first_result(user_function):
|
||||||
|
|
@ -28,16 +28,16 @@ import pygments.lexers
|
||||||
import pygments.styles
|
import pygments.styles
|
||||||
import toml
|
import toml
|
||||||
|
|
||||||
import vigil
|
import eris
|
||||||
import vigil.fill3 as fill3
|
import eris.fill3 as fill3
|
||||||
import vigil.gut as gut
|
import eris.gut as gut
|
||||||
import vigil.lscolors as lscolors
|
import eris.lscolors as lscolors
|
||||||
import vigil.termstr as termstr
|
import eris.termstr as termstr
|
||||||
|
|
||||||
|
|
||||||
PYTHON_VERSION = "3.7"
|
PYTHON_VERSION = "3.7"
|
||||||
PYTHON_EXECUTABLE = "python" + PYTHON_VERSION
|
PYTHON_EXECUTABLE = "python" + PYTHON_VERSION
|
||||||
CACHE_PATH = ".vigil"
|
CACHE_PATH = ".eris"
|
||||||
|
|
||||||
|
|
||||||
if "PYGMENT_STYLE" not in os.environ:
|
if "PYGMENT_STYLE" not in os.environ:
|
||||||
|
|
@ -382,7 +382,7 @@ def pylint(path):
|
||||||
"--errors-only", path])
|
"--errors-only", path])
|
||||||
|
|
||||||
|
|
||||||
@deps(url="https://github.com/ahamilton/vigil/blob/master/gut.py")
|
@deps(url="https://github.com/ahamilton/eris/blob/master/gut.py")
|
||||||
def python_gut(path):
|
def python_gut(path):
|
||||||
with open(path) as module_file:
|
with open(path) as module_file:
|
||||||
output = gut.gut_module(module_file.read())
|
output = gut.gut_module(module_file.read())
|
||||||
|
|
@ -573,7 +573,7 @@ def make_tool_function(dependencies, url, command, success_status=None,
|
||||||
return func
|
return func
|
||||||
|
|
||||||
|
|
||||||
with importlib.resources.open_text(vigil, "tools.toml") as tools_toml_file:
|
with importlib.resources.open_text(eris, "tools.toml") as tools_toml_file:
|
||||||
tools_toml = toml.load(tools_toml_file)
|
tools_toml = toml.load(tools_toml_file)
|
||||||
tools_for_extensions = tools_toml["tools_for_extensions"]
|
tools_for_extensions = tools_toml["tools_for_extensions"]
|
||||||
del tools_toml["tools_for_extensions"]
|
del tools_toml["tools_for_extensions"]
|
||||||
|
|
@ -585,7 +585,7 @@ for tool_name, tool_toml in tools_toml.items():
|
||||||
#############################
|
#############################
|
||||||
|
|
||||||
|
|
||||||
LOG_PATH = os.path.join(os.getcwd(), "vigil.log")
|
LOG_PATH = os.path.join(os.getcwd(), "eris.log")
|
||||||
|
|
||||||
|
|
||||||
def log_error(message=None):
|
def log_error(message=None):
|
||||||
|
|
@ -234,7 +234,7 @@ tools_for_extensions = [
|
||||||
|
|
||||||
[yamllint]
|
[yamllint]
|
||||||
dependencies = ["pip3/yamllint"]
|
dependencies = ["pip3/yamllint"]
|
||||||
url = "yamllint"
|
url = "https://github.com/adrienverge/yamllint"
|
||||||
command = "python3.7 -m yamllint"
|
command = "python3.7 -m yamllint"
|
||||||
|
|
||||||
[mediainfo]
|
[mediainfo]
|
||||||
|
|
@ -28,7 +28,7 @@ import sys
|
||||||
import termios
|
import termios
|
||||||
import tty
|
import tty
|
||||||
|
|
||||||
from vigil.urwid import escape
|
from eris.urwid import escape
|
||||||
|
|
||||||
|
|
||||||
class Screen:
|
class Screen:
|
||||||
|
|
@ -10,15 +10,15 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import pickle
|
import pickle
|
||||||
|
|
||||||
import vigil.fill3 as fill3
|
import eris.fill3 as fill3
|
||||||
import vigil.tools as tools
|
import eris.tools as tools
|
||||||
|
|
||||||
|
|
||||||
USAGE = """Usage:
|
USAGE = """Usage:
|
||||||
vigil-webserver <directory>
|
eris-webserver <directory>
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
vigil-webserver my_project
|
eris-webserver my_project
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ import asyncio
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
|
|
||||||
import vigil.tools as tools
|
import eris.tools as tools
|
||||||
|
|
||||||
|
|
||||||
class Worker:
|
class Worker:
|
||||||
|
|
@ -24,7 +24,7 @@ class Worker:
|
||||||
|
|
||||||
async def create_process(self):
|
async def create_process(self):
|
||||||
create = asyncio.create_subprocess_exec(
|
create = asyncio.create_subprocess_exec(
|
||||||
"vigil-worker", stdin=asyncio.subprocess.PIPE,
|
"eris-worker", stdin=asyncio.subprocess.PIPE,
|
||||||
stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE,
|
stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE,
|
||||||
preexec_fn=os.setsid)
|
preexec_fn=os.setsid)
|
||||||
self.process = await create
|
self.process = await create
|
||||||
|
|
@ -9,12 +9,12 @@ set -e
|
||||||
|
|
||||||
DIST_ID=$(cat /etc/os-release | grep "^ID=" | cut -d "=" -f 2)
|
DIST_ID=$(cat /etc/os-release | grep "^ID=" | cut -d "=" -f 2)
|
||||||
if [ $DIST_ID != "ubuntu" ]; then
|
if [ $DIST_ID != "ubuntu" ]; then
|
||||||
echo "Vigil can only be installed on Ubuntu."
|
echo "Eris can only be installed on Ubuntu."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Installing the dependencies of the vigil script..."
|
echo "Installing the dependencies of the eris script..."
|
||||||
sudo apt --yes install python3.7 util-linux
|
sudo apt --yes install python3.7 util-linux
|
||||||
python3.7 -m pip install pyinotify pygments docopt pillow toml
|
python3.7 -m pip install pyinotify pygments docopt pillow toml
|
||||||
echo
|
echo
|
||||||
echo "Installing all the tools vigil may need..."
|
echo "Installing all the tools eris may need..."
|
||||||
./install-tools
|
./install-tools
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
|
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import vigil.tools
|
import eris.tools
|
||||||
|
|
||||||
|
|
||||||
pip_deps, pip3_deps, dist_deps = set(), set(), set()
|
pip_deps, pip3_deps, dist_deps = set(), set(), set()
|
||||||
for dependency in vigil.tools.dependencies():
|
for dependency in eris.tools.dependencies():
|
||||||
if "/" in dependency:
|
if "/" in dependency:
|
||||||
pip_version, pip_dependency = dependency.split("/")
|
pip_version, pip_dependency = dependency.split("/")
|
||||||
(pip_deps if pip_version == "pip" else pip3_deps).add(pip_dependency)
|
(pip_deps if pip_version == "pip" else pip3_deps).add(pip_dependency)
|
||||||
|
|
@ -24,5 +24,5 @@ if pip_deps:
|
||||||
subprocess.run(["python", "-m", "pip", "install"] + list(pip_deps),
|
subprocess.run(["python", "-m", "pip", "install"] + list(pip_deps),
|
||||||
check=True)
|
check=True)
|
||||||
if pip3_deps:
|
if pip3_deps:
|
||||||
subprocess.run(["python" + vigil.tools.PYTHON_VERSION, "-m", "pip",
|
subprocess.run(["python" + eris.tools.PYTHON_VERSION, "-m", "pip",
|
||||||
"install"] + list(pip3_deps), check=True)
|
"install"] + list(pip3_deps), check=True)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import tempfile
|
||||||
import test_distributions
|
import test_distributions
|
||||||
|
|
||||||
|
|
||||||
VIGIL_PATH = os.path.realpath(os.path.dirname(__file__))
|
ERIS_PATH = os.path.realpath(os.path.dirname(__file__))
|
||||||
cmd = test_distributions.cmd
|
cmd = test_distributions.cmd
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ def make_ubuntu_base():
|
||||||
return base_paths
|
return base_paths
|
||||||
|
|
||||||
|
|
||||||
def install_vigil():
|
def install_eris():
|
||||||
run_in_container = test_distributions.run_in_container
|
run_in_container = test_distributions.run_in_container
|
||||||
run_in_container("ubuntu", "./install-dependencies")
|
run_in_container("ubuntu", "./install-dependencies")
|
||||||
# libunionpreload doesn't trick shebangs?
|
# libunionpreload doesn't trick shebangs?
|
||||||
|
|
@ -82,9 +82,9 @@ def install_vigil():
|
||||||
def make_app_dir(app_dir, new_paths):
|
def make_app_dir(app_dir, new_paths):
|
||||||
os.mkdir(app_dir)
|
os.mkdir(app_dir)
|
||||||
make_sub_container("ubuntu", app_dir, new_paths)
|
make_sub_container("ubuntu", app_dir, new_paths)
|
||||||
cmd(f"cp -a {VIGIL_PATH}/tests {app_dir}")
|
cmd(f"cp -a {ERIS_PATH}/tests {app_dir}")
|
||||||
cmd(f"cp -a {VIGIL_PATH}/test-all {app_dir}")
|
cmd(f"cp -a {ERIS_PATH}/test-all {app_dir}")
|
||||||
cmd(f"cp {VIGIL_PATH}/appimage/* {app_dir}")
|
cmd(f"cp {ERIS_PATH}/appimage/* {app_dir}")
|
||||||
# if not os.path.exists("libunionpreload.so"):
|
# if not os.path.exists("libunionpreload.so"):
|
||||||
# make_libunionpreload()
|
# make_libunionpreload()
|
||||||
# cmd("cp libunionpreload.so " + app_dir)
|
# cmd("cp libunionpreload.so " + app_dir)
|
||||||
|
|
@ -101,11 +101,11 @@ def main(work_path):
|
||||||
assert os.getuid() == 0 and os.getgid() == 0, "Need to be root."
|
assert os.getuid() == 0 and os.getgid() == 0, "Need to be root."
|
||||||
os.chdir(work_path)
|
os.chdir(work_path)
|
||||||
base_paths = make_ubuntu_base()
|
base_paths = make_ubuntu_base()
|
||||||
install_vigil()
|
install_eris()
|
||||||
post_install_paths = relative_paths("ubuntu", all_paths("ubuntu"))
|
post_install_paths = relative_paths("ubuntu", all_paths("ubuntu"))
|
||||||
new_paths = set(post_install_paths) - set(base_paths)
|
new_paths = set(post_install_paths) - set(base_paths)
|
||||||
new_paths = filter_paths(new_paths, "/var/cache/apt/archives")
|
new_paths = filter_paths(new_paths, "/var/cache/apt/archives")
|
||||||
app_dir = "vigil.AppDir"
|
app_dir = "eris.AppDir"
|
||||||
if os.path.exists(app_dir):
|
if os.path.exists(app_dir):
|
||||||
cmd("sudo rm -rf " + app_dir)
|
cmd("sudo rm -rf " + app_dir)
|
||||||
make_app_dir(app_dir, new_paths)
|
make_app_dir(app_dir, new_paths)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
# Licensed under the Artistic License 2.0.
|
# Licensed under the Artistic License 2.0.
|
||||||
|
|
||||||
|
|
||||||
import vigil.tools as tools
|
import eris.tools as tools
|
||||||
|
|
||||||
|
|
||||||
def tool_markup(tool):
|
def tool_markup(tool):
|
||||||
|
|
@ -22,18 +22,18 @@ for extensions, tools_ in all_tools:
|
||||||
tool_set.update(tools_)
|
tool_set.update(tools_)
|
||||||
extension_set.update(extensions)
|
extension_set.update(extensions)
|
||||||
print(f"""\
|
print(f"""\
|
||||||
# Vigil Code Monitor
|
# Eris Code Monitor
|
||||||
|
|
||||||
### Summary
|
### Summary
|
||||||
|
|
||||||
Vigil maintains an up-to-date set of reports for every file in a codebase.
|
Eris maintains an up-to-date set of reports for every file in a codebase.
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
(Tested in Ubuntu 18.04)
|
(Tested in Ubuntu 18.04)
|
||||||
|
|
||||||
# git clone https://github.com/ahamilton/vigil
|
# git clone https://github.com/ahamilton/eris
|
||||||
# cd vigil
|
# cd eris
|
||||||
# ./install-dependencies
|
# ./install-dependencies
|
||||||
# python3.7 -m pip install .
|
# python3.7 -m pip install .
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ To test its working properly:
|
||||||
|
|
||||||
then to run:
|
then to run:
|
||||||
|
|
||||||
# vigil <directory_path>
|
# eris <directory_path>
|
||||||
|
|
||||||
### Tools
|
### Tools
|
||||||
|
|
||||||
|
|
|
||||||
16
setup.py
16
setup.py
|
|
@ -10,16 +10,16 @@ except ImportError:
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
|
|
||||||
setup(name="vigil",
|
setup(name="eris",
|
||||||
version="17.06",
|
version="17.06",
|
||||||
description=("Vigil maintains an up-to-date set of reports for every"
|
description=("Eris maintains an up-to-date set of reports for every"
|
||||||
" file in a codebase."),
|
" file in a codebase."),
|
||||||
url="https://github.com/ahamilton/vigil",
|
url="https://github.com/ahamilton/eris",
|
||||||
author="Andrew Hamilton",
|
author="Andrew Hamilton",
|
||||||
license="Artistic 2.0",
|
license="Artistic 2.0",
|
||||||
packages=["vigil", "vigil.urwid"],
|
packages=["eris", "eris.urwid"],
|
||||||
package_data={"vigil": ["LS_COLORS.sh", "tools.toml"]},
|
package_data={"eris": ["LS_COLORS.sh", "tools.toml"]},
|
||||||
entry_points={"console_scripts":
|
entry_points={"console_scripts":
|
||||||
["vigil=vigil.__main__:entry_point",
|
["eris=eris.__main__:entry_point",
|
||||||
"vigil-worker=vigil.worker:main",
|
"eris-worker=eris.worker:main",
|
||||||
"vigil-webserver=vigil.webserver:main"]})
|
"eris-webserver=eris.webserver:main"]})
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
|
||||||
VIGIL_PATH = os.path.realpath(os.path.dirname(__file__))
|
ERIS_PATH = os.path.realpath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
def cmd(command):
|
def cmd(command):
|
||||||
|
|
@ -32,7 +32,7 @@ def umount_squashfs_iso(mount_point):
|
||||||
|
|
||||||
def run_in_container(container, command):
|
def run_in_container(container, command):
|
||||||
option = "--directory" if os.path.isdir(container) else "--image"
|
option = "--directory" if os.path.isdir(container) else "--image"
|
||||||
cmd(f"sudo systemd-nspawn --quiet --chdir=/vigil --overlay={VIGIL_PATH}:/vigil "
|
cmd(f"sudo systemd-nspawn --quiet --chdir=/eris --overlay={ERIS_PATH}:/eris "
|
||||||
f'{option}={container} /bin/bash --login -c "{command}"')
|
f'{option}={container} /bin/bash --login -c "{command}"')
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -135,16 +135,16 @@ def main():
|
||||||
else:
|
else:
|
||||||
print(f"Building {distribution} container...")
|
print(f"Building {distribution} container...")
|
||||||
globals()["build_" + distribution]()
|
globals()["build_" + distribution]()
|
||||||
print(f"Installing vigil's dependencies in {distribution}...")
|
print(f"Installing eris's dependencies in {distribution}...")
|
||||||
run_in_container(distribution, "./install-dependencies")
|
run_in_container(distribution, "./install-dependencies")
|
||||||
print(f"Installing vigil in {distribution}...")
|
print(f"Installing eris in {distribution}...")
|
||||||
run_in_container(distribution, "apt-get install --yes python3-pip")
|
run_in_container(distribution, "apt-get install --yes python3-pip")
|
||||||
run_in_container(distribution, "pip3 install .")
|
run_in_container(distribution, "pip3 install .")
|
||||||
print(f"Testing vigil in {distribution}...")
|
print(f"Testing eris in {distribution}...")
|
||||||
run_in_container(distribution, "./test-all")
|
run_in_container(distribution, "./test-all")
|
||||||
print(f"Running vigil in {distribution}...")
|
print(f"Running eris in {distribution}...")
|
||||||
run_in_container(distribution, "vigil --help")
|
run_in_container(distribution, "eris --help")
|
||||||
print(f"Successfully installed vigil in {distribution}.")
|
print(f"Successfully installed eris in {distribution}.")
|
||||||
print(f"Removing {distribution} container...")
|
print(f"Removing {distribution} container...")
|
||||||
try:
|
try:
|
||||||
globals()["remove_" + distribution]()
|
globals()["remove_" + distribution]()
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ import unittest
|
||||||
os.environ["TERM"] = "xterm-256color"
|
os.environ["TERM"] = "xterm-256color"
|
||||||
|
|
||||||
import golden
|
import golden
|
||||||
import vigil.fill3 as fill3
|
import eris.fill3 as fill3
|
||||||
import vigil.__main__ as __main__
|
import eris.__main__ as __main__
|
||||||
|
|
||||||
|
|
||||||
_DIMENSIONS = (100, 60)
|
_DIMENSIONS = (100, 60)
|
||||||
|
|
@ -226,7 +226,7 @@ class MainTestCase(unittest.TestCase):
|
||||||
is_being_tested=True)
|
is_being_tested=True)
|
||||||
for file_name in ["summary.pickle", "creation_time", "log",
|
for file_name in ["summary.pickle", "creation_time", "log",
|
||||||
"foo-metadata", "foo-contents"]:
|
"foo-metadata", "foo-contents"]:
|
||||||
self.assertTrue(os.path.exists(".vigil/" + file_name))
|
self.assertTrue(os.path.exists(".eris/" + file_name))
|
||||||
self.assertEqual(_mount_total(), mount_total)
|
self.assertEqual(_mount_total(), mount_total)
|
||||||
# self.assertEqual(_tmp_total(), tmp_total)
|
# self.assertEqual(_tmp_total(), tmp_total)
|
||||||
temp_dir = tempfile.mkdtemp()
|
temp_dir = tempfile.mkdtemp()
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import vigil.fill3 as fill3
|
import eris.fill3 as fill3
|
||||||
import vigil.termstr as termstr
|
import eris.termstr as termstr
|
||||||
|
|
||||||
|
|
||||||
class WidgetTests(unittest.TestCase):
|
class WidgetTests(unittest.TestCase):
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
(B[m[38;2;255;255;255m[48;2;0;0;0m┌────────────────────────────────────────────── Help ──────────────────────────────────────────────┐
|
(B[m[38;2;255;255;255m[48;2;0;0;0m┌────────────────────────────────────────────── Help ──────────────────────────────────────────────┐
|
||||||
│Vigil Code Monitor │
|
│Eris Code Monitor │
|
||||||
│ │
|
│ │
|
||||||
│Vigil maintains an up-to-date set of reports for every file in a codebase. │
|
│Eris maintains an up-to-date set of reports for every file in a codebase. │
|
||||||
│ │
|
│ │
|
||||||
│A status indicator summarises the state of each report, and a report is viewed │
|
│A status indicator summarises the state of each report, and a report is viewed │
|
||||||
│by selecting this status indicator with the cursor. │
|
│by selecting this status indicator with the cursor. │
|
||||||
│ │
|
│ │
|
||||||
│The reports are cached in the codebase's root directory in a ".vigil" │
|
│The reports are cached in the codebase's root directory in a ".eris" │
|
||||||
│directory. │
|
│directory. │
|
||||||
│ │
|
│ │
|
||||||
│Keys: │
|
│Keys: │
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#[31m===#[0mSORRY!#[31m===#[0m
|
#[31m===#[0mSORRY!#[31m===#[0m
|
||||||
Two terms in a row across lines (missing semicolon or comma?)
|
Two terms in a row across lines (missing semicolon or comma?)
|
||||||
at /tmp/vigil/golden-files/./input/perl6.p6:30
|
at /tmp/eris/golden-files/./input/perl6.p6:30
|
||||||
------> #[32msay 'Hello from Perl 6!'#[33m⏏#[31m<EOL>#[0m
|
------> #[32msay 'Hello from Perl 6!'#[33m⏏#[31m<EOL>#[0m
|
||||||
expecting any of:
|
expecting any of:
|
||||||
infix
|
infix
|
||||||
|
|
@ -11,6 +11,6 @@ at /tmp/vigil/golden-files/./input/perl6.p6:30
|
||||||
statement modifier loop
|
statement modifier loop
|
||||||
Other potential difficulties:
|
Other potential difficulties:
|
||||||
Useless declaration of a has-scoped method in mainline (did you mean 'my regex http-verb'?)
|
Useless declaration of a has-scoped method in mainline (did you mean 'my regex http-verb'?)
|
||||||
at /tmp/vigil/golden-files/./input/perl6.p6:11
|
at /tmp/eris/golden-files/./input/perl6.p6:11
|
||||||
------> #[32mregex #[33m⏏#[31mhttp-verb {#[0m
|
------> #[32mregex #[33m⏏#[31mhttp-verb {#[0m
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#[31m===#[0mSORRY!#[31m===#[0m
|
#[31m===#[0mSORRY!#[31m===#[0m
|
||||||
Two terms in a row across lines (missing semicolon or comma?)
|
Two terms in a row across lines (missing semicolon or comma?)
|
||||||
at /tmp/vigil/golden-files/./input/perl6.pl:30
|
at /tmp/eris/golden-files/./input/perl6.pl:30
|
||||||
------> #[32msay 'Hello from Perl 6!'#[33m⏏#[31m<EOL>#[0m
|
------> #[32msay 'Hello from Perl 6!'#[33m⏏#[31m<EOL>#[0m
|
||||||
expecting any of:
|
expecting any of:
|
||||||
infix
|
infix
|
||||||
|
|
@ -11,6 +11,6 @@ at /tmp/vigil/golden-files/./input/perl6.pl:30
|
||||||
statement modifier loop
|
statement modifier loop
|
||||||
Other potential difficulties:
|
Other potential difficulties:
|
||||||
Useless declaration of a has-scoped method in mainline (did you mean 'my regex http-verb'?)
|
Useless declaration of a has-scoped method in mainline (did you mean 'my regex http-verb'?)
|
||||||
at /tmp/vigil/golden-files/./input/perl6.pl:11
|
at /tmp/eris/golden-files/./input/perl6.pl:11
|
||||||
------> #[32mregex #[33m⏏#[31mhttp-verb {#[0m
|
------> #[32mregex #[33m⏏#[31mhttp-verb {#[0m
|
||||||
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
import textwrap
|
import textwrap
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import vigil.gut as gut
|
import eris.gut as gut
|
||||||
|
|
||||||
|
|
||||||
class GutTestCase(unittest.TestCase):
|
class GutTestCase(unittest.TestCase):
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import vigil.lscolors as lscolors
|
import eris.lscolors as lscolors
|
||||||
|
|
||||||
|
|
||||||
class TempDirTestCase(unittest.TestCase):
|
class TempDirTestCase(unittest.TestCase):
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import unittest
|
||||||
|
|
||||||
os.environ["TERM"] = "xterm-256color"
|
os.environ["TERM"] = "xterm-256color"
|
||||||
|
|
||||||
from vigil.termstr import TermStr, CharStyle
|
from eris.termstr import TermStr, CharStyle
|
||||||
import vigil.termstr as termstr
|
import eris.termstr as termstr
|
||||||
|
|
||||||
|
|
||||||
class CacheFirstResultTestCase(unittest.TestCase):
|
class CacheFirstResultTestCase(unittest.TestCase):
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,12 @@ import unittest.mock
|
||||||
os.environ["TERM"] = "xterm-256color"
|
os.environ["TERM"] = "xterm-256color"
|
||||||
|
|
||||||
import golden
|
import golden
|
||||||
import vigil.fill3 as fill3
|
import eris.fill3 as fill3
|
||||||
import vigil.tools as tools
|
import eris.tools as tools
|
||||||
|
|
||||||
|
|
||||||
os.environ["TZ"] = "GMT"
|
os.environ["TZ"] = "GMT"
|
||||||
VIGIL_ROOT = os.path.dirname(__file__)
|
ERIS_ROOT = os.path.dirname(__file__)
|
||||||
|
|
||||||
|
|
||||||
class ExecutablesTestCase(unittest.TestCase):
|
class ExecutablesTestCase(unittest.TestCase):
|
||||||
|
|
@ -47,11 +47,11 @@ def chdir(path):
|
||||||
|
|
||||||
def result_path(tool, input_filename):
|
def result_path(tool, input_filename):
|
||||||
filename = tool.__name__ + "-" + input_filename.replace(".", "_")
|
filename = tool.__name__ + "-" + input_filename.replace(".", "_")
|
||||||
return os.path.join(VIGIL_ROOT, "golden-files", "results", filename)
|
return os.path.join(ERIS_ROOT, "golden-files", "results", filename)
|
||||||
|
|
||||||
|
|
||||||
def run_tool(tool, input_filename):
|
def run_tool(tool, input_filename):
|
||||||
with chdir(os.path.join(VIGIL_ROOT, "golden-files")):
|
with chdir(os.path.join(ERIS_ROOT, "golden-files")):
|
||||||
return tool(os.path.join(".", "input", input_filename))
|
return tool(os.path.join(".", "input", input_filename))
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -222,9 +222,6 @@ class ToolsTestCase(unittest.TestCase):
|
||||||
self._test_tool(tools.pil, [("circle." + extension,
|
self._test_tool(tools.pil, [("circle." + extension,
|
||||||
tools.Status.normal)])
|
tools.Status.normal)])
|
||||||
|
|
||||||
def test_pil_half(self):
|
|
||||||
self._test_tool(tools.pil_half, [("circle.png", tools.Status.normal)])
|
|
||||||
|
|
||||||
|
|
||||||
class LruCacheWithEvictionTestCase(unittest.TestCase):
|
class LruCacheWithEvictionTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import vigil.tools as tools
|
import eris.tools as tools
|
||||||
import vigil.worker as worker
|
import eris.worker as worker
|
||||||
|
|
||||||
|
|
||||||
class WorkerTestCase(unittest.TestCase):
|
class WorkerTestCase(unittest.TestCase):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue