Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC/WIP] move tests and avoid packaging them #1031

Merged
merged 5 commits into from Jul 13, 2020
Merged

[RFC/WIP] move tests and avoid packaging them #1031

merged 5 commits into from Jul 13, 2020

Conversation

priv-kweihmann
Copy link
Contributor

@priv-kweihmann priv-kweihmann commented Jul 12, 2020

This is the followup to #1028.

Move test files out of git module and into the root dir.
This enables it to ignore them while setuptools packaging and is resulting in a way smaller release package.

additionally a new test is added, which tests package installation, to avoid ModuleNotFound errors (e.g. #1030) in future

Please review and test locally if possible - that's why I marked it as RFC/WIP for now

This should ensure that tests are NOT packaged into
release package by setuptools, as tests are development
only
+ fixtures after moving

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
by using exclude feature of find_packages.
py_modules are determined by new function, which
recursively scans the base dir but omits the
external modules.
Plus remove now obselete package_data setting

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
and remove all previously used test related settings

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
which installs the current codebase in a venv
and runs 'import git' to test if codebase can be
installed properly.
This adds virtualenv to the test requirements

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
@priv-kweihmann priv-kweihmann changed the title [RFC/WIP] move test and avoid packaging them [RFC/WIP] move tests and avoid packaging them Jul 12, 2020
@Byron Byron self-requested a review July 13, 2020 02:02
@Byron
Copy link
Member

Byron commented Jul 13, 2020

Thanks a lot for giving it another go, and for 'the test' which will probably save many people a lot of time in future by catching bad releases before they happen.

I will cut a new release, fingers crossed!

PS: This PR is probably worth ~15GB in saved transfer volume per month if these stats can be trusted - amazing!

@Byron Byron merged commit 3edd16c into gitpython-developers:master Jul 13, 2020
@Byron Byron added this to the v3.1.6 - Bugfixes milestone Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants