Skip to content

[Enh]: consider switching to src layout #881

@EdAbati

Description

@EdAbati

We would like to learn about your use case. For example, if this feature is needed to adopt Narwhals in an open source project, could you please enter the link to it below?

No response

Please describe the purpose of the new feature or describe the problem to solve.

AFAIK the "src-layout" should be preferred to the "flat-layout"

Some opinions:

  • The src layout helps prevent accidental usage of the in-development copy of the code.
  • The src layout helps enforce that an editable installation is only able to import files that were meant to be importable.

source

If you use the ad hoc layout without an src directory, your tests do not run against the package as it will be installed by its users.

source

I think it will also simplify the build and make sure we don't include files/directories we don't need. (see #879)

Of course, if we merge this change, all the open PRs will have to fix conflicts. It will be better to schedule well a change like this one (before a sprint for example :) )

Suggest a solution if possible.

No response

If you have tried alternatives, please describe them below.

No response

Additional information that may help us understand your needs.

Happy to hear what you all think! 👀

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions