diff -Nru ontospy-0~20190225~dfsg1/config.ini ontospy-1.9.8.3~dfsg/config.ini --- ontospy-0~20190225~dfsg1/config.ini 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/config.ini 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -[models] -dir = /Users/michele.pasin/.ontospy/models/ - diff -Nru ontospy-0~20190225~dfsg1/debian/changelog ontospy-1.9.8.3~dfsg/debian/changelog --- ontospy-0~20190225~dfsg1/debian/changelog 2019-02-26 12:06:35.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/debian/changelog 2019-09-04 09:42:57.000000000 +0000 @@ -1,3 +1,17 @@ +ontospy (1.9.8.3~dfsg-1) unstable; urgency=medium + + [ upstream ] + * New release. + + [ Jonas Smedegaard ] + * Update watch file: + + Use github pattern (upstream tags releases now). + + Relax to use unversioned repackaging suffix. + * Declare compliance with Debian Policy 4.4.0. + * Drop patch 1001: Fixed upstream. + + -- Jonas Smedegaard Wed, 04 Sep 2019 11:42:57 +0200 + ontospy (0~20190225~dfsg1-1) unstable; urgency=medium [ upstream ] diff -Nru ontospy-0~20190225~dfsg1/debian/control ontospy-1.9.8.3~dfsg/debian/control --- ontospy-0~20190225~dfsg1/debian/control 2019-02-23 10:47:55.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/debian/control 2019-09-04 09:38:40.000000000 +0000 @@ -33,7 +33,7 @@ python3-setuptools, python3-sparqlwrapper, toilet-fonts , -Standards-Version: 4.3.0 +Standards-Version: 4.4.0 Vcs-Git: https://salsa.debian.org/debian/ontospy.git Vcs-Browser: https://salsa.debian.org/debian/ontospy Homepage: https://lambdamusic.github.io/Ontospy/ diff -Nru ontospy-0~20190225~dfsg1/debian/copyright_hints ontospy-1.9.8.3~dfsg/debian/copyright_hints --- ontospy-0~20190225~dfsg1/debian/copyright_hints 2019-02-26 12:06:31.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/debian/copyright_hints 2019-09-04 09:41:27.000000000 +0000 @@ -15,7 +15,6 @@ debian/ontospy.bash-completion debian/ontospy.install debian/ontospy.manpages - debian/patches/1001_fix_syntax_error.patch debian/patches/1003_template_paths.patch debian/patches/1004_library_paths.patch debian/patches/2001_privacy.patch diff -Nru ontospy-0~20190225~dfsg1/debian/patches/1001_fix_syntax_error.patch ontospy-1.9.8.3~dfsg/debian/patches/1001_fix_syntax_error.patch --- ontospy-0~20190225~dfsg1/debian/patches/1001_fix_syntax_error.patch 2019-01-31 23:03:09.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/debian/patches/1001_fix_syntax_error.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -Description: Fix syntax errors -Author: Jonas Smedegaard -Last-Update: 2019-01-31 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/ontospy/extras/dbpedia.py -+++ b/ontospy/extras/dbpedia.py -@@ -98,10 +98,10 @@ - - if len(args) > 0: #dont take no args - parser.print_help() -- raise SystemExit, 1 -+ raise SystemExit(1) - if not (opts.query or opts.describe or opts.alltriples or opts.ontology): - parser.print_help() -- raise SystemExit, 1 -+ raise SystemExit(1) - return opts, args - - -@@ -161,7 +161,7 @@ - try: - main() - sys.exit(0) -- except KeyboardInterrupt, e: # Ctrl-C -+ except KeyboardInterrupt as e: # Ctrl-C - raise e - - ---- a/ontospy/extras/sparqlpy.py -+++ b/ontospy/extras/sparqlpy.py -@@ -268,7 +268,7 @@ - - if len(args) < 1: - parser.print_help() -- raise SystemExit, 1 -+ raise SystemExit(1) - - return opts, args - -@@ -332,5 +332,5 @@ - try: - main() - sys.exit(0) -- except KeyboardInterrupt, e: # Ctrl-C -+ except KeyboardInterrupt as e: # Ctrl-C - raise e diff -Nru ontospy-0~20190225~dfsg1/debian/patches/series ontospy-1.9.8.3~dfsg/debian/patches/series --- ontospy-0~20190225~dfsg1/debian/patches/series 2019-02-26 12:05:29.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/debian/patches/series 2019-09-04 09:40:34.000000000 +0000 @@ -1,4 +1,3 @@ -1001_fix_syntax_error.patch 1003_template_paths.patch 1004_library_paths.patch 2001_privacy.patch diff -Nru ontospy-0~20190225~dfsg1/debian/rules ontospy-1.9.8.3~dfsg/debian/rules --- ontospy-0~20190225~dfsg1/debian/rules 2019-02-11 20:05:26.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/debian/rules 2019-05-22 19:49:05.000000000 +0000 @@ -2,6 +2,8 @@ include /usr/share/dpkg/pkg-info.mk +DH_OPTIONS = -O--buildsystem=pybuild + cmd = ontospy _ENV = $(strip \ PATH="$(CURDIR)/debian/tmp/usr/bin:$(PATH)" \ @@ -15,14 +17,14 @@ # check shell script # * try but distrust upstream testsuite override_dh_auto_test: - dh_auto_test --buildsystem=pybuild || true + dh_auto_test || true # * 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 --buildsystem=pybuild + dh_auto_install ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) $(_ENV) prove debian/tests/*.t endif @@ -43,4 +45,4 @@ chmod --recursive a-x,a+X -- debian/*/usr/lib %: - dh $@ --with python3,bash-completion --buildsystem=pybuild + dh $@ --with python3,bash-completion $(DH_OPTIONS:-O%=%) diff -Nru ontospy-0~20190225~dfsg1/debian/watch ontospy-1.9.8.3~dfsg/debian/watch --- ontospy-0~20190225~dfsg1/debian/watch 2019-02-11 22:05:44.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/debian/watch 2019-09-04 09:35:06.000000000 +0000 @@ -3,6 +3,7 @@ # update: gbp import-orig --upstream-vcs-tag=vX.Y.Z --uscan opts=\ -mode=git,pgpmode=none,pretty=0~%cd,\ -dversionmangle=s/[~+](dfsg|ds)\d*$//,repacksuffix=~dfsg1 \ -https://github.com/lambdamusic/Ontospy HEAD +filenamemangle=s/.*?(@ANY_VERSION@@ARCHIVE_EXT@)/@PACKAGE@-$1/,\ +dversionmangle=s/[~+](dfsg|ds)\d*$//,repacksuffix=~dfsg \ +https://github.com/lambdamusic/Ontospy/tags \ +.*?@ANY_VERSION@@ARCHIVE_EXT@ diff -Nru ontospy-0~20190225~dfsg1/docs/index.md ontospy-1.9.8.3~dfsg/docs/index.md --- ontospy-0~20190225~dfsg1/docs/index.md 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/docs/index.md 2019-07-28 10:07:51.000000000 +0000 @@ -44,27 +44,38 @@ - Python (3.x) - A python package manager: [setuptools](https://pypi.python.org/pypi/setuptools) or [pip](https://pip.pypa.io/en/stable/installing/). -**Full Version** +Once you have a package manager installed, simply install Ontospy from the Python Package Index. There are three library versions you can choose from. -Once you have a package manager installed, get Ontospy from the Python Package Index. +**Lightweight Version** -If you want to use ontospy to automatically create some [HTML documentation](<(#generating-ontology-documentation)>) for an ontology, you want to install the FULL version of the library like this: +If you want less library dependencies (eg because you want to include Ontospy in another project and don't care about html documentation), you can simply install the core library only: ``` -$ pip install ontospy[FULL] +$ pip install ontospy ``` -The full version includes more files (eg html templates) and it has a larger footprint as it relies on Django and other libraries. +The python library, its dependencies and all of its command-line executables will be installed. The only thing which is left out is the documentation-generation feature. -**Lightweight Version** +**Lightweight Version plus Shell** -If you want less library dependencies (eg because you want to include Ontospy in another project and don't care about html documentation), you can simply install the core library only: +The 'shell' or interactive command line interface requires the [readline](https://pypi.org/project/readline/) module, a set of functions for use by applications that allow users to edit command lines as they are typed in. + +This module is optionally installed with Ontospy like this: ``` -$ pip install ontospy +$ pip install ontospy[SHELL] ``` -The python library, its dependencies and all of its command-line executables will be installed. The only thing which is left out is the documentation-generation feature. +**Full Version** + +If you want to use ontospy to automatically create some [HTML documentation](<(#generating-ontology-documentation)>) for an ontology, you should install the FULL version of the library like this: + +``` +$ pip install ontospy[FULL] +``` + +The full version includes more files (eg html templates) and it has a larger footprint as it relies on Django and other libraries. + **Upgrading** diff -Nru ontospy-0~20190225~dfsg1/docs/pages/changelog.md ontospy-1.9.8.3~dfsg/docs/pages/changelog.md --- ontospy-0~20190225~dfsg1/docs/pages/changelog.md 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/docs/pages/changelog.md 2019-07-28 10:07:51.000000000 +0000 @@ -2,20 +2,26 @@ Summary of changes. +## July, 2019: v1.9.8.3 + +- `gendocs` option: `no browser` prevents opening html viz in browser +- `gendocs -l` added as shortcut of `--lib` + + ## December, 2018: v1.9.8.1 - ad hoc ordering of commands -- examine becomes scan +- examine becomes `scan` ## December, 2018: v1.9.8 - small bug fixes - refactor action visualize / activated 'alpha' dataviz - allow to pass viztype from command line -- implicit/explicit classes and predicates switch '-x' +- implicit/explicit classes and predicates switch `-x` - this is useful to inspect a small RDF snippet for example too see what predicates are being used -- option to show raw RDF data (-r) -- improvements to shell command +- option to show raw RDF data `-r` +- improvements to `shell` command - namespaces printed out by default ## December, 2018: v1.9.7 @@ -25,8 +31,8 @@ - comments all go to sterr by default => eg now easier to to `ontospy serialize foaf.rdf json-ld > ~/foaf.json` - embedded ontodocs plugin within main source code - - requires install with [HTML] flag -- 'utils' and 'quickdocs' commands added to CLI + - requires install with `[HTML]` flag +- `utils` and `quickdocs` commands added to CLI - CLI: all commands when called default to HELP - fix bug for retrieving ontologies from online repos @@ -46,7 +52,7 @@ ## September 10, 2018: v1.9.5 -- testjsonld command: util to send a jsonld file to https://json-ld.org/playground/ +- `testjsonld` command: util to send a jsonld file to https://json-ld.org/playground/ ## August 30, 2018: v1.9.4 @@ -131,7 +137,7 @@ ## March 17, 2017 - wiki online -- removed dependency on readline +- removed dependency on readline for non-shell usage - version 1.7.6 published ## February 27, 2017 diff -Nru ontospy-0~20190225~dfsg1/ontospy/cli.py ontospy-1.9.8.3~dfsg/ontospy/cli.py --- ontospy-0~20190225~dfsg1/ontospy/cli.py 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/ontospy/cli.py 2019-07-28 10:07:51.000000000 +0000 @@ -167,6 +167,11 @@ @main_cli.command() @click.argument('source', nargs=-1) @click.option( + '-l', + '--lib', + is_flag=True, + help='LIBRARY: choose an ontology from your local library.') +@click.option( '--outputpath', '-o', help= @@ -190,12 +195,12 @@ @click.option( '--theme', help= - 'THEME: bootstrap css style for the html-multi-page visualization (random=use a random theme).' + 'THEME: select bootstrap style (only for the html-multi-page visualization). Default: simplex (random=use a random theme).' ) @click.option( - '--lib', + '--nobrowser', is_flag=True, - help='LIBRARY: choose an ontology from the local library.') + help="NO-BROWSER: prevents opening the html output in the browser by default.") @click.option( '--showtypes', is_flag=True, @@ -206,13 +211,14 @@ help='SHOW-THEMES: show the available css theme choices.') @click.pass_context def gendocs(ctx, + lib=False, source=None, outputpath="", extra=False, - lib=False, type="", title="", theme="", + nobrowser=False, showthemes=False, showtypes=False): """GENDOCS: generate documentation in html or markdown format. @@ -279,7 +285,7 @@ theme=theme, verbose=verbose) - if url: # open browser + if url and (not nobrowser): # open browser import webbrowser webbrowser.open(url) @@ -430,7 +436,7 @@ ## -## SHELL COMMAN/' +## SHELL COMMAND' ## diff -Nru ontospy-0~20190225~dfsg1/ontospy/extras/dbpedia.py ontospy-1.9.8.3~dfsg/ontospy/extras/dbpedia.py --- ontospy-0~20190225~dfsg1/ontospy/extras/dbpedia.py 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/ontospy/extras/dbpedia.py 2019-07-28 10:07:51.000000000 +0000 @@ -98,10 +98,10 @@ if len(args) > 0: #dont take no args parser.print_help() - raise SystemExit, 1 + raise SystemExit(1) if not (opts.query or opts.describe or opts.alltriples or opts.ontology): parser.print_help() - raise SystemExit, 1 + raise SystemExit(1) return opts, args @@ -161,7 +161,7 @@ try: main() sys.exit(0) - except KeyboardInterrupt, e: # Ctrl-C + except KeyboardInterrupt as e: # Ctrl-C raise e diff -Nru ontospy-0~20190225~dfsg1/ontospy/extras/hacks/click_example.py ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/click_example.py --- ontospy-0~20190225~dfsg1/ontospy/extras/hacks/click_example.py 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/click_example.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -# !/usr/bin/env python -# -*- coding: UTF-8 -*- - - -# -# BEGINNING TO USE CLICK TO DO A LAUNCHER FOR ONTOSPY-VIZ -# - -""" -ONTOSPY -Copyright (c) __Michele Pasin__ . -All rights reserved. - -Run it from the command line by passing it an ontology URI, -or check out the help: - ->>> ontospy-viz -h - -More info in the README file. - -""" - -import sys, os, time, os.path, webbrowser - -from . import * # imports __init__ -from ._version import * -# from .actions import * -from .viz.builder import action_visualize -from .core.ontospy import Ontospy - -from .core.utils import * - -import click - - -@click.command() -def hello(): - """"http://click.pocoo.org/5/ - http://click.pocoo.org/5/api/ - """ - click.clear() - click.secho('Hello World!', fg='green') - click.secho('Some more text', bg='blue', fg='white') - click.secho('ATTENTION', blink=True, bold=True) - - click.echo('Continue? [yn] ', nl=False) - c = click.getchar() - click.echo() - if c == 'y': - click.echo('We will go on') - elif c == 'n': - click.echo('Abort!') - else: - click.echo('Invalid input :(') - click.echo_via_pager('\n'.join('Line %d' % idx - for idx in range(200))) - - -@click.command() -@click.option('--uri', help='URI of ontology graph.') -@click.option('--outputpath', default="", prompt='The output path', help='The output path.') -@click.option('--gist', default=False, help='Save as gist.') -def main(uri, outputpath, gist): - - # select a model from the local ontologies - - # if opts._gist and not opts._export: - # printDebug("WARNING: the -g option must be used in combination with -e (=export)") - # sys.exit(0) - - if outputpath: - if not(os.path.exists(outputpath)) or not (os.path.isdir(outputpath)): - click.secho("WARNING: not a valid directory path.", bg='blue', fg='white') - sys.exit(0) - - url = action_visualize([uri], gist, False, outputpath) - if url:# open browser - webbrowser.open(url) - - # continue and print(timing at bottom ) - # ... - - - -if __name__ == '__main__': - try: - main() - sys.exit(0) - except KeyboardInterrupt as e: # Ctrl-C - raise e diff -Nru ontospy-0~20190225~dfsg1/ontospy/extras/hacks/pptoolkit.py ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/pptoolkit.py --- ontospy-0~20190225~dfsg1/ontospy/extras/hacks/pptoolkit.py 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/pptoolkit.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -""" -Summary - -test of https://github.com/jonathanslenders/python-prompt-toolkit - -HowTo - ->python -m ontospy.hacks.pptoolkit - - -""" - -from __future__ import unicode_literals -from __future__ import print_function -from prompt_toolkit import prompt -from prompt_toolkit.styles import style_from_dict -from prompt_toolkit.token import Token - -from .. import main -from .. import VERSION -from ..core.ontospy import Ontospy -from ..core.utils import * - - -test_style = style_from_dict({ - Token.Toolbar: '#ffffff bg:#333333', -}) - - -def main(): - def get_bottom_toolbar_tokens(cli): - print(cli.__class__) - print(cli.current_buffer_name) - return [(Token.Toolbar, ' Ontospy ' + VERSION.VERSION)] - - text = prompt('Say something: ', - get_bottom_toolbar_tokens=get_bottom_toolbar_tokens, - style=test_style) - print('You said: %s' % text) - - -if __name__ == '__main__': - main() Binary files /tmp/tmpEPlzRc/ebLVkjAGvW/ontospy-0~20190225~dfsg1/ontospy/extras/hacks/sounds/fx_bleep1.wav and /tmp/tmpEPlzRc/VDfIJ72sk4/ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/sounds/fx_bleep1.wav differ Binary files /tmp/tmpEPlzRc/ebLVkjAGvW/ontospy-0~20190225~dfsg1/ontospy/extras/hacks/sounds/fx_bleep2.wav and /tmp/tmpEPlzRc/VDfIJ72sk4/ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/sounds/fx_bleep2.wav differ Binary files /tmp/tmpEPlzRc/ebLVkjAGvW/ontospy-0~20190225~dfsg1/ontospy/extras/hacks/sounds/fx_bleeps.wav and /tmp/tmpEPlzRc/VDfIJ72sk4/ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/sounds/fx_bleeps.wav differ Binary files /tmp/tmpEPlzRc/ebLVkjAGvW/ontospy-0~20190225~dfsg1/ontospy/extras/hacks/sounds/ohh1.wav and /tmp/tmpEPlzRc/VDfIJ72sk4/ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/sounds/ohh1.wav differ Binary files /tmp/tmpEPlzRc/ebLVkjAGvW/ontospy-0~20190225~dfsg1/ontospy/extras/hacks/sounds/ohh2.wav and /tmp/tmpEPlzRc/VDfIJ72sk4/ontospy-1.9.8.3~dfsg/ontospy/extras/hacks/sounds/ohh2.wav differ diff -Nru ontospy-0~20190225~dfsg1/ontospy/extras/sparqlpy.py ontospy-1.9.8.3~dfsg/ontospy/extras/sparqlpy.py --- ontospy-0~20190225~dfsg1/ontospy/extras/sparqlpy.py 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/ontospy/extras/sparqlpy.py 2019-07-28 10:07:51.000000000 +0000 @@ -268,7 +268,7 @@ if len(args) < 1: parser.print_help() - raise SystemExit, 1 + raise SystemExit(1) return opts, args @@ -332,5 +332,5 @@ try: main() sys.exit(0) - except KeyboardInterrupt, e: # Ctrl-C + except KeyboardInterrupt as e: # Ctrl-C raise e diff -Nru ontospy-0~20190225~dfsg1/ontospy/VERSION.py ontospy-1.9.8.3~dfsg/ontospy/VERSION.py --- ontospy-0~20190225~dfsg1/ontospy/VERSION.py 2019-02-25 21:58:33.000000000 +0000 +++ ontospy-1.9.8.3~dfsg/ontospy/VERSION.py 2019-07-28 10:07:51.000000000 +0000 @@ -8,7 +8,7 @@ # note: 1.8 major update with ontodocs split ################## -__version__ = "1.9.8.2" # Pypi latest: https://pypi.org/project/ontospy/ +__version__ = "1.9.8.3" # Pypi latest: https://pypi.org/project/ontospy/ __copyright__ = "CopyRight (C) 2015-2018 by Michele Pasin" __license__ = "GNU"