Skip to content

Change to src/package structure#62

Merged
AdamRJensen merged 12 commits intomainfrom
src_folder_structure
Mar 19, 2025
Merged

Change to src/package structure#62
AdamRJensen merged 12 commits intomainfrom
src_folder_structure

Conversation

@AdamRJensen
Copy link
Member

@AdamRJensen AdamRJensen commented Mar 15, 2025

The recommended package structure is to follow the src/package folder structure, see reasoning here and here.

This has been discussed for the pvlib-python package: pvlib/pvlib-python#2403

This change only requires a few modifications to the pyproject.toml file.

@echedey-ls, @kandersolar I think it makes sense to test it out on this package as it's much simpler and will give us an idea of what needs to be changed.

@AdamRJensen
Copy link
Member Author

This change also required configuring the pyproject.toml file to recognize the package name space.

[tool.setuptools.packages.find]
where = ["src"]  # list of folders that contain the packages (["."] by default)

@echedey-ls
Copy link
Member

I miss CI testing both sdist and bdist get built correctly too, may I open a PR for that?

@AdamRJensen
Copy link
Member Author

AdamRJensen commented Mar 17, 2025

I miss CI testing both sdist and bdist get built correctly too, may I open a PR for that?

@echedey-ls Please do! I'm trying to keep this repository up to date as a template on which to base new packages on.

In fact, as an editor for JOSS, I often refer people to this rather simple package for good practices.

@AdamRJensen AdamRJensen requested a review from kandersolar March 19, 2025 15:12
@kandersolar
Copy link
Member

I don't see any issues here. I built the distribution files locally and they looked fine. I suggest merging this and then verifying that #64 still works as expected.

@AdamRJensen AdamRJensen merged commit b1421e3 into main Mar 19, 2025
17 checks passed
@AdamRJensen AdamRJensen deleted the src_folder_structure branch March 19, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants