Code Monkey home page Code Monkey logo

hatch-monorepo-sandbox's Introduction

hatch-monorepo-sandbox

This repo is a sandbox to try out using hatch to publish multiple related python packages from a single monorepo.

Main idea:

  • have a library that contains production code
  • have an auxiliary library that contains non-production code, e.g. test factories, debug helpers asf.
  • version of auxiliary lib matches version of production lib
  • when testing the production library, use the auxiliary library too

Structure of this repo:

  • my-sandbox-lib holds the project configuration for the production library.
  • my-sandbox-lib-addon holds the project configuration for the auxiliary library.
  • my-sandbox-tool an arbitrary project configuration that makes use of my-sandbox-lib & my-sandbox-lib-addon. I.e. this is how other projects would typically use my-sandbox-lib & my-sandbox-lib-addon.
  • src holds the source code
    • project configuration for an environment that combines all of the following
    • production library my-sandbox-lib
    • auxiliary library my-sandbox-lib-addon
    • test code tests

Development

Typical development activity ( updating the libs with new functionality, adding bugfixes ) would involve commands from the repo root directory, like

  • make reset_env to rebuild the python environment.
  • make format to format sources of the libs & test code.
  • make lint to lint sources of the libs & test code.
  • make test to run tests on libs.

Once development is finished, the updated libs can be build & published, using

  • make build_lib_package to build production library my-sandbox-lib.
  • make build_lib_addon_package to build auxiliary library my-sandbox-lib-addon.
  • make build_and_publish to build the libs and publish them to a PyPi repository.

hatch-monorepo-sandbox's People

Contributors

manuel-koch avatar

Stargazers

Nikolaus Schlemm avatar  avatar tcosnr avatar

Watchers

 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.