Git Product home page Git Product logo

gitlab-languages's Issues

Crash in last stage

Crash

Traceback (most recent call last):
  File "gitlab_languages.py", line 232, in <module>
    main()
  File "gitlab_languages.py", line 227, in main
    args=additional_args_dict
  File "gitlab_languages.py", line 157, in scan_projects
    self.metrics_collector.write(projects_scanned=self.projects_scanned)
  File "gitlab_languages.py", line 68, in write
    registry=self.registry,
  File "/home/projects/gitlab_languages/venv/lib/python3.6/site-packages/prometheus_client/core.py", line 591, in init
    raise ValueError('Invalid metric name: ' + full_name)
ValueError: Invalid metric name: 1CEnterprise

Consider add a json output option, plus add more percision to the percentage

It would be nice to have a JSON output option.
Also for a larger set of data, it would be nice to have a larger precision to the actual percentage. Half of our data set is less than 1% which means the data is lost, and although insignificant to the larger picture, it would be great to do a TopN of the 1% specially if the other 99% comprises of only 3-4 languages.

Ensure that last_activity_current is json serializable

Crash, when using cache

Traceback (most recent call last):
  File "/builds/***/gitlab-languages/venv/bin/gitlab_languages", line 11, in <module>
    sys.exit(main())
  File "/builds//***//gitlab-languages/venv/lib/python3.7/site-packages/gitlab_languages.py", line 418, in main
    json.dump(language_cache, f, indent=2)
  File "/usr/local/lib/python3.7/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/usr/local/lib/python3.7/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/local/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/local/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/local/lib/python3.7/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/usr/local/lib/python3.7/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/usr/local/lib/python3.7/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type MayaDT is not JSON serializable

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.