Coder Social home page Coder Social logo

docs_doctor's Introduction

Docs Doctor

Build Status

Manifesto

Having well documented methods and classes makes it much easier for coders to become contributors. This lib is intended to help maintainers and contributors find missing or lacking docs and fix them.

Want to get an easy commit on an open source project?

  • Write some docs

Want to understand the internals of a project better?

  • Write some docs

Want to make the world a better place for you and for future coders?

  • Write some docs

How

We use industry standard doc parsers (starting with RDoc, though other parsers and languages can be added later) to parse documentation for a given library. We store the results and flag undocumented methods/classes. Then anyone can sign up to receive an undocumented piece of code in their inbox.

Install Locally

Clone the repo then run:

$ bundle install

Setup Authentication

You'll need to set environment variables for login with GitHub. To do so, visit https://github.com/settings/applications.

Create a new app with these values:

You'll receive a Client ID and a Client Secret. Then, add them as environment variables.

The simplest way to get up and running is:

touch .env && echo "GITHUB_APP_SECRET=[your app secret here]\nGITHUB_APP_ID=[your app id here]" > .env

Restart your server to pick up these changes.

Import from Local rails/rails

reload!
repo    = Repo.where(full_name: "schneems/threaded").first_or_create
fetcher = GithubFetcher.new(repo.full_name)
parser  = DocsDoctor::Parsers::Ruby::Yard.new(fetcher.clone)
parser.process
parser.store(repo)
puts DocFile.last.path
repo    = Repo.where(full_name: "rails/rails").first_or_create
files   = '/Users/schneems/documents/projects/rails/**/*.rb'
files   = '/Users/schneems/Documents/projects/rails/activerecord/lib/rails/generators/active_record/model/model_generator.rb'
parser  = DocsDoctor::Parsers::Ruby::Rdoc.new(files)
parser.process
parser.store(repo)
# DocFile.destroy_all repo = Repo.last
doc  = repo.methods_missing_docs.first
GithubUrlFromBasePathLine.new(doc.repo.github_url, doc.doc_file.path, doc.line).to_github


repo    = Repo.where(full_name: "rails/rails").first_or_create
files   = '/Users/schneems/documents/projects/rails/**/*.rb'
parser = DocsDoctor::Parsers::Ruby::Rdoc.new(files)
parser.process
parser.store(repo)

# DocFile.destroy_all repo = Repo.last
doc  = repo.methods_missing_docs.first

Grab all subscriptions, pull out one doc_method from each

reload!
fetcher = GithubFetcher.new(full_name)
parser  = DocsDoctor::Parsers::Ruby::Rdoc.new(fetcher.clone)
parser.process
parser.store(Repo.where("full_name" => full_name).first)

Current Status

  • Debug emails not being sent
reload!
repo    = Repo.where(full_name: "schneems/rrrretry").first_or_create
fetcher = GithubFetcher.new(repo.full_name)
parser  = DocsDoctor::Parsers::Ruby::Yard.new(fetcher.clone)
parser.process
parser.store(repo)


parser.yard_objects.select {|o| o.is_a?(YARD::CodeObjects::MethodObject) }

TODO

docs_doctor's People

Contributors

barisbalic avatar greg-js avatar ianfleeton avatar kyfast avatar parndt avatar prathamesh-sonpatki avatar schneems avatar tejasbubane avatar thenickcox avatar vesan avatar

Watchers

 avatar  avatar

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.