question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello,

I appreciate the introduction of hatch and what it offers. But of course we are all looking for a build-tool which can do everything. So I ask, since it is very common with microservice based architectures, is the usage of Monrepos somehow a concern in the design of hatch?

I mean instead of a structure like this:

package
├── module
├── tests
└── pyproject.toml

having something like this:

package_a
├── module
├── tests
└── pyproject.toml
package_b
├── module
├── tests
└── pyproject.toml

with the requirement of

  • having also shared project dependecies, i.e. pytest and similar which are shared among all sub projects and are automatically installed in to each projects dev dependencies
  • quickly switching projects (i.e. virtual environments)?
  • executing tests automatically in each separate virtual environment?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:8
  • Comments:6

github_iconTop GitHub Comments

5reactions
aka-raccooncommented, Aug 22, 2022

Hi I was looking for a way how to manage a monorepo with multiple AWS lambdas and how to combine that with Python best practices. My requirements were:

  • usage of src/ folder
  • only one pyproject for the whole repo
  • ability to build lambdas with separated requirements for each

Thanks to great modularity of Hatch I was able to come up with custom builder called hatch-aws. You can use it to build AWS lambdas. I plan to add publish option in future.

Hopes somebody else finds it useful too.

4reactions
adriangbcommented, Sep 8, 2022

I also am interested in this. More precisely, I’m looking for something like Cargo workspaces that let me:

  1. Have a single top level lockfile.
  2. Establish interdependencies between libraries/apps and let me install/build a single app/library (e.g. install a single micro service and all of its dependencies in a container image).
  3. Can run tests on all packages (cargo test) or a single package (cargo test -p add_one). This is more of a nice to have since (ideally) you can always pushd add_one; pytest; popd.

I realize this may technically be possible with Hatch (based on https://github.com/pypa/hatch/issues/233#issuecomment-1123820713) but it seems like custom stuff and a good chunk of knowledge is required to make it work. It would be really nice to see a self contained writeup or plugin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monorepo Explained
Gradle Build Tool provides support for parallel tasks via configuration, and task orchestration through its flexible Groovy or Kotlin DSL. natively supported ......
Read more >
What is monorepo? (and should you use it?) - Semaphore CI
A monorepo is a version-controlled code repository that holds many projects. While these projects may be related, they are often logically ...
Read more >
Monorepos in Git | Atlassian Git Tutorial
A monorepo is a repository that contains more than one logical project. Read here to learn about conceptual challenges, performance issues and more....
Read more >
Monorepo Support | Render · Cloud Hosting for Developers
Monorepo Support helps you deploy just the services you need to eliminate unnecessary deploys, control build costs, and ship faster. Monorepo Support offers...
Read more >
A Guide to Monorepos for Front-end Code - Toptal
A monorepo or monorepository is a code management and architectural concept whereby you keep all your isolated bits of code inside one super...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found