Giter VIP home page Giter VIP logo

import-graph's Introduction

Collect data about your dependencies

Tests Go Report Card go-recipes OpenSSF Scorecard

$ go install github.com/nikolaydubina/jsonl-graph@latest
$ go install github.com/nikolaydubina/import-graph@latest
# and get https://graphviz.org/download/

Features

  • Go modules, runs tests, detects tests and benchmarks
  • git log
  • goreportcard.com
  • codecov.io
  • Analyzes README.md
  • Checks if mentioned in Awesome lists
  • GitHub Stars
  • GitHub verified Organizations
  • reuse go get and go list to get code loaded by native Go routines
  • ... add yours here

Example

$ go mod graph | import-graph -i=gomod | jsonl-graph -color-scheme=file://$PWD/basic.json | dot -Tsvg > output.svg

gin-example

Output in JSONL graph

$ go mod graph | import-graph -i=gomod
{"id":"golang.org/x/net","can_get_gitstats":true,"can_get_codecov":false, ... }
...
{"from":"github.com/gin-gonic/gin","to":"github.com/gin-contrib/sse"}
{"from":"github.com/gin-gonic/gin","to":"github.com/go-playground/validator/v10"}

Pretty-print with jq

$ go mod graph | import-graph -i=gomod | jq -f
...
{
    "id": "github.com/gin-gonic/gin",
    "can_get_git": true,
    "can_get_codecov": true,
    "can_get_goreportcard": true,
    "can_run_tests": true,
    "github_url": "https://github.com/gin-gonic/gin",
    "git_url": "https://github.com/gin-gonic/gin",
    "git_last_commit": "2021-04-21",
    "git_last_commit_days_since": 3,
    "git_num_contributors": 321,
    "codecov_url": "https://app.codecov.io/gh/gin-gonic/gin",
    "codecov_files": 41,
    "codecov_lines": 2036,
    "codecov_coverage": 98.67,
    "gotest_has_tests": true,
    "gotest_all_tests_passed": true,
    "gotest_num_packages": 6,
    "gotest_num_packages_with_tests": 4,
    "gotest_num_packages_tests_passed": 4,
    "gotest_package_coverage_avg": 98.9,
    "goreportcard_average": 0.99,
    "goreportcard_grade": "A+",
    "goreportcard_files": 82,
    "goreportcard_issues": 6,
    "files_has_benchmarks": true,
    "files_has_tests": true
    ...
}
...

Notes

For GitHub you need to set to set in environment GITHUB_IMPORT_GRAPH_TOKEN to your personal GitHub token. It does not need any permissions at all. It is needed for higher quota of GitHub API calls.

Related Projects

import-graph's People

Contributors

dependabot[bot] avatar nikolaydubina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

doytsujin

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.