GithubHelp home page GithubHelp logo

bmhaskar / fsqio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from foursquare/fsqio

0.0 1.0 0.0 11.51 MB

A monorepo that holds all of Foursquare's opensource projects

License: Apache License 2.0

Shell 0.62% Python 9.95% Scala 67.30% Java 5.62% Makefile 0.18% JavaScript 12.90% CSS 0.51% HTML 0.95% Thrift 1.96%

fsqio's Introduction

Foursquare Fsq.io

All of Foursquare's open source code in a single repo.

Build Status

All Foursquare code lives in a single repository, an architecture generally called a monorepo. Fsq.io is a subset of that internal monorepo. Fsq.io holds many of Foursquare's open source projects that had previously lived in their own separate Github repos. Foursquare contributes to a build tool specifically designed to work with monorepos called Pants. The entire Fsq.io repo is is built and tested by Pants.

Deploying directly from our monorepo has some nice advantages, for consumers of our open source projects as well as Foursquare itself. The entire repo is built daily by our CIs and internal contributions are open sourced automatically without the overhead of publishing. This repo will always contain the latest code that we use internally, all of the tools can be built just as we use them, directly from HEAD.

Projects include:

  • Exceptionator: An exception aggregator using mongodb.
  • Fhttp: A request building interface similar to scalaj-http for Finagle http clients.
  • Pants pom-resolve: A drop-in Python replacement for the Pants ivy resolver.
  • Rogue: A Scala DSL for MongoDB
  • Spindle: A Scala code generator for Thrift
  • Twofishes: A coarse, splitting geocoder and reverse geocoder in Scala
  • and others.

Requirements

  • JDK 1.8 (1.8.0_40 preferred)
  • python2.6+ (2.7 preferred)
  • postgresql
  • monogdb server (required to pass some tests)
  • An increased number of file descriptors (we use 32768)

Internally we use OSX Yosemite or later. Other OS may work but are officially unsupported. (Unofficially, if building on Linux you should install python-dev, build-essential, and libpq-dev in addition to the above).

Pants build system

Pants is a build system that works particularly well for a source code workspace containing many distinct but interdependent pieces.

Pants is similar to make, maven, ant, gradle, sbt, etc. but pants pursues different design goals. Pants optimizes for:

  • building multiple, dependent things from source
  • building code in a variety of languages
  • speed of build execution

Pants is a true community project, with major contributions from Twitter, Foursquare, Square, among other companies and independent contributors. It has friendly documentation here, in this README we will just touch on how to compile and test the code.

Compiling and Testing

First Run

The first run will take a long time as pom-resolve (our custom resolver for 3rdparty dependencies) computes the project graph and downloads the dependencies. Maybe as long as 15-20 mins! A good first run is to get this out of the way:

 ./pants pom-resolve

Targets and BUILD files

Targets are adressable project or dependency level modules that can be built by Pants. BUILD files are configuration files that define targets that can be built by Pants. Each target has a name and can be built by running a Pants task against the target's name and location.

For example, Fsq.io's JVM projects live under src/jvm here. You can compile Rogue by running:

 ./pants compile src/jvm/io/fsq/rogue:rogue

Build and Test every project

Adding a :: to a path will glob every target under that location. So to compile every target in Fsq.io:

 ./pants compile src::

Similarly, to run all the tests, (after starting the mongodb server):

./pants test test::

Projects aspirationally have READMEs at the project root.

Acknowledgements

  • Thanks to the great community supporting Pants.
  • Fsq.io is split from commits to our internal monorepo by Sapling, a git porcelain tool by @jsirois.

Discussion

Please open an issue if you have any questions or concerns.

License

Apache License, Version 2.0 (Apache-2.0)

fsqio's People

Contributors

mateor avatar fsqio avatar jvandew avatar rahulpratapm avatar slackhappy avatar nitay avatar omerzach avatar mrowl avatar

Watchers

Bharat Mhaskar 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.