Permalink
Browse files

Changes for deployment

  • Loading branch information...
joachimmetz committed May 22, 2017
1 parent 668b7f7 commit 3efd542df75ca721531baeceea2916fa0a49840e
View
@@ -1,12 +1,13 @@
include ACKNOWLEDGEMENTS AUTHORS LICENSE README
include dependencies.ini run_tests.py utils/dependencies.py
recursive-include config *
recursive-include data *
recursive-include test_data *
exclude .gitignore
exclude *.pyc
recursive-exclude artifacts *.pyc
recursive-include config *
recursive-include definitions *.yaml
recursive-include tools *.py
recursive-exclude tools *.pyc
recursive-exclude artifacts *.pyc
# The test scripts are not required in a binary distribution package they
# are considered source distribution files and excluded in find_package()
# in setup.py.
View
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
"""ForensicArtifacts.com Artifact Repository."""
__version__ = '20170521'
__version__ = '20170522'
View
@@ -3,7 +3,6 @@
from artifacts import errors
from artifacts import registry
from artifacts import source_type
class ArtifactDefinition(object):
@@ -1 +1 @@
definitions/* usr/share/artifacts
data/* usr/share/artifacts
View
@@ -2,4 +2,4 @@ artifacts (20170513-1) unstable; urgency=low
* Auto-generated
-- Forensic artifacts <forensicartifacts@googlegroups.com> Sat, 13 May 2017 18:57:04 +0200
-- Forensic artifacts <forensicartifacts@googlegroups.com> Mon, 22 May 2017 12:31:38 +0200
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -200,7 +200,7 @@ Currently the following different source types are defined:
|===
The sources types are defined in
link:https://github.com/ForensicArtifacts/artifacts/blob/master/artifacts/definitions.py[definitions.py]
link:https://github.com/ForensicArtifacts/artifacts/blob/master/artifacts/definitions.py[definitions.py].
as TYPE_INDICATOR constants.
=== Artifact group source
View
@@ -126,7 +126,7 @@ def _make_spec_file(self):
packages=find_packages('.', exclude=[u'tests', u'tests.*', u'tools']),
package_dir={'artifacts': 'artifacts'},
data_files=[
('share/artifacts', glob.glob(os.path.join('definitions', '*'))),
('share/artifacts', glob.glob(os.path.join('data', '*'))),
],
install_requires=[
'PyYAML >= 3.11',
View
@@ -275,8 +275,9 @@ def testReadYamlFile(self):
def testReadDirectory(self):
"""Tests the ReadDirectory function."""
artifact_reader = reader.YamlArtifactsReader()
test_file = self._GetTestFilePath(['.'])
artifact_definitions = list(artifact_reader.ReadDirectory('test_data'))
artifact_definitions = list(artifact_reader.ReadDirectory(test_file))
self.assertEqual(len(artifact_definitions), 7)
@@ -296,7 +297,7 @@ def testDefinitionsAsDict(self):
"""Tests the AsDict function."""
artifact_reader = reader.YamlArtifactsReader()
artifact_definitions = list(artifact_reader.ReadDirectory('definitions'))
artifact_definitions = list(artifact_reader.ReadDirectory('data'))
last_artifact_definition = None
for artifact in artifact_definitions:
View
@@ -9,6 +9,8 @@
from artifacts import registry
from artifacts import source_type
from tests import test_lib
class TestSourceType(source_type.SourceType):
"""Class that implements a test source type."""
@@ -30,16 +32,14 @@ def __init__(self, test=None):
super(TestSourceType, self).__init__()
self.test = test
def CopyToDict(self):
"""Copies the source type to a dictionary.
def AsDict(self):
"""Represents a source type as a dictionary.
Returns:
A dictionary containing the source type attributes.
dict[str, str]: source type attributes.
"""
return {u'test': self.test}
from tests import test_lib
class ArtifactDefinitionsRegistryTest(test_lib.BaseTestCase):
"""Tests for the artifact definitions registry."""
View
@@ -19,7 +19,7 @@ def testArtifactDefinitionsValidator(self):
"""Runs the validator over all the YAML artifact definitions files."""
validator_object = validator.ArtifactDefinitionsValidator()
for definitions_file in glob.glob(os.path.join('definitions', '*.yaml')):
for definitions_file in glob.glob(os.path.join('data', '*.yaml')):
result = validator_object.CheckFile(definitions_file)
self.assertTrue(
result, msg='in definitions file: {0}'.format(definitions_file))
View
@@ -85,7 +85,7 @@ def BuildStats(self):
self.source_type_counts = {}
self.total_count = 0
for artifact_definition in artifact_reader.ReadDirectory('definitions'):
for artifact_definition in artifact_reader.ReadDirectory('data'):
if hasattr(artifact_definition, 'labels'):
for label in artifact_definition.labels:
self.label_counts[label] = self.label_counts.get(label, 0) + 1
View
@@ -18,7 +18,7 @@
class ArtifactDefinitionsValidator(object):
"""Artifact definitions validator."""
LEGACY_PATH = os.path.join('definitions', 'legacy.yaml')
LEGACY_PATH = os.path.join('data', 'legacy.yaml')
def __init__(self):
"""Initializes an artifact definitions validator."""
@@ -168,10 +168,13 @@ class DPKGControlWriter(DependencyFileWriter):
_PYTHON_PACKAGE_FOOTER = [
u'Package: artifacts-tools',
u'Architecture: all',
u'Depends: python-artifacts, python (>= 2.7~), ${python:Depends}, ${misc:Depends}',
(u'Depends: python-artifacts, python (>= 2.7~), ${python:Depends}, '
u'${misc:Depends}'),
u'Description: Tools for ForensicArtifacts.com Artifact Repository',
u' A free, community-sourced, machine-readable knowledge base of forensic',
u' artifacts that the world can use both as an information source and within other tools.',
(u' A free, community-sourced, machine-readable knowledge base of '
u'forensic'),
(u' artifacts that the world can use both as an information source and '
u'within other tools.'),
u'']
def Write(self):

0 comments on commit 3efd542

Please sign in to comment.