Skip to content

Commit

Permalink
Merge pull request #161 from AKSW/feature/graphConfigPerCommit
Browse files Browse the repository at this point in the history
Add support of new files/graphs via Insert Data/Insert Where/Insert Delete Where
  • Loading branch information
white-gecko authored Oct 29, 2018
2 parents 5adf29d + 7b3fcdc commit 5b5a556
Show file tree
Hide file tree
Showing 10 changed files with 854 additions and 674 deletions.
21 changes: 10 additions & 11 deletions quit/application.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import argparse
import sys
import os
from quit.conf import Feature, QuitConfiguration
from quit.conf import Feature, QuitStoreConfiguration
from quit.exceptions import InvalidConfigurationError
import rdflib.plugins.sparql
from rdflib.plugins.sparql.algebra import SequencePath
Expand Down Expand Up @@ -98,11 +98,10 @@ def sequencePathCompareGt(self, other):
'quit.plugins.serializers.results.htmlresults', 'HTMLResultSerializer')

try:
config = QuitConfiguration(
config = QuitStoreConfiguration(
configfile=args.configfile,
targetdir=args.targetdir,
repository=args.repourl,
configmode=args.configmode,
upstream=args.repourl,
features=args.features,
namespace=args.namespace,
)
Expand All @@ -111,19 +110,15 @@ def sequencePathCompareGt(self, other):
sys.exit('Exiting quit')

# since repo is handled, we can add graphs to config
config.initgraphconfig()

logger.info('QuitStore successfully running.')
logger.info('Known graphs: ' + str(config.getgraphs()))
logger.info('Known files: ' + str(config.getfiles()))
logger.info('QuitStore Configuration initialized.')
logger.debug('Path of Gitrepo: ' + config.getRepoPath())
logger.debug('Config mode: ' + str(config.getConfigMode()))
logger.debug('All RDF files found in Gitepo:' + str(config.getgraphsfromdir()))

return {'config': config}


class FeaturesAction(argparse.Action):
"""Actions that are executied for the configuration passed with the `--feature` option."""
CHOICES = {
'provenance': Feature.Provenance,
'persistence': Feature.Persistence,
Expand All @@ -145,7 +140,11 @@ def __call__(self, parser, namespace, values, option_string=None):


def parseArgs(args):
"""Parse command line arguments."""
"""Parse command line arguments.
Returns:
parsed object representing the config arguments.
"""
basepathhelp = "Base path (aka. application root) (WSGI only)."
graphhelp = """This option tells QuitStore how to map graph files and named graph URIs:
"localconfig" - Use the given local file for graph settings.
Expand Down
Loading

0 comments on commit 5b5a556

Please sign in to comment.