Code Monkey home page Code Monkey logo

deptracpy's Introduction

Hello there... ๐Ÿ‘‹

I am a CI/CD engineer focusing on how to make other developers faster, more empowered and more productive.

Big fan of static analysis tools and a prolific contributor to deptrac - Dependency analysis tool for PHP.

I also abide by the boy scout rule - leave every repository I work with in better state then when I found it.

GitHub stats

deptracpy's People

Contributors

dependabot[bot] avatar patrickkusebauch avatar tom71 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

tom71

deptracpy's Issues

Handle warnings emitted by deptracpy

Hi, I am trying deptracpy for a project but I get a lot of warnings, mostly for std and third-party packages (Uncovered target token) that is imported but also Uncovered source file for files that I want to ignore.

deptracpy:s output:

> deptracpy
Warning:  Uncovered target token: 'fastapi.Depends'

Warning:  Uncovered target token: 'typing.Any'

Warning:  Uncovered target token: 'fastapi.Response'

Warning:  Uncovered target token: 'opentelemetry.instrumentation.fastapi.FastAPIInstrumentor.instrument_app'

Warning:  Uncovered target token: 'json_streams.jsonlib.loads'

Warning:  Uncovered target token: 'opentelemetry.instrumentation.logging.LoggingInstrumentor'

Warning:  Uncovered source file: 'sblex.lsib'

Warning:  Uncovered source file: 'sblex.md1'

Warning:  Uncovered source file: 'sblex.fullform'

Warning:  Uncovered target token: 'jinja2'

Warning:  Uncovered target token: 'opentelemetry.sdk.resources.Resource'

Warning:  Uncovered target token: 'opentelemetry.instrumentation.fastapi.FastAPIInstrumentor'

Warning:  Uncovered target token: 'unittest.mock.Mock'

Warning:  Uncovered target token: 'urllib'

Warning:  Uncovered target token: 'fastapi.middleware.cors.CORSMiddleware'

Warning:  Uncovered target token: 'jinja2.pass_context'

Warning:  Uncovered target token: 'environs'

Warning:  Uncovered target token: 'environs.Env'

Warning:  Uncovered target token: 'opentelemetry.sdk.trace.export.ConsoleSpanExporter'

Warning:  Uncovered target token: 'opentelemetry.sdk.trace.TracerProvider'

Warning:  Uncovered target token: 'opentelemetry.instrumentation.logging.LoggingInstrumentor.instrument'

Warning:  Uncovered target token: 'random'

Warning:  Uncovered target token: 'fastapi.responses.Response'

Warning:  Uncovered target token: 'fastapi.Path'

Warning:  Uncovered target token: 'fastapi.APIRouter'

Warning:  Uncovered target token: 'os.environ.get'

Warning:  Uncovered target token: 'json_streams.utility.JsonFormat.JSON_LINES'

Warning:  Uncovered target token: 'json_streams.utility.JsonFormat'

Warning:  Uncovered target token: 'pydantic.BaseModel'

Warning:  Uncovered target token: 'abc.ABC'

Warning:  Uncovered target token: 'opentelemetry.trace'

Warning:  Uncovered source file: 'sblex.paradigms'

Warning:  Uncovered target token: 'opentelemetry.trace.get_tracer'

Warning:  Uncovered target token: 'asgi_matomo.MatomoMiddleware'

Warning:  Uncovered target token: 'json_streams.load_from_file'

Warning:  Uncovered target token: 'fastapi.templating.Jinja2Templates'

Warning:  Uncovered target token: 'unittest.mock'

Warning:  Uncovered target token: 'logging.INFO'

Warning:  Uncovered target token: 'random.randint'

Warning:  Uncovered target token: 'subprocess.run'

Warning:  Uncovered target token: 'httpx'

Warning:  Uncovered target token: 'json_streams'

Warning:  Uncovered target token: 'subprocess'

Warning:  Uncovered target token: 'typing.Optional'

Warning:  Uncovered source file: 'sblex.table'

Warning:  Uncovered target token: 'os'

Warning:  Uncovered target token: 'urllib.parse'

Warning:  Uncovered target token: 'typing.Union'

Warning:  Uncovered target token: 'typing.Iterable'

Warning:  Uncovered target token: 'opentelemetry.instrumentation.httpx.HTTPXClientInstrumentor'

Warning:  Uncovered source file: 'sblex.handler'

Warning:  Uncovered target token: 'fastapi.responses.JSONResponse'

Warning:  Uncovered target token: 'asgi_matomo.trackers.PerfMsTracker'

Warning:  Uncovered target token: 'fastapi.Request'

Warning:  Uncovered source file: 'sblex.pos'

Warning:  Uncovered target token: 'opentelemetry.sdk.trace.export.BatchSpanProcessor'

Warning:  Uncovered source file: 'sblex.fullform_lex'

Warning:  Uncovered target token: 'logging.error'

Warning:  Uncovered target token: 'os.environ'

Warning:  Uncovered target token: 'brotli_asgi.BrotliMiddleware'

Warning:  Uncovered target token: 'typing.TypedDict'

Warning:  Uncovered target token: 'csv.reader'

Warning:  Uncovered target token: 'time'

Warning:  Uncovered source file: 'sblex.dist'

Warning:  Uncovered target token: 'typing.Callable'

Warning:  Uncovered target token: 'fastapi.responses.HTMLResponse'

Warning:  Uncovered target token: 'logging.getLogger'

Warning:  Uncovered target token: 'typing'

Warning:  Uncovered target token: 'abc.abstractmethod'

Warning:  Uncovered source file: 'sblex.plist'

Warning:  Uncovered target token: 'fastapi.FastAPI'

Warning:  Uncovered target token: 'httpx.AsyncClient'

Warning:  Uncovered target token: 'pathlib.Path'

Warning:  Uncovered source file: 'sblex.glsib_old'

Warning:  Uncovered target token: 'sblex.fm.morphology.Morphology'

Warning:  Uncovered target token: 'fastapi.status.HTTP_422_UNPROCESSABLE_ENTITY'

Warning:  Uncovered source file: 'sblex.compound'

Warning:  Uncovered target token: 'urllib.parse.quote'

Warning:  Uncovered target token: 'logging'

Warning:  Uncovered target token: 'subprocess.PIPE'

Warning:  Uncovered source file: 'sblex.glsib'

Warning:  Uncovered target token: 'opentelemetry.trace.get_current_span'

Warning:  Uncovered source file: 'sblex.lem'

Warning:  Uncovered source file: 'sblex.app'

Warning:  Uncovered source file: 'sblex.saldo_util'

Warning:  Uncovered target token: 'opentelemetry.instrumentation.httpx.HTTPXClientInstrumentor.instrument'

Warning:  Uncovered target token: 'contextlib.asynccontextmanager'

Warning:  Uncovered target token: 'fastapi.status'

Warning:  Uncovered target token: 'json_streams.jsonlib'

Warning:  Uncovered target token: 'abc'

Warning:  Uncovered target token: 'sblex.fm.MemMorphology.from_path'

Warning:  Uncovered target token: 'opentelemetry.trace.set_tracer_provider'

Warning:  Uncovered target token: 'logging.config.dictConfig'

Warning:  Uncovered target token: 'json_streams.jsonlib.dumps'

Warning:  Uncovered target token: 'dataclasses.dataclass'

Warning:  Uncovered source file: 'sblex.lemma'

Warning:  Uncovered target token: 'time.perf_counter'

Warning:  Uncovered source file: 'sblex.lexeme'

Warning:  Uncovered target token: 'fastapi.staticfiles.StaticFiles'

Warning:  Uncovered source file: 'sblex.sib'

Warning:  Uncovered target token: 'csv'

Warning:  Uncovered target token: 'typing_extensions.Annotated'

Warning:  Uncovered target token: 'opentelemetry.sdk.resources.Resource.create'

       Results        
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ            โ”ƒ Count โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ Allowed    โ”‚ 43    โ”‚
โ”‚ Warning    โ”‚ 103   โ”‚
โ”‚ Violations โ”‚ 0     โ”‚
โ”‚ Errors     โ”‚ 0     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

deptracpy.yaml

paths:
  - src

layers:
  - name: sblex.application
    collectors:
      - type: ModuleRecursive
        path: "sblex.application"
  - name: sblex.fm
    collectors:
      - type: Module
        path: "sblex.fm"
  - name: sblex.fm_server
    collectors:
      - type: ModuleRecursive
        path: "sblex.fm_server"
  - name: sblex.formatting
    collectors:
      - type: ModuleRecursive
        path: "sblex.formatting"
  - name: sblex.trie
    collectors:
      - type: ModuleRecursive
        path: "sblex.trie"
  - name: sblex.infrastructure
    collectors:
      - type: ModuleRecursive
        path: "sblex.infrastructure"
  - name: sblex.main
    collectors:
      - type: ModuleRecursive
        path: "sblex.main"
  - name: sblex.webapp
    collectors:
      - type: ModuleRecursive
        path: "sblex.webapp"

rulesets:
  sblex.application:
    - sblex.fm
  sblex.fm:
    - sblex.trie
  sblex.fm_server:
    - sblex.fm
    - sblex.main
  sblex.infrastructure:
    - sblex.fm
    - sblex.application
  sblex.main:
    - sblex.infrastructure
  sblex.webapp:
    - sblex.application
    - sblex.fm
    - sblex.formatting
    - sblex.infrastructure
    - sblex.main

hidden_layers is required for dot formatter

If you don't define the hidden_layers section, you got an error when you use the dot formatter. You can't leave it blank.

lib/python3.10/site-packages/deptracpy/OutputFormatter/dot_formatter.py", line 78, in format_dot
    if layer.name not in config.hidden_layers:
TypeError: argument of type 'NoneType' is not iterable

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.