{ "info": { "author": "Timothee Mazzucotelli", "author_email": "timothee.mazzucotelli@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities" ], "description": "======\nArchan\n======\n\n\n\nA Python module that analyzes your architecture strength\nbased on `Design Structure Matrix (DSM)`_ data.\n\nArchan is a Python module that analyzes the strength of your\nproject architecture according to some criteria described in\n\"`The Protection of Information in Computer Systems`_\", written by\nJerome H. Saltzer and Michael D. Schroeder.\n\n.. _`Design Structure Matrix (DSM)`: https://en.wikipedia.org/wiki/Design_structure_matrix\n.. _The Protection of Information in Computer Systems : https://www.cs.virginia.edu/~evans/cs551/saltzer/\n\n.. note::\n\n The following contents apply for the next version of Archan (2.0.0) which\n has not been released yet.\n\nFeatures\n========\n\n- Usable directly on the command-line.\n- Support for plugins. See for example the `Provider plugin`_ in `dependenpy`_.\n You can also take a look at `django-meerkat`_, a Django app using Archan.\n- Configurable through command-line or configuration file (YAML format).\n- Read DSM data on standard input.\n\n.. _dependenpy: https://github.com/Pawamoy/dependenpy\n.. _django-meerkat: https://github.com/Pawamoy/django-meerkat\n.. _`Provider plugin`: https://github.com/Pawamoy/dependenpy/blob/master/src/dependenpy/plugins.py\n\n\nInstallation\n============\n\nJust run ``pip install archan``.\n\nDocumentation\n=============\n\n`On ReadTheDocs`_\n\n.. _`On ReadTheDocs`: http://archan.readthedocs.io/\n\nArchan defines three main classes: Analyzer, Provider and Checker.\nA provider is an object that will produce data and return it in the form of\na DSM (Design Structure Matrix). The checker is an object that\nwill analyze this DSM according to some criteria, and return a status code\nsaying if the criteria are verified or not. An analyzer is just a combination\nof providers and checkers to run a analysis test suite.\n\nUsage\n=====\n\nOn the command-line\n-------------------\n\nExample:\n\n.. code:: bash\n\n archan -h\n\nOutput:\n\n.. code:: bash\n\n usage: archan [-c FILE] [-h] [-i FILE] [-l] [--no-color] [--no-config] [-v]\n\n Analysis of your architecture strength based on DSM data\n\n optional arguments:\n -c FILE, --config FILE Configuration file to use.\n -h, --help Show this help message and exit.\n -i FILE, --input FILE Input file containing CSV data.\n -l, --list-plugins Show the available plugins. Default: false.\n --no-color Do not use colors. Default: false.\n --no-config Do not load configuration from file. Default: false.\n -v, --version Show the current version of the program and exit.\n\nOther examples:\n\n.. code:: bash\n\n # Load configuration file and run archan\n # See Configuration section to know how archan finds the config file\n archan\n\n # No configuration, read CSV data from file\n archan --no-config --input FILE.CSV\n\n # No configuration, read CSV data from stdin\n dependenpy archan --format=csv | archan --no-config\n\n # Specify configuration file to load\n archan --config my_config.yml\n\n # Output the list of available plugins in the current environment\n archan --list-plugins\n\nProgrammatically\n----------------\n\n.. code:: python\n\n # TODO\n\nConfiguration\n=============\n\nArchan applies the following methods to find the configuration file folder:\n\n1. read the contents of the file ``.configconfig`` in the current directory\n to get the path to the configuration directory,\n2. use ``config`` folder in the current directory if it exists,\n3. use the current directory.\n\nIt then searches for a configuration file named:\n\n1. ``archan.yml``\n2. ``archan.yaml``\n3. ``.archan.yml``\n4. ``.archan.yaml``\n\nFormat of the configuration file is as follow:\n\n.. code:: yaml\n\n analyzers: [list of strings and/or dict]\n - identifier: [optional string]\n name: [string]\n description: [string]\n providers: [string or list]\n - provider.Name: [as string or dict]\n provider_arguments: as key value pairs\n checkers: [string or list]\n - checker.Name: [as string or dict]\n checker_arguments: as key value pairs\n\nIt means you can write:\n\n.. code:: yaml\n\n analyzers:\n # a first analyzer with one provider and several checker\n - name: My first analyzer\n description: Optional description\n providers: just.UseThisProvider\n checkers:\n - and.ThisChecker\n - and.ThisOtherChecker:\n which: has\n some: arguments\n # a second analyzer with several providers and one checker\n - name: My second analyzer\n providers:\n - use.ThisProvider\n checkers: and.ThisChecker\n # a third analyzer, using its name directly\n - some.Analyzer\n\nEvery checker support an ``ignore`` argument, set to True or False (default).\nIf set to True, the check will not make the test suit fail.\n\nYou can reuse the same providers and checkers in different analyzers, they\nwill be instantiated as different objects and won't interfere between each other.\n\nAs an example, see `Archan's own configuration file`_.\n\n.. _`Archan's own configuration file`: https://github.com/Pawamoy/archan/blob/master/config/archan.yml\n\nTo get the list of available plugins in your current environment,\nrun ``archan --list-plugins`` or ``archan -l``.\n\nWriting a plugin\n================\n\nPlugin discovery\n----------------\n\nYou can write three types of plugins: analyzers, providers and checkers.\nYour plugin does not need to be in an installable package. All it needs to\nbe summoned is to be available in your current Python path. However, if you want\nit to be automatically discovered by Archan, you will have to make it installable,\nthrough pip or simply ``python setup.py install`` command or equivalent.\n\nIf you decide to write a Python package for your plugin, I recommend you\nto name it ``archan-your-plugin`` for consistency. If you plan to make it live\nalong other code in an already existing package, just leave the name as it is.\n\nTo make your plugin discoverable by Archan, use the ``archan`` entry point\nin your ``setup.py``:\n\n.. code:: python\n\n from setuptools import setup\n\n setup(\n ...,\n 'entry_points': {\n 'archan': [\n 'mypackage.MyPlugin = mypackage.mymodule:MyPlugin',\n ]\n }\n\nThe name of the entry point should by convention be composed of the name of\nyour package in lower case, a dot, and the name of the Python class, though\nyou can name it whatever you want. Remember that this name will be the one\nused in the configuration file.\n\nAlso a good thing is to make the plugin importable thanks to its name only:\n\n.. code:: python\n\n import mypackage.MyPlugin\n\nBut again, this is just a convention.\n\nPlugin class\n------------\n\nYou can write three types of plugins: analyzers, providers and checkers.\nFor each of them, you have to inherit from its corresponding class:\n\n.. code:: python\n\n from archan import Analyzer, Provider, Checker\n\n class MyAnalyzer(Analyzer): ...\n class MyProvider(Provider): ...\n class MyChecker(Checker): ...\n\nA provider or checker plugin must have the following class attributes:\n\n- identifier: the identifier of the plugin. It must be the same name as in\n your entry points, so that displaying its help tells how to summon it.\n- name: the verbose name of the plugin.\n- description: a description to explain what it does.\n- (optional) arguments: a tuple/list of Argument instances. This one is only\n used to display some help for the plugin. An argument is composed of a name,\n a type, a description and a default value.\n\n.. code:: python\n\n from archan import Provider, Argument\n\n class MyProvider(Provider):\n identifier = 'mypackage.MyProvider'\n name = 'This is my Provider'\n description = \"\"\"\n Don't hesitate to use multi-line strings as the lines will be de-indented,\n concatenated again and wrapped to match the console width.\n\n Blank lines will be kept though, so the above line will not be removed.\n \"\"\"\n\n arguments = (\n Argument('my_arg', int, 'This argument is useful.', 42),\n # don't forget the ending comma if you have just one ^ argument\n )\n\nAdditionally, a checker plugin should have the ``hint`` class attribute (string).\nThe hint describe what you should do if the check fails.\n\nFor now, the analyzers plugins just have the ``providers`` and ``checkers``\nclass attributes.\n\nPlugin methods\n--------------\n\nA provider must implement the ``get_dsm(self, **kwargs)`` method. This method\nmust return an instance of ``DSM``. A DSM is composed of a two-dimensions\narray, the matrix, a list of strings, the keys or names for each line/column\nof the matrix, and optionally the categories for each key (a list of same size).\n\n.. code:: python\n\n from archan import DSM, Provider\n\n class MyProvider(Provider):\n name = 'mypackage.MyProvider'\n\n def get_dsm(self, my_arg=42, **kwargs):\n # this is where you compute your stuff\n matrix_data = [...]\n entities = [...]\n categories = [...] or None\n # and return a DSM instance\n return DSM(matrix_data, entities, categories)\n\nA checker must implement the ``check(self, dsm, **kwargs)`` method.\n\n.. code:: python\n\n from archan import DSM, Checker\n\n class MyChecker(Checker):\n name = 'mypackage.MyChecker'\n\n def check(self, dsm, **kwargs):\n # this is where you check your stuff\n # with dsm.data, dsm.entities, dsm.categories, dsm.size (rows, columns)\n ...\n # and return True, False, or a constant from Checker: PASSED or FAILED\n # with an optional message\n return Checker.FAILED, 'too much issues in module XXX'\n\nLogging messages\n----------------\n\nEach plugin instance has a ``logger`` attribute available. Use it to log\nmessages with ``self.logger.debug``, ``info``, ``warning``, ``error`` or\n``critical``.\n\nAvailable plugins\n=================\n\nHere is the list of plugins available in other packages.\n\nProviders\n---------\n\n- ``dependenpy.InternalDependencies``: Provide matrix data about internal\n dependencies in a set of packages. Install it with ``pip install dependenpy``.\n\n\nLicense\n=======\n\nSoftware licensed under `ISC`_ license.\n\n.. _ISC: https://www.isc.org/downloads/software-support-policy/isc-license/\n\nDevelopment\n===========\n\nTo run all the tests: ``tox``\n\n=========\nChangelog\n=========\n\n2.0.0 (2017-06-26)\n==================\n\n* Change license from MPL 2.0 to ISC.\n* Add command-line tool.\n* Rewrite architecture to support plugins.\n\n1.0.0 (2016-10-06)\n==================\n\n* Add documentation.\n\n0.1.0 (2016-10-06)\n==================\n\n* Alpha release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Pawamoy/archan", "keywords": "archan,architecture,analysis,security,dsm,audit", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "archan", "package_url": "https://pypi.org/project/archan/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/archan/", "project_urls": { "Homepage": "https://github.com/Pawamoy/archan" }, "release_url": "https://pypi.org/project/archan/2.0.1/", "requires_dist": [ "colorama", "pyyaml" ], "requires_python": "", "summary": "Analysis of your architecture strength based on DSM data.", "version": "2.0.1" }, "last_serial": 2982029, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1a9a6efc452e8470f13ee22502884c34", "sha256": "1f718fbce5035805caf671dce4f4ff57ecce15be51343de715adb642110d8303" }, "downloads": -1, "filename": "archan-0.0.1.tar.gz", "has_sig": false, "md5_digest": "1a9a6efc452e8470f13ee22502884c34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11046, "upload_time": "2015-03-25T16:29:34", "url": "https://files.pythonhosted.org/packages/bc/70/9586e24ddeca5572850619c18b899780b3e2bc1c076a94dc45e9f8f47fc7/archan-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "17df8d9282ce1fb70edc5270944c7edf", "sha256": "1e796e000bcce5f1809416ea031f413c74f0cc80f167662b3b3e7f2166fabde9" }, "downloads": -1, "filename": "archan-0.0.2.tar.gz", "has_sig": false, "md5_digest": "17df8d9282ce1fb70edc5270944c7edf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11202, "upload_time": "2015-04-02T16:48:57", "url": "https://files.pythonhosted.org/packages/e3/b4/72bc2cf8c2a1c5f72ed36db380d6868a5c4d46090d8cff07634e3671f488/archan-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "4cbf633ce41d334f6b206c2036fed5c4", "sha256": "23eb486364e1bcf103224c7b90eb400e7a814d280925890df1afcd3057db1bdd" }, "downloads": -1, "filename": "archan-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4cbf633ce41d334f6b206c2036fed5c4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8974, "upload_time": "2015-04-07T14:25:28", "url": "https://files.pythonhosted.org/packages/f6/8b/1701143954b5ef6caa99c800805703947485a3e1d540647db0cf5e54c63a/archan-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "96a36d2357a544288bfc793a5cdd2e32", "sha256": "4667a34ee8a43eb73c68ef68b4298139026fdefe146a42922832df5e3dbd0bea" }, "downloads": -1, "filename": "archan-0.0.3.tar.gz", "has_sig": false, "md5_digest": "96a36d2357a544288bfc793a5cdd2e32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12469, "upload_time": "2015-04-07T14:25:25", "url": "https://files.pythonhosted.org/packages/b4/93/14b3112fd854988ac3e7ad01b5d6dc698507d2755e7f7901a5c1be53dbdc/archan-0.0.3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "24fe82137f63b73cb6ec8ac3d6380389", "sha256": "d8f404a93ed6dfb64ce000af9505976dab7ef0b5f79c123a44592c310d0d6d9b" }, "downloads": -1, "filename": "archan-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "24fe82137f63b73cb6ec8ac3d6380389", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14441, "upload_time": "2016-10-06T11:57:27", "url": "https://files.pythonhosted.org/packages/9b/bd/d999377b145bfa0ea81666cf9fce61a71bbc7b68b64b362403ca847a612e/archan-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f79acc3b4d768e72f842b6f3a238c33f", "sha256": "7d22910f7cd8d23873068ad8d96fdf1911461c747eeb7bf6c052f0b75cbfeaff" }, "downloads": -1, "filename": "archan-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f79acc3b4d768e72f842b6f3a238c33f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21882, "upload_time": "2016-10-06T11:57:30", "url": "https://files.pythonhosted.org/packages/5d/91/b6cd05baa33940cec534855498832c50d647de67898a97e3a43ba9d85089/archan-1.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "8698cccb560b2452ca19994aa5bb6819", "sha256": "149b8475cc198458caab6f6110006c5584591d61e5b23f152bf0c343dacd74da" }, "downloads": -1, "filename": "archan-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8698cccb560b2452ca19994aa5bb6819", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30417, "upload_time": "2017-06-27T13:14:54", "url": "https://files.pythonhosted.org/packages/14/fc/59ccd602948a94c23a651c13eb0462bfd4a63c934f5d6359ae3d93c99830/archan-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cb6cc221ddfe7b2c6612851d727475cc", "sha256": "282fcffa29475678852c562af621afd289af007abc96d328d923dbda5f4e3b9d" }, "downloads": -1, "filename": "archan-2.0.1.tar.gz", "has_sig": false, "md5_digest": "cb6cc221ddfe7b2c6612851d727475cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 68851, "upload_time": "2017-06-27T13:14:56", "url": "https://files.pythonhosted.org/packages/4e/7b/44f6cd6c415dcd4177974ca43067d00680d4c69a4abbc6833f309cd5ce79/archan-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8698cccb560b2452ca19994aa5bb6819", "sha256": "149b8475cc198458caab6f6110006c5584591d61e5b23f152bf0c343dacd74da" }, "downloads": -1, "filename": "archan-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8698cccb560b2452ca19994aa5bb6819", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30417, "upload_time": "2017-06-27T13:14:54", "url": "https://files.pythonhosted.org/packages/14/fc/59ccd602948a94c23a651c13eb0462bfd4a63c934f5d6359ae3d93c99830/archan-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cb6cc221ddfe7b2c6612851d727475cc", "sha256": "282fcffa29475678852c562af621afd289af007abc96d328d923dbda5f4e3b9d" }, "downloads": -1, "filename": "archan-2.0.1.tar.gz", "has_sig": false, "md5_digest": "cb6cc221ddfe7b2c6612851d727475cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 68851, "upload_time": "2017-06-27T13:14:56", "url": "https://files.pythonhosted.org/packages/4e/7b/44f6cd6c415dcd4177974ca43067d00680d4c69a4abbc6833f309cd5ce79/archan-2.0.1.tar.gz" } ] }