Skip to content

Add tests folder to dpnp conda package #2116

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

Merged
merged 87 commits into from
Nov 15, 2024
Merged

Conversation

vlad-perevezentsev
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev commented Oct 17, 2024

This PR suggests adding tests folder to conda package and wheel to enable pytest --pyargs dpnp.tests command

The changes contain:

  • Move tests folder to the root of dpnp ( tests -> dpnp/tests)
  • Delete MANIFEST.in and use setup.py instead
  • Using full paths instead of relative imports in cupy tests
  • Add missing __init__.py files to run single test files (pytest --pyargs dpnp.tests.third_party.cupy.math_tests.test_arithmatic)
  • Optimize test skipping and path normalization in conftest.py to ensure that tests are skipped regardless of where they are run (past logic only allowed tests to be skipped if they were run from dpnp folder)
  • Move pytest configurations from setup.cfg to conftest.py to keep it in conda package (setup.cfg is not added to conda package by default)
  • Added run_test.bat file to run tests on Windows

As well as other changes related to the move of tests folder (.flake8, pre-commit-config.yaml)

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you filing the PR as a draft?

@vlad-perevezentsev vlad-perevezentsev self-assigned this Oct 17, 2024
Copy link
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/2116/index.html

Copy link
Contributor

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more comments from me.
Thank you @vlad-perevezentsev for the effort to complete that huge improvement.

@vlad-perevezentsev vlad-perevezentsev merged commit 264c6d8 into master Nov 15, 2024
46 checks passed
@vlad-perevezentsev vlad-perevezentsev deleted the move_tests_folder branch November 15, 2024 17:10
github-actions bot added a commit that referenced this pull request Nov 15, 2024
* Move tests to dpnp folder

* Update import paths for dpnp tests

* Update paths in skipped_tests files

* Update import paths in tests_perf

* Update import paths in cupy/testing

* Update import paths in all cupy tests

* Update tests path in pyproject.toml

* Remove MANIFEST.in

* Add tests folder to conda package

* Simplify meta.yaml: move test logic to run_test.sh

* Move pytest config from setup.cfg to conftest.py

* Update call pytest in gen_coverage.py

* Update path to cupy.testing in some tests

* Update test paths for github action test_linux

* Optimize test skipping and path normalization in conftest.py

* Add norecursedirs config for tests_perf in conftest.py

* Use relative imports for dpnp tests

* Update docs for _loops.py

* Add empty __init__.py files to cupy tests

* Update import path in test_add_remove.py

* Update tests-path for GH Actions

* Show extra test summary info in internal CI

* Fix normalize_test_name() to support subdirectories

* Update normalize_test_name to run pytest from diff paths

* Add run_test.bat to conda-recipe

* Update pre-commit settings to move tests folder

* Use absolute import paths in cupy tests

* Update tests path in pyproject.toml

* Use package_data instead of data_files in setup.py to pack tests

* Update args for generate coverage

* Update import path in test_arraypad.py

* Rename TEST_SCOPE files to use pytest --pyargs

* Remove unused imports in test files

* Align import for test_arraypad.py

* Use absolute import path in cupy/testing

* Print dpnp version while testing conda package

* Disable verbose and disable-warnings pytest mode for public CI

* Disable quiet, verbose, disable-warnings pytest mode for testing conda package

* Remove dublicate env variable MODULE_NAME in conda-package.yaml

* Remove working-directory usage for Run tests in conda-package.yml 264c6d8
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.

2 participants