<commit_before># Copyright  2015, Province of British Columbia
# License: https://github.com/bcgov/ckanext-bcgov/blob/master/license

#Author : <NAME>, Highway Three Solutions  Inc.
#Date created : January 29 2014
#Last modified on January 29 2014

from ckan import model
from ckan.lib.cli import CkanCommand
from ckan.logic import get_action, NotFound

import logging
import os
import sys
import json
import pprint
import inspect
import ckan.lib.base as base
_ = base._

import ckan.plugins as plugins

log = logging.getLogger()


class EdcCommand(CkanCommand):
    '''
    This class contains commnds for creating special vocabularies and tags
    required for EDC-Dataset manipulation

    Commands:
        create-all-vocabs   Create all vocabularies
        delete-all-vocabs   Delete all vocabularies
        create-all-orgs     Create all organizations
        delete-all-orgs     Delete all organizations
        purge-records       Purge all already-deleted datasets
        purge-revisions     Purge all already-deleted revisions
    '''
    summary = __doc__.split('\n')[0]
    usage = __doc__

    module = __import__('ckanext.bcgov', fromlist=[''])
    default_data_dir = os.path.join(
        os.path.dirname(inspect.getfile(module)),
        'scripts/data'
        )
    default_vocab_file = os.path.join(default_data_dir, 'edc-vocabs.json')
    default_org_file =   os.path.join(default_data_dir, 'orgs.json')
    import pdb; pdb.set_trace()

    def command(self):
        '''
        Parse command line arguments and call appropriate method.
        '''
        if not self.args or self.args[0] in ['--help', '-h', 'help']:
            print EdcCommand.__doc__
            return
<commit_msg>remove debug<commit_after># Copyright  2015, Province of British Columbia
# License: https://github.com/bcgov/ckanext-bcgov/blob/master/license

#Author : <NAME>, Highway Three Solutions  Inc.
#Date created : January 29 2014
#Last modified on January 29 2014

from ckan import model
from ckan.lib.cli import CkanCommand
from ckan.logic import get_action, NotFound

import logging
import os
import sys
import json
import pprint
import inspect
import ckan.lib.base as base
_ = base._

import ckan.plugins as plugins

log = logging.getLogger()


class EdcCommand(CkanCommand):
    '''
    This class contains commnds for creating special vocabularies and tags
    required for EDC-Dataset manipulation

    Commands:
        create-all-vocabs   Create all vocabularies
        delete-all-vocabs   Delete all vocabularies
        create-all-orgs     Create all organizations
        delete-all-orgs     Delete all organizations
        purge-records       Purge all already-deleted datasets
        purge-revisions     Purge all already-deleted revisions
    '''
    summary = __doc__.split('\n')[0]
    usage = __doc__

    module = __import__('ckanext.bcgov', fromlist=[''])
    default_data_dir = os.path.join(
        os.path.dirname(inspect.getfile(module)),
        'scripts/data'
        )
    default_vocab_file = os.path.join(default_data_dir, 'edc-vocabs.json')
    default_org_file =   os.path.join(default_data_dir, 'orgs.json')

    def command(self):
        '''
        Parse command line arguments and call appropriate method.
        '''
        if not self.args or self.args[0] in ['--help', '-h', 'help']:
            print EdcCommand.__doc__
            return

{'fraction_non_alphanumeric': 0.08857395925597875, 'fraction_numerical': 0.010628875110717449, 'mean_word_length': 2.9212962962962963, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5309791', 'n_tokens_mistral': 1049, 'n_tokens_neox': 1010, 'n_words': 292}