...
 
Commits (15)
ontospy (0~20190107~dfsg1-2) unstable; urgency=medium
* Add patch 1002 to fix error message suggesting bootstrap command.
* Improve package testsuite.
* Distrust upstream testsuite. Check package testsuite during build.
Build-depend on libtest-command-simple-perl libtest-expect-perl
libtest-tempdir-tiny-perl perl.
* Fix repeat debhelper options when overriding.
* Fix check generated shell completion files are not empty.
* Stop check generated shell completion files.
Stop build-depend on shellcheck.
* Fix run package testsuite
and generate shell completion scripts and manpage during install
(not during build:
pybuild resolves executable only during install.
* Add patches 1003 1004
to fix template paths and normalize JavaScript library paths.
* Fix link to shared JavaScript libraries.
(Build-)depend on libjs-bootstrap libjs-bootswatch libjs-chartjs
libjs-d3 libjs-jquery.
-- Jonas Smedegaard <dr@jones.dk> Sat, 02 Feb 2019 03:38:12 +0100
ontospy (0~20190107~dfsg1-1) experimental; urgency=medium
* Strip excessively large logfile from upstream source.
......
......@@ -6,7 +6,18 @@ Build-Depends:
bash-completion,
debhelper,
dh-python,
figlet <!nocheck>,
help2man,
libfile-homedir-perl <!nocheck>,
libjs-bootstrap <!nocheck>,
libjs-bootswatch <!nocheck>,
libjs-chartjs <!nocheck>,
libjs-d3 <!nocheck>,
libjs-jquery <!nocheck>,
libtest-command-simple-perl <!nocheck>,
libtest-expect-perl <!nocheck>,
libtest-tempdir-tiny-perl <!nocheck>,
perl <!nocheck>,
python3,
python3-click,
python3-colorama (>= 0.3.7),
......@@ -21,7 +32,7 @@ Build-Depends:
python3-requests (>= 2.20.0),
python3-setuptools,
python3-sparqlwrapper,
shellcheck <!nocheck>,
toilet-fonts <!nocheck>,
Standards-Version: 4.3.0
Vcs-Git: https://salsa.debian.org/debian/ontospy.git
Vcs-Browser: https://salsa.debian.org/debian/ontospy
......@@ -48,6 +59,11 @@ Description: query, inspect and visualize RDF/OWL ontologies - CLI tool
Package: python3-ontospy
Architecture: all
Depends:
libjs-bootstrap,
libjs-bootswatch,
libjs-chartjs,
libjs-d3,
libjs-jquery,
${misc:Depends},
${python3:Depends},
Recommends:
......
......@@ -171,7 +171,7 @@ License: CC-BY-1.0
You may not sublicense the Work.
You must keep intact all notices
that refer to this License and to the disclaimer of warranties.
You may not distribute, publicly display, publicly perform,
You may not distribute, publicly display, publicly perform,
or publicly digitally perform the Work
with any technological measures
that control access or use of the Work
......
......@@ -15,15 +15,28 @@ Files: ERROR.txt
debian/ontospy.install
debian/ontospy.manpages
debian/patches/1001_fix_syntax_error.patch
debian/patches/1002_fix_error_msg.patch
debian/patches/1003_template_paths.patch
debian/patches/1004_library_paths.patch
debian/patches/2001_privacy.patch
debian/patches/README
debian/patches/series
debian/python3-ontospy.install
debian/python3-ontospy.links
debian/python3-ontospy.lintian-overrides
debian/rules
debian/source/format
debian/tests/control
debian/tests/net/ontospy-gendocs.t
debian/tests/net/ontospy-lib.t
debian/tests/ontospy-gendocs.t
debian/tests/ontospy-lib.t
debian/tests/ontospy-scan.t
debian/tests/ontospy-ser.t
debian/tests/ontospy-shell.t
debian/tests/ontospy-utils.t
debian/tests/ontospy.t
debian/tests/sharedlibs/ontospy-gendocs.t
debian/watch
docs/_config.yml
docs/index.md
......
Description: Fix error message suggesting bootstrap command
Author: Jonas Smedegaard <dr@jones.dk>
Bug: https://github.com/lambdamusic/Ontospy/issues/78
Last-Update: 2019-02-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/ontospy/core/actions.py
+++ b/ontospy/core/actions.py
@@ -162,7 +162,7 @@
# printDebug("------------------", 'comment')
if not options:
printDebug(
- "Your local library is empty. Use 'ontospy --bootstrap' to add some ontologies to it."
+ "Your local library is empty. Use 'ontospy lib --bootstrap' to add some ontologies to it."
)
return
else:
Description: Fix template path
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2019-02-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/ontospy/ontodocs/viz/viz_d3packHierarchy.py
+++ b/ontospy/ontodocs/viz/viz_d3packHierarchy.py
@@ -54,7 +54,7 @@
# Ontology - MAIN PAGE
contents = self._renderTemplate(
- "d3/d3_packHierarchy.html", extraContext=extra_context)
+ "d3/d3_packhierarchy.html", extraContext=extra_context)
FILE_NAME = "index.html"
main_url = self._save2File(contents, FILE_NAME, self.output_path)
Description: Normalize library paths
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2019-02-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/ontospy/ontodocs/viz/viz_d3barHierarchy.py
+++ b/ontospy/ontodocs/viz/viz_d3barHierarchy.py
@@ -24,7 +24,7 @@
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
- self.static_files = ["libs/d3-v3", "libs/jquery"]
+ self.static_files = ["libs/d3", "libs/jquery"]
def _buildTemplates(self):
"""
--- a/ontospy/ontodocs/viz/viz_d3bubbleChart.py
+++ b/ontospy/ontodocs/viz/viz_d3bubbleChart.py
@@ -24,7 +24,7 @@
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
- self.static_files = ["libs/d3-v3", "libs/jquery"]
+ self.static_files = ["libs/d3", "libs/jquery"]
def _buildTemplates(self):
"""
--- a/ontospy/ontodocs/viz/viz_d3packHierarchy.py
+++ b/ontospy/ontodocs/viz/viz_d3packHierarchy.py
@@ -25,7 +25,7 @@
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
- self.static_files = ["libs/d3-v3", "libs/jquery"]
+ self.static_files = ["libs/d3", "libs/jquery"]
def _buildTemplates(self):
"""
--- a/ontospy/ontodocs/viz/viz_d3partitionTable.py
+++ b/ontospy/ontodocs/viz/viz_d3partitionTable.py
@@ -24,7 +24,7 @@
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
- self.static_files = ["libs/d3-v3", "libs/jquery"]
+ self.static_files = ["libs/d3", "libs/jquery"]
def _buildTemplates(self):
"""
--- a/ontospy/ontodocs/viz/viz_d3rotatingCluster.py
+++ b/ontospy/ontodocs/viz/viz_d3rotatingCluster.py
@@ -24,7 +24,7 @@
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
- self.static_files = ["libs/d3-v3", "libs/jquery"]
+ self.static_files = ["libs/d3", "libs/jquery"]
def _buildTemplates(self):
"""
--- a/ontospy/ontodocs/viz/viz_d3tree.py
+++ b/ontospy/ontodocs/viz/viz_d3tree.py
@@ -25,7 +25,7 @@
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
- self.static_files = ["libs/d3-v2", "libs/jquery"]
+ self.static_files = ["libs/d3", "libs/jquery"]
def _buildTemplates(self):
"""
--- a/ontospy/ontodocs/viz/viz_d3treePie.py
+++ b/ontospy/ontodocs/viz/viz_d3treePie.py
@@ -24,7 +24,7 @@
Init
"""
super(Dataviz, self).__init__(ontospy_graph, title)
- self.static_files = ["libs/d3-v3", "libs/jquery"]
+ self.static_files = ["libs/d3", "libs/jquery"]
def _buildTemplates(self):
"""
--- a/ontospy/ontodocs/viz/viz_html_multi.py
+++ b/ontospy/ontodocs/viz/viz_html_multi.py
@@ -30,10 +30,10 @@
super(KompleteViz, self).__init__(ontospy_graph, title)
self.static_files = [
"custom",
- "libs/bootswatch3_2",
- "libs/bootstrap-3_3_7-dist",
- "libs/jquery/1_12_4/",
- "libs/chartjs-2_4_0"
+ "libs/bootswatch",
+ "libs/bootstrap",
+ "libs/jquery",
+ "libs/chartjs"
]
self.theme = validate_theme(theme)
1001_fix_syntax_error.patch
1002_fix_error_msg.patch
1003_template_paths.patch
1004_library_paths.patch
2001_privacy.patch
/usr/share/javascript/bootstrap /usr/lib/python3/dist-packages/ontospy/ontodocs/media/static/libs/bootstrap
/usr/share/javascript/bootswatch /usr/lib/python3/dist-packages/ontospy/ontodocs/media/static/libs/bootswatch
/usr/share/javascript/chartjs /usr/lib/python3/dist-packages/ontospy/ontodocs/media/static/libs/chartjs
/usr/share/javascript/d3 /usr/lib/python3/dist-packages/ontospy/ontodocs/media/static/libs/d3
/usr/share/javascript/jquery /usr/lib/python3/dist-packages/ontospy/ontodocs/media/static/libs/jquery
......@@ -2,48 +2,45 @@
include /usr/share/dpkg/pkg-info.mk
# resolve if release is experimental
EXP_RELEASE = $(filter experimental% UNRELEASED,$(DEB_DISTRIBUTION))
destdir = debian/tmp
cmd = ontospy
python3path = $(destdir)/usr/lib/$(shell py3versions -d)/dist-packages
python3path_build = .pybuild/cpython3_$(shell py3versions -dv)/build
path_build = build/scripts-$(shell py3versions -dv):$(PATH)
_ENV = $(strip \
PATH="$(CURDIR)/debian/tmp/usr/bin:$(PATH)" \
PYTHONPATH="$(CURDIR)/debian/tmp/usr/lib/$(shell py3versions -d)/dist-packages")
# generate manpage with help2man from --help option of python script
_mkman = PYTHONPATH=$(python3path) \
_mkman = $(_ENV) \
help2man $(patsubst %,--name %,$3) --no-info --version-string $(DEB_VERSION_UPSTREAM) --output $2 $1 \
|| { PYTHONPATH=$(python3path) $1 --help; false; }
# generate shell completion scripts
override_dh_auto_build:
dh_auto_build
PATH="$(path_build)" PYTHONPATH="$(python3path_build)" \
_ONTOSPY_COMPLETE=source $(cmd) \
> debian/bash-completion || true
PATH="$(path_build)" PYTHONPATH="$(python3path_build)" \
_ONTOSPY_COMPLETE=source_zsh $(cmd) \
> debian/_$(cmd) || true
|| { $(_ENV) $1 --help; false; }
# check shell script
# * try but distrust upstream testsuite
override_dh_auto_test:
dh_auto_test $(if $(EXP_RELEASE), || true)
shellcheck --shell bash --exclude=SC2086,SC2206,SC2207,SC2235 \
debian/bash-completion
dh_auto_test --buildsystem=pybuild || true
# generate manpage based on --help option of script itself
# * generate manpage based on --help option of script itself
# * generate shell completion scripts
# TODO: run package testsuite during build
# TODO: generate files during build
override_dh_auto_install:
dh_auto_install
$(call _mkman, $(destdir)/usr/bin/$(cmd), debian/$(cmd).1, \
dh_auto_install --buildsystem=pybuild
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
$(_ENV) prove debian/tests/*.t
endif
$(_ENV) _ONTOSPY_COMPLETE=source $(cmd) \
> debian/bash-completion || true
test -s debian/bash-completion
$(_ENV) _ONTOSPY_COMPLETE=source_zsh $(cmd) \
> debian/_$(cmd) || true
test -s debian/_$(cmd)
$(call _mkman, $(cmd), debian/$(cmd).1, \
command-line tool to inspect and visualize RDF models)
find $(destdir)/usr/lib -name '*.pyc' -delete
find $(destdir)/usr/lib -type d -empty -delete
%:
dh $@ --with python3,bash-completion --buildsystem=pybuild
find debian/tmp/usr/lib -name '*.pyc' -delete
find debian/tmp/usr/lib -type d -empty -delete
# unset bogus executable bits
override_dh_fixperms:
dh_fixperms
chmod --recursive a-x,a+X -- debian/*/usr/lib
%:
dh $@ --with python3,bash-completion --buildsystem=pybuild
Test-Command: prove debian/tests/*.t
Depends:
figlet,
libfile-homedir-perl,
libtest-command-simple-perl,
libtest-expect-perl,
libtest-tempdir-tiny-perl,
perl,
toilet-fonts,
@,
Test-Command: prove debian/tests/sharedlibs/*.t
Depends:
libfile-homedir-perl,
libtest-command-simple-perl,
libtest-tempdir-tiny-perl,
perl,
@,
Test-Command: EXTENDED_TESTING=1 prove debian/tests/net/*.t
Restrictions: flaky
Depends:
libfile-homedir-perl,
libtest-command-simple-perl,
libtest-tempdir-tiny-perl,
perl,
......
use strict;
use warnings;
use Test::More;
use File::HomeDir::Test;
use File::HomeDir;
use File::Path qw(make_path);
use Test::TempDir::Tiny;
use Test::Command::Simple;
# network access may be absent or unreliable
plan skip_all => 'network test skipped when EXTENDED_TESTING is unset'
unless ($ENV{EXTENDED_TESTING});
my @CMD = qw/ontospy gendocs/;
my $CMD = join ' ', @CMD;
ok $ENV{HOME} = File::HomeDir->my_home, 'create fake $HOME';
ok make_path "$ENV{HOME}/.ontospy/models", 'create $HOME/.ontospy/models';
in_tempdir "gendocs network" => sub {
run_ok @CMD, qw(--type 1 http://xmlns.com/foaf/spec/);
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
};
done_testing;
use strict;
use warnings;
use Test::More;
use File::HomeDir::Test;
use File::HomeDir;
use File::Path qw(make_path);
use Test::TempDir::Tiny;
use Test::Command::Simple;
# network access may be absent or unreliable
plan skip_all => 'network test skipped when EXTENDED_TESTING is unset'
unless ($ENV{EXTENDED_TESTING});
my @CMD = qw/ontospy lib/;
my $CMD = join ' ', @CMD;
ok $ENV{HOME} = File::HomeDir->my_home, 'create fake $HOME';
ok make_path "$ENV{HOME}/.ontospy/models", 'create $HOME/.ontospy/models';
in_tempdir "lib bootstrap" => sub {
run_ok 'sh', '-c', "yes | $CMD --bootstrap";
like stdout, qr/The following ontologies will be imported/, 'Testing stdout';
like stderr, qr/Bootstrap command completed/, 'Testing stderr';
};
done_testing;
use strict;
use warnings;
use Test::More;
use Test::Command::Simple;
use Cwd qw(cwd);
use File::HomeDir::Test;
use File::HomeDir;
use File::Path qw(make_path);
use Test::TempDir::Tiny;
my @CMD = qw/ontospy gendocs/;
my $CMD = join ' ', @CMD;
run_ok @CMD;
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok @CMD, '--help';
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
my $FOAF = 'file://' . cwd . '/ontospy/tests/rdf/foaf.rdf';
ok $ENV{HOME} = File::HomeDir->my_home, 'create fake $HOME';
ok make_path "$ENV{HOME}/.ontospy/models", 'create $HOME/.ontospy/models';
in_tempdir "gendocs" => sub {
run_ok @CMD, qw(--type 1), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
run_ok @CMD, qw(--type 3), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
};
done_testing;
use strict;
use warnings;
use Test::More;
use Test::Command::Simple;
my @CMD = qw/ontospy lib/;
my $CMD = join ' ', @CMD;
run_ok @CMD;
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok @CMD, '--help';
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
done_testing;
use strict;
use warnings;
use Test::More;
use Test::Command::Simple;
my @CMD = qw/ontospy scan/;
my $CMD = join ' ', @CMD;
run_ok @CMD;
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok @CMD, '--help';
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
done_testing;
use strict;
use warnings;
use Test::More;
use Test::Command::Simple;
my @CMD = qw/ontospy ser/;
my $CMD = join ' ', @CMD;
run_ok @CMD;
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok @CMD, '--help';
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
done_testing;
use strict;
use warnings;
use Test::More;
use Test::Command::Simple;
use File::HomeDir::Test;
use File::HomeDir;
use File::Path qw(make_path);
use Test::TempDir::Tiny;
use Test::Expect;
my @CMD = qw/ontospy shell/;
my $CMD = join ' ', @CMD;
run_ok @CMD, '--help';
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
ok $ENV{HOME} = File::HomeDir->my_home, 'create fake $HOME';
ok make_path "$ENV{HOME}/.ontospy/models", 'create $HOME/.ontospy/models';
in_tempdir "shell" => sub {
expect_run(
command => [@CMD],
prompt => [ -re => 'Ontospy\]\S+>\s+' ],
quit => 'quit',
);
expect_send('help', 'request help');
expect_like(qr/Commands available/, 'expect help');
expect_send('help foo', 'request help on foo');
expect_like(qr/No help on foo/, 'expect no help on foo');
expect_send('help help', 'request help on help');
expect_like(qr/List available commands with "help" or detailed help with "help cmd"/, 'expect help on help');
expect_send('info', 'request info');
expect_like(qr/No graph selected/, 'expect no info');
expect_quit;
};
done_testing;
use strict;
use warnings;
use Test::More;
use Test::Command::Simple;
my @CMD = qw/ontospy utils/;
my $CMD = join ' ', @CMD;
run_ok @CMD;
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok @CMD, '--help';
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
done_testing;
......@@ -6,32 +6,12 @@ use Test::Command::Simple;
my $CMD = 'ontospy';
run_ok $CMD, qw/--help/;
run_ok $CMD;
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok $CMD, qw/scan --help/;
like stdout, qr/Usage: $CMD scan/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok $CMD, qw/gendocs --help/;
like stdout, qr/Usage: $CMD gendocs/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok $CMD, qw/lib --help/;
like stdout, qr/Usage: $CMD lib/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok $CMD, qw/shell --help/;
like stdout, qr/Usage: $CMD shell/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok $CMD, qw/ser --help/;
like stdout, qr/Usage: $CMD ser/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
run_ok $CMD, qw/utils --help/;
like stdout, qr/Usage: $CMD utils/, 'Testing stdout';
run_ok $CMD, '--help';
like stdout, qr/Usage: $CMD/, 'Testing stdout';
cmp_ok stderr, 'eq', '', 'Testing stderr';
done_testing;
use strict;
use warnings;
use Test::More;
use Test::Command::Simple;
use Cwd qw(cwd);
use File::HomeDir::Test;
use File::HomeDir;
use File::Path qw(make_path);
use Test::TempDir::Tiny;
my @CMD = qw/ontospy gendocs/;
my $CMD = join ' ', @CMD;
my $FOAF = 'file://' . cwd . '/ontospy/tests/rdf/foaf.rdf';
ok $ENV{HOME} = File::HomeDir->my_home, 'create fake $HOME';
ok make_path "$ENV{HOME}/.ontospy/models", 'create $HOME/.ontospy/models';
in_tempdir "gendocs sharedlibs" => sub {
run_ok @CMD, qw(--type 2), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
run_ok @CMD, qw(--type 4), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
run_ok @CMD, qw(--type 5), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
run_ok @CMD, qw(--type 6), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
run_ok @CMD, qw(--type 7), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
run_ok @CMD, qw(--type 8), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
run_ok @CMD, qw(--type 9), $FOAF;
like stdout, qr/Loading graph.*\nBuilding visualization/, 'Testing stdout';
like stderr, qr(^Done\.), 'Testing stderr';
};
done_testing;