pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

[MAINT]: Remove tests from wheel distro

Open echedey-ls opened this issue 1 year ago • 2 comments

  • [x] Closes #2271
  • [x] I am familiar with the contributing guidelines
  • [ ] Tests added
  • [ ] Updates entries in docs/sphinx/source/reference for API changes.
  • [x] Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • [ ] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • [x] Pull request is nearly complete and ready for detailed review.
  • [ ] Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

My biggest fear is that setuptools is caching things so please make a fresh local test. So far everything looks great to me:

  • Tests and test data included in sdist
  • Neither tests nor test data included in bdist

Partially addresses #1056 by moving all data files exclusively used for testing into pvlib/tests/data

Whatsnew already updated with quantified sizes from wheel both zipped and once extracted compared against v0.11.1.

echedey-ls avatar Oct 22 '24 19:10 echedey-ls

I haven't checked whether conda-forge will complain because I don't have a clue on how it tests packages, from sdist, bdist, ... Maybe anyone more knowledgable can foretell about that.

echedey-ls avatar Oct 22 '24 19:10 echedey-ls

I think there shouldn't be any problem with conda-forge. It doesn't run the tests, nor does it rely on the presence of the test data files. Additionally, the process is entirely driven by the sdist (not wheel) files on PyPI anyway, so if we only change the wheel files, I think there can't be an issue.

For reference, here's the conda-forge recipe for pvlib-python: https://github.com/conda-forge/pvlib-python-feedstock/blob/main/recipe/meta.yaml

kandersolar avatar Oct 22 '24 20:10 kandersolar

As I posted in #2271, I'm +1 to making the flat layout. Feel free to react to this message if you [dis]agree.

Btw, can you guys add the appropriate labels? I understand it may be too soon for a milestone.

echedey-ls avatar Nov 09 '24 12:11 echedey-ls

That's it. Flat structure serious proposal. One thing, the /scripts folder is getting into the sdist. May as well ignore it in the MANIFEST.in. Not doing it now cause it may be scope creep. Happy new year btw.

echedey-ls avatar Jan 03 '25 21:01 echedey-ls

@echedey-ls any idea why some data files are showing as having their contents changed?

image

kandersolar avatar Feb 19 '25 19:02 kandersolar

@echedey-ls any idea why some data files are showing as having their contents changed?

Windows magic!! @kandersolar , it's the carriage return character. Now that I look at .gitattributes, we may be missing a return characters normalization. I'll solve these for now, but it would be a great idea to add the normalization to that file. For the sake of avoiding this in the future.

echedey-ls avatar Feb 19 '25 21:02 echedey-ls

I was utterly wrong - they were committed as CRLF, now they will stay like that. In any case, 100% recommend normalization of the line endings 🌞

echedey-ls avatar Feb 19 '25 22:02 echedey-ls

Thanks, Kevin 😃

echedey-ls avatar Mar 05 '25 20:03 echedey-ls