Coder Social home page Coder Social logo

inherd / coco Goto Github PK

View Code? Open in Web Editor NEW
322.0 11.0 51.0 1.96 MB

An effective DevOps analysis and auto-suggest tool。Coco 是一个研发效能分析工具,如团队发展现状(根据架构复杂度及行数变更)、团队演进、历史分析等。生成可视化报告及对应的改进建议。

Home Page: https://inherd.github.io/coco/

License: MIT License

Rust 67.81% HTML 2.58% JavaScript 25.56% CSS 0.78% Go 0.35% Java 0.81% TypeScript 0.18% C++ 0.78% Dockerfile 0.55% Groovy 0.01% Fluent 0.59%

coco's Introduction

Coco

Coco Build

(aka coconut, juice), an automatic DevOps metrics analysis tool.

case studies: Coco cases

Online Demos:

OS: macOS, Windows, GNU/Linux

Usage

  1. install or download Coco components from release, and download ctags: windows
  2. use coco init to generate config file
  3. config coco.yml
  4. optional: use coco plugins to download plugins
  5. run Coco
    • coco, gather data from source
    • visual, visualization of data
    • suggest, generate suggestion
  6. download plugins (optional)
    • coco_container,container analysis
    • coco_pipeline,pipeline analysis
    • coco_struct,model analysis by ctags
    • coco_swagger,Swagger API Analysis

visual URL:

Offline usage:

  1. download coco, visual e``xec file
  2. download coco_plugins_xxxx with platform
  3. extract coco_plugins_xxxx to plugins dir

Coco Usage

coco 0.5.3

USAGE:
    coco [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -b, --branches <branches>            With all branches [default: true]
        --commits <commits>              With all commits [default: true]
    -c, --config-file <config-file>      Config file .yml [default: coco.yml]
    -d, --debug <debug>                  Debug mode [default: false]
    -f, --file-history <file-history>    Scan file change list from git & cloc [default: false]
    -y, --git-years <git-years>          Set git commits scan years, default 1, [default: 1.0]
    -t, --tags <tags>                    With all tags [default: true]

SUBCOMMANDS:
    help       Prints this message or the help of the given subcommand(s)
    init       Create default coco.yml files
    plugins    Download plugins from GitHub

sample:

coco --file-history=true --git-years=3

coco.yml

配置 (config in Chinese)

示例:

# 代码库
repos:
  - url: https://github.com/coco-rs/coco.fixtures
  - url: https://github.com/coco-rs/coco.fixtures2
  - url: .
    languages: [Rust]
  - url: https://github.com/datum-lang/scie
  - url: https://github.com/projectfluent/fluent-rs
    languages: [Rust, JavaScript]                     # set languages for struct analysis

plugins:
  - name: swagger
  - name: struct
    config:
      - key: ctags                       # set location for macOS ctags path
        value: /usr/local/bin/ctags
        
git:
  local: true # true will use `git clone`, false will use libgit2

Documents

Development

See in DEVELOPMENT.md

Online video

Bilibili: 研发效能分析工具 Coco 第一次线上讨论

Roadmap

analysis and reporter

analysis

  • git analysis
    • branch
    • changes
    • commits
  • cloc analysis
    • summary
    • file arch
  • framework analysis
  • architecture analysis
    • file/directory organization

reporter

  • html reporter
  • json output
  • query api?

suggest and case study

Tech

  • AST Parser: include_parser/mod.rs
  • Web Server: light_server.rs
  • CLI: visual.rs, coco.rs, suggest.rs

Todo

  • git analysis
  • cloc analysis
    • spike cloc tools Tokei
    • history cloc changes
    • commit cloc changes
  • framework analysis.
    • framework detector
    • merge from scie-detector
    • framework output
    • tech stack generate
    • cloud native
  • module analysis
    • base framework for directory
      • gitignore support
    • code flower
    • include analysis
      • code parser: pest
      • languages support.
  • team analysis
    • join time & life time
      • 以加入时间开始度量平均提交:上手成本分析
      • 平均加入时长
      • 成员加入时间点
    • member growth
    • count system size & learning curve
  • commit analysis
    • commit times analysis (hours)
    • rule regex support in config
    • participle(分词)
    • tags generate
  • suggestion API
    • document manage system
    • suggest to ledge
    • suggest to cases
    • suggest to coco.server?
      • online suggest ?
      • link daily checking
    • architecture design rules
  • architecture
    • tech stack version check (more than 3 years ?)
      • Maven Center
      • NPM Server
      • Go Server
  • tools
    • tools config identify
    • tools suggest (identify old tools)
    • cloud-native config
  • case study
  • todo scan
  • multiple platform support
    • macOS
    • GNU/Linux
    • Windows
      • fix tests
      • make it works
  • C4 Model
    • PUML for call chain
      • symbol design - IsA, Use-In-The-Interface, Uses-In-The-Implementation
  • plugin
    • struct analysis
      • ctags
      • visual
      • uml
    • swagger
    • Jenkinsfile
    • Dockerfile

Visual and Reporter

DevOps pipeline

  • Jenkinsfile of Coco's examples

Tech Debt Integration

Documents

Refs: Libgit2 Documents

FAQ

How to install in macOS?

Step1

Download Coco to your Mac from release

Step2

Move it(Coco) to your preferred directory,such as:

mkdir ~/.coco
mv ~/Downloads/coco_macos ~/.coco/

Step3

Set up an alias to make it easier to use,such as:

export 'alias coco="~/.coco/coco_macos"' >> ~/.zshrc

Step4

Try to use execute it by alias coco:

coco -h

If it show no permission,you can execute the following command:

chmod -R u=rwx,g=rw,o=r ~/.coco/coco_macos

Then retry:

coco -h

Good luck!

Thanks

Jetbrains

License

ctags analysis based on https://github.com/dalance/ptags with MIT, see in src

ctags parser rewrite from Golang's https://github.com/ruben2020/tags2uml with Apache License.

@ 2020~2021 This code is distributed under the MIT license. See LICENSE in this directory.

coco's People

Contributors

chalme avatar eliot00 avatar gityoog avatar hexf00 avatar jtong avatar phodal avatar shane51 avatar ynfeng avatar yvettemuki 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coco's Issues

Windows crash

Describe the bug

the code execution cannot proceed because vcruntime140.dll was not found

Steps to reproduce (please include code)

run exe and popup

Environment

  • OS: Windows 10

Flink仓库分析报错文件名或扩展名太长

Describe the bug

A clear and concise description of what the bug is.
Flink仓库分析报错文件名或扩展名太长。

Steps to reproduce (please include code)

执行步骤:

PS C:\Users\ovo\Documents\workspace\report\git> .\coco-windows.exe
target dir: ".coco\\github.com\\apache\\spark"
target dir: ".coco\\github.com\\apache\\flink"
thread '<unnamed>' panicked at 'failed to clone: failed to stat 'C:/Users/ovo/Documents/workspace/report/git/.coco/github.com/apache/flink/flink-connectors/flink-connector-files/src/test/resources/bucket-state-migration-test/full-no-in-progress-v1-template/bucket/test-bucket/.part-0-0.inprogress.a88d5993-77bc-44ce-880b-9f2a43b59ab4': 文件名或扩展名太长。
; class=Os (2); code=Exists (-4)', src\infrastructure\git\git_repository.rs:35:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

配置文件:

---
repos: 
  - url: https://github.com/apache/spark
  - url: https://github.com/apache/flink
    languages: [Java,Scale]

Environment

  • coco version 0.5.4
  • Rust version unknow
  • OS: [Windows 10]

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.