Skip to content

Commit

Permalink
New master release (#47)
Browse files Browse the repository at this point in the history
* remove acceptance tests from tox

* add missing LOCAL_PRIVATE_KEY to env required

* move docker compose environment to Makefile target instead of environment in behave

* configure travis to launch docker compose environment before running behave

* remove local behave tests in travis

* define env variables as global

* install behave in travis

* install full requirements tests to run behave in travis

* remove demo target and file

* remove demo target and file

* update make target docs

* merge clean targets

* Add DONE state to scan

* switch old print for log.info

* Increase scan.analysis_done on each analysis runned

* Refactor to prepare Invalid repo in the correct scope

* Add behave steps

* fix typo

* upgrade core to 0.0.22

* fix flak8 weeoe

* change tests commands in Makefile

* add logging to merge_results task

* update scan state to DONE before merging the results

* refactor start_scan task to parse .deeptracy.yml files to find language for scans

* add deeptracy_yml_parse function

* add PYYaml requirement

* change test command in tox

* fix tests

* add base task class

* upgrade core version

* Bump version: 0.0.4 → 0.0.5

* refactor utils files usage and delete unneded tests

* add LOG_LEVEL to env_required

* config default 'deeptracy' logger

* add missing taks to celery loaded tasks

* get LOG_LEVEL from env into config

* add and use 'deeptracy' logger in tasks

* Bump version: 0.0.5 → 0.0.6

* remove coverage check

* add unittest

* new tasks prepare scan and scan deps

* organize imports

* refactor start scan to move funcionalities to new tasks

* update tests for pass with new tasks

* updgrade core version

* Bump version: 0.0.6 → 0.0.7

* fix flake8 in scan_deps task

* documentattion improved
  • Loading branch information
alejandrogr committed Nov 5, 2017
1 parent f5626b5 commit de74956
Show file tree
Hide file tree
Showing 20 changed files with 553 additions and 142 deletions.
Binary file added .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions deeptracy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Deeptracy Workers Project.
This package contains celery workers and tasks to process the deeptracy flow for scanning projects.
"""

import logging

Expand Down
24 changes: 9 additions & 15 deletions deeptracy/celery.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# Copyright 2017 BBVA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Module for deeptracy
Celery worker module.
~~~~~~~~~~~~~~~~~~~~~
This module can be launched with celery to create workers to handle tasks.
Run deeptracy celery workers with `INFO` log levels::
$ celery -A deeptracy.celery:celery worker -l INFO
"""
from celery import Celery

Expand Down
Binary file added docs/.DS_Store
Binary file not shown.
27 changes: 27 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _api:

API Reference
-------------

This section of the documentation exposes the API methods availables
to interact with.

.. _create_project-ref:

Create Projects
~~~~~~~~~~~~~~~

.. _create_scan-ref:

Create Scan
~~~~~~~~~~~

.. _get_analyzer_vulnerabilties-ref:

Get Analyzer Vulnerabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. _get_scan_vulnerabilities-ref:

Get Scan Vulnerabilities
~~~~~~~~~~~~~~~~~~~~~~~~
62 changes: 0 additions & 62 deletions docs/deeptracy.dal.rst

This file was deleted.

22 changes: 22 additions & 0 deletions docs/deeptracy.notifications.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
deeptracy\.notifications package
================================

Submodules
----------

deeptracy\.notifications\.slack\_webhook\_post module
-----------------------------------------------------

.. automodule:: deeptracy.notifications.slack_webhook_post
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: deeptracy.notifications
:members:
:undoc-members:
:show-inheritance:
30 changes: 0 additions & 30 deletions docs/deeptracy.plugins.rst

This file was deleted.

23 changes: 7 additions & 16 deletions docs/deeptracy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ Subpackages

.. toctree::

deeptracy.dal
deeptracy.plugins
deeptracy.notifications
deeptracy.tasks

Submodules
----------

deeptracy\.app module
---------------------
deeptracy\.celery module
------------------------

.. automodule:: deeptracy.app
.. automodule:: deeptracy.celery
:members:
:undoc-members:
:show-inheritance:
Expand All @@ -29,18 +28,10 @@ deeptracy\.config module
:undoc-members:
:show-inheritance:

deeptracy\.redis module
-----------------------

.. automodule:: deeptracy.redis
:members:
:undoc-members:
:show-inheritance:

deeptracy\.utils module
-----------------------
deeptracy\.plugin\_store module
-------------------------------

.. automodule:: deeptracy.utils
.. automodule:: deeptracy.plugin_store
:members:
:undoc-members:
:show-inheritance:
Expand Down
32 changes: 32 additions & 0 deletions docs/deeptracy.tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ deeptracy\.tasks package
Submodules
----------

deeptracy\.tasks\.base\_task module
-----------------------------------

.. automodule:: deeptracy.tasks.base_task
:members:
:undoc-members:
:show-inheritance:

deeptracy\.tasks\.merge\_results module
---------------------------------------

Expand All @@ -12,6 +20,22 @@ deeptracy\.tasks\.merge\_results module
:undoc-members:
:show-inheritance:

deeptracy\.tasks\.notify\_results module
----------------------------------------

.. automodule:: deeptracy.tasks.notify_results
:members:
:undoc-members:
:show-inheritance:

deeptracy\.tasks\.prepare\_scan module
--------------------------------------

.. automodule:: deeptracy.tasks.prepare_scan
:members:
:undoc-members:
:show-inheritance:

deeptracy\.tasks\.run\_analyzer module
--------------------------------------

Expand All @@ -20,6 +44,14 @@ deeptracy\.tasks\.run\_analyzer module
:undoc-members:
:show-inheritance:

deeptracy\.tasks\.scan\_deps module
-----------------------------------

.. automodule:: deeptracy.tasks.scan_deps
:members:
:undoc-members:
:show-inheritance:

deeptracy\.tasks\.start\_scan module
------------------------------------

Expand Down
13 changes: 13 additions & 0 deletions docs/developer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _developer-ref:

Developer's Documentation
=========================

This documentation is for developers who want to contribute to Deeptracy.

.. toctree::
:maxdepth: 3

installation_dev
usage_dev
testing_dev
29 changes: 13 additions & 16 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
.. deeptracy worker documentation master file.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
:orphan:

Welcome to Deeptracy
====================

Overview
========
.. image:: https://raw.githubusercontent.com/BBVA/deeptracy/develop/docs/_static/deeptracy-logo-small.png
:alt: Deeptracy: spot vulnerabilities in your dependencies
:width: 250 px

.. toctree::
:maxdepth: 2
Welcome to Deeptracy's documentation. This documentation is divided into two different parts.
One is the :ref:`userdocs-ref` which include installation and usage, and the other is the
:ref:`developer-ref` which include :ref:`sourcecode-ref` documentation, local environment, testing
and so on.

overview/index

Source Code
===========

.. toctree::
:maxdepth: 3

modules
.. include:: user.rst
.. include:: developer.rst
.. include:: modules.rst

0 comments on commit de74956

Please sign in to comment.