Giter VIP home page Giter VIP logo

django-detect-cyclic's Introduction

Application to detect cyclic imports. With this application you can analyze the dependence of your applications

https://github.com/goinnn/django-detect-cyclic/raw/master/examples/example-only-cyclic-exclude.png

In your settings.py:

INSTALLED_APPS = (

    'django_detect_cyclic',

)

In your urls.py:

urlpatterns = patterns('',

    (r'^admin/detect_cyclic/', include('django_detect_cyclic.urls')),

)

Make sure that you have in your urls jsi18nurl:

js_info_dict = {
    'packages': ('your.app.package',),
}

urlpatterns = patterns('',

    url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),

)
  • The nodes are applications, or (if you use the option “Show modules”) modules in the applications
  • One edge means that the source node imports from the destination node
  • Every edge of a cycle has the same background color and the label contains “Cycle X”
  • The labels of the edges contain the weight in parentheses
  • If you use the “Show modules” option, each node will have a background color. If two nodes are from the same application, they will have the same background color.
  • If an edge is dotted, every import in the source happens at runtime, whithin the body of a function or method

It is possible that the next links are interested if you can some problem:

It is possible that you have to remove the pyc files:

find -iname "*.pyc" -exec rm "{}" \;

You have two ways, you can run a command:

python manage.py detect_cyclic
python manage.py detect_cyclic --include-apps="app1,app6,app7,app11" --file-name="my_graph.svg" --exclude-packages="migrations,templatetags" --verbosity=2
python manage.py detect_cyclic --include-apps="app1,app6" --show-modules --file-name="my_graph.svg" --exclude-packages="migrations" --verbosity=2
python manage.py detect_cyclic --include-apps="app1,app6" --only-cyclic --file-name="my_graph.svg" --exclude-packages="migrations" --verbosity=2

Or you can access via web to the wizard:

/admin/detect_cyclic/

To see more examples click in examples

django-detect-cyclic's People

Contributors

goinnn avatar wankata avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.