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.

Support for multiple packages within a single directory

See original GitHub issue

hey, thanks for the package, this is really what I need for my project!

There’s one thing I don’t get though. What if I want to enfoce import rules at the root of my project, not at one of its modules?

For example, I have a django project with a core module with some utilities and an apps module with several django apps. Is there a way to prohibit anything from the apps module to import the core module? What should be placed in the root_package setting then?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
seddonymcommented, Jul 15, 2019

Hi Sem,

Thanks for your comment, sorry for the delay in responding (I was on holiday).

I’m inclined to think you’re right. Until recently I had seen this approach as being a nonstandard way to organise Python code bases but it’s much commoner than I had appreciated.

It’s a fair amount of work to achieve this, as it involves rethinking the foundations of Grimp, which is the library that builds the dependency graph that Import Linter analyses. I’ve created an issue there for the time being: https://github.com/seddonym/grimp/issues/62

0reactions
QasimKcommented, Oct 8, 2019

Thanks @seddonym! I hope to test this soon!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Confusing error message when project contains duplicates in ...
Navigate to the b directory, then run cabal v2-repl . System information. % cabal --version cabal-install version 2.4.1.0 compiled using version ...
Read more >
go - Does it make sense to have two packages in the same ...
Just move your packages inside a new folder within the same directory of main.go. Remember to import the new package from the reference...
Read more >
Usage of subdirectories to store multiple packages in a single ...
According to Registrator.jl#287 and Pkg.jl#1422 merged pull requests, several packages can now be organized as subdirectories of a single ...
Read more >
Multiple Package Directories | Salesforce DX Developer Guide
More than one package directory contains the same metadata component, and you want to specify which one is deployed last so it's not...
Read more >
go command - cmd/go - Go Packages
If the command line lists .go files from a single directory, they are treated as a single package. Within a package, generate processes...
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