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

Test directory inappropriately being included in package distribution #32

Open
dlstadther opened this issue Sep 17, 2022 · 3 comments
Open

Comments

@dlstadther
Copy link
Contributor

Currently (0.0.2), the tests directory is being included in the installation of this package.

Steps to repeat:

> python --version
Python 3.9.12

> python -m venv ~/venv/lineage
> ~/venv/lineage/bin/python -m pip install pandas-lineage==0.0.2
...
> ls ~/venv/lineage/lib/python3.9/site-packages/pandas_lineage
__init__.py  __pycache__  convention   custom_types decorators   io           tests

Suggestion:
Move tests directory outside of package location and update CI and pyproject.toml.

Typically, i see tests directories at the same file path hierarchy as the pkg itself. e.g.

pandas-lineage
|_ docs
|_ examples
|_ pandas_lineage
|_ tests
@gage-russell
Copy link
Owner

Honestly, I just started out following the same folder structure as pandas: ls venv/lib/python3.10/site-packages/pandas/tests

https://docs.python-guide.org/writing/structure/ favors your test location though. I'm in favor of moving it out of the package.

@gage-russell
Copy link
Owner

pytest docs also favor tests located outside of the package: https://docs.pytest.org/en/latest/explanation/goodpractices.html

@gage-russell
Copy link
Owner

Addressing here: #33

Taking a couple steps further though -- going ahead and redoing CI step to use poetry and expanding test matrix. Currently getting a memory error (exit code 134) on one step. Will reduce the change to just be movement of test directory and create separate issue for better usage of poetry in CI if I continue running into issues.

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

No branches or pull requests

2 participants