Giter Site home page Giter Site logo

szabgab / crystal-mine.cr Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 351 KB

Analyzing all the source-code using the Crystal programming language

Home Page: https://crystal-mine.org/

Crystal 83.20% HTML 13.22% SCSS 1.19% Dockerfile 1.00% Shell 1.39%
crystal crystal-lang crystal-language

crystal-mine.cr's Introduction

Crystal Mine

Source code of the Crystal Mine

Setup Development environment

  • Create a Personal Access token with a name that you can easily recognize, e.g. "Crystal Mine Development Token" using the following rights:
repo
   x public_repo

user
   x read:user
   x user:email
  • Save your GitHub username and the token it in a file called config.txt like this:
USERNAME:TOKEN

Docker compose for development

  1. Install Docker
  2. Install Docker compose (e.g. pip install docker-compose)
  3. Copy docker-compose.override.yml.example to docker-compose.override.yml and change it according to your taste.
  4. Build: docker-compose build
  5. Start docker-compose up
  6. Collect some data: docker exec -it crystal-minecr_cron_1 crystal src/mine.cr --repos spec/repos.txt
  7. Visit http://localhost:6002

Run tests

docker exec -it crystal-minecr_cron_1 crystal spec

Run test files separately

docker exec -it crystal-minecr_cron_1 crystal spec/web_test_spec.cr
docker exec -it crystal-minecr_cron_1 crystal spec/db_test_spec.cr

Data Collecion:

A single URL

docker exec -it crystal-minecr_cron_1 crystal src/mine.cr --url https://github.com/szabgab/crystal-mine.cr

Or create a file with a list of repo URLs and then call

docker exec -it crystal-minecr_cron_1 crystal src/mine.cr --repos spec/repos.txt
docker exec -it crystal-minecr_cron_1 crystal src/mine.cr --repos spec/many_repos.txt

Web application

crystal run src/webapp.cr

Build sentry:

crystal build --release lib/sentry/src/sentry_cli.cr -o ./bin/sentry

Run with sentry

./bin/sentry -b "crystal build src/webapp.cr -o bin/webapp" -r bin/webapp

CSS

Generate CSS file (public/bulma.css) from SCSS file (sass/mystles.scss):

docker run --rm -it -v$(pwd):/opt --workdir=/opt node:14.15 npm install && npm run css-build

Add fields to collect and display

  1. Add to database schema (in db)
  2. Add to store_in_db (in db)
  3. Run crystal/update.cr that will update the *.sql and *.json files in spec/
  4. Add columns to FIELDS and to parse_row
  5. Add columns to the display template

crystal-mine.cr's People

Contributors

szabgab avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

crystal-mine.cr's Issues

List which shards use ameba

  • What is their ameba configuration? Which rules are turned off usually?
  • Run ameba on every shard and collect the results showing which violations are the most frequent ones

Show the most recently updated shards

Have a URL /recent to show the list

We can start by using the date when the entry was updated in our database, but later we should move to the date the repository was updated.

list shards with problematic crystal version requirements

Create searches that will show the shards with "problematic crystal version requirements"

  • The ones with totally invalid requirements (e.g. 1-2)
  • The ones with upper limits < 2 that are not invalid but are probably unnecessary
  • The ones with ~> 1 that also set an upper limit and have the same issue as the pure upper limit ones

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.