Skip to content

Conversation

@germa89
Copy link
Collaborator

@germa89 germa89 commented Nov 17, 2025

Description

This PR migrates the project from using ansys-tools-path to ansys-tools-common. The ansys-tools-path package has been superseded by ansys-tools-common, which provides the same path-related functionality in the ansys.tools.common.path module.

Changes

Dependencies

  • Replaced ansys-tools-path>=0.3.1 with ansys-tools-common>=0.3.1 in pyproject.toml
  • Updated example requirements files to use ansys-tools-common

Code Changes

  • Added _HAS_ATC feature flag for ansys.tools.common
  • Created backward-compatible _HAS_ATP alias pointing to _HAS_ATC
  • Updated all imports from ansys.tools.path to ansys.tools.common.path
  • Updated all usages of _HAS_ATP to _HAS_ATC in source files:
    • src/ansys/mapdl/core/launcher.py
    • src/ansys/mapdl/core/report.py
    • src/ansys/mapdl/core/pool.py
    • src/ansys/mapdl/core/licensing.py
    • src/ansys/mapdl/core/mapdl_core.py

Tests

  • Updated all test imports to use ansys.tools.common.path
  • Fixed test patches to use correct module path (ansys.tools.common.path.path)
  • Updated tests in:
    • tests/test_launcher.py
    • tests/test_mapdl.py
    • tests/test_pool.py
    • tests/test_inprocess.py
    • tests/conftest.py
    • tests/common.py

Documentation

  • Updated CLI help text to reference ansys.tools.common.path
  • Updated docstrings to reference the new package
  • Updated doc/source/links.rst to point to ansys-tools-common documentation

Testing

All affected tests have been run and pass successfully:

  • ✅ Launcher tests
  • ✅ Pool tests
  • ✅ Licensing tests
  • ✅ MAPDL core tests
  • ✅ Import verification

Backward Compatibility

The _HAS_ATP alias ensures backward compatibility for any code that may reference this internal flag.

Update dependency, imports, docs, links, and tests to use ansys-tools-common
(ansys.tools.common.path) instead of ansys-tools-path. Add _HAS_ATC feature
flag and provide a backward-compatible _HAS_ATP alias. Adjust CLI/help text,
sphinx intersphinx mapping, workflow comment, and numerous test patches to
reflect the new package name.
Copilot AI review requested due to automatic review settings November 17, 2025 12:17
@germa89 germa89 requested a review from a team as a code owner November 17, 2025 12:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the project from the deprecated ansys-tools-path package to its successor ansys-tools-common. The path-related functionality remains available in the ansys.tools.common.path module. The migration includes updating dependencies, imports, feature flags, and all references across source code, tests, and documentation.

  • Replaced ansys-tools-path with ansys-tools-common in project dependencies
  • Updated all imports from ansys.tools.path to ansys.tools.common.path
  • Replaced _HAS_ATP feature flag with _HAS_ATC while maintaining backward compatibility

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Updated dependency from ansys-tools-path>=0.3.1 to ansys-tools-common>=0.2.1
src/ansys/mapdl/core/init.py Added _HAS_ATC flag and _HAS_ATP backward compatibility alias; updated imports
src/ansys/mapdl/core/launcher.py Updated feature flag usage and imports; updated error messages and documentation
src/ansys/mapdl/core/pool.py Updated feature flag usage and imports; updated error messages
src/ansys/mapdl/core/licensing.py Updated feature flag usage and imports
src/ansys/mapdl/core/mapdl_core.py Updated feature flag usage and documentation references
src/ansys/mapdl/core/report.py Updated feature flag usage, imports, and error messages
src/ansys/mapdl/core/cli/start.py Updated help text to reference ansys.tools.common.path
doc/source/links.rst Updated documentation link for ansys-tools-path
doc/source/conf.py Updated intersphinx mapping to ansys-tools-common
doc/source/api/launcher.rst Updated library references in documentation
doc/source/user_guide/troubleshoot.rst Updated function reference to new module path
tests/test_launcher.py Updated feature flag usage, imports, and test patches to new module path
tests/test_mapdl.py Updated test decorator and patches to reference new module path
tests/test_pool.py Updated dependency check and import
tests/test_inprocess.py Updated import path
tests/test_licensing.py Updated test decorators to require new package
tests/conftest.py Updated dependency check and import
tests/common.py Updated imports
.github/workflows/test-local.yml Updated comment referencing the package name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc documentation Documentation related (improving, adding, etc) dependencies maintenance General maintenance of the repo (libraries, cicd, etc) enhancement Improve any current implemented feature labels Nov 17, 2025
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.27%. Comparing base (45ead1e) to head (9b91852).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4307      +/-   ##
==========================================
- Coverage   91.31%   91.27%   -0.05%     
==========================================
  Files         193      193              
  Lines       15742    15742              
==========================================
- Hits        14375    14368       -7     
- Misses       1367     1374       +7     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@germa89
Copy link
Collaborator Author

germa89 commented Nov 17, 2025

@pyansys-ci-bot LGTM.

Copy link
Contributor

@pyansys-ci-bot pyansys-ci-bot left a comment

Choose a reason for hiding this comment

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

✅ Approving this PR because germa89 said so in here 😬

LGTM

@germa89 germa89 merged commit 8efc45e into main Nov 17, 2025
82 of 85 checks passed
@germa89 germa89 deleted the build/replace-tools-path-with-common-tools branch November 17, 2025 16:30
clatapie pushed a commit that referenced this pull request Nov 18, 2025
* chore: migrate ansys-tools-path -> ansys-tools-common

Update dependency, imports, docs, links, and tests to use ansys-tools-common
(ansys.tools.common.path) instead of ansys-tools-path. Add _HAS_ATC feature
flag and provide a backward-compatible _HAS_ATP alias. Adjust CLI/help text,
sphinx intersphinx mapping, workflow comment, and numerous test patches to
reflect the new package name.

* chore: adding changelog file 4307.maintenance.md [dependabot-skip]

* Update src/ansys/mapdl/core/report.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
clatapie pushed a commit that referenced this pull request Nov 21, 2025
* chore: migrate ansys-tools-path -> ansys-tools-common

Update dependency, imports, docs, links, and tests to use ansys-tools-common
(ansys.tools.common.path) instead of ansys-tools-path. Add _HAS_ATC feature
flag and provide a backward-compatible _HAS_ATP alias. Adjust CLI/help text,
sphinx intersphinx mapping, workflow comment, and numerous test patches to
reflect the new package name.

* chore: adding changelog file 4307.maintenance.md [dependabot-skip]

* Update src/ansys/mapdl/core/report.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
clatapie pushed a commit that referenced this pull request Nov 21, 2025
* chore: migrate ansys-tools-path -> ansys-tools-common

Update dependency, imports, docs, links, and tests to use ansys-tools-common
(ansys.tools.common.path) instead of ansys-tools-path. Add _HAS_ATC feature
flag and provide a backward-compatible _HAS_ATP alias. Adjust CLI/help text,
sphinx intersphinx mapping, workflow comment, and numerous test patches to
reflect the new package name.

* chore: adding changelog file 4307.maintenance.md [dependabot-skip]

* Update src/ansys/mapdl/core/report.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Related with CICD, Github Actions, etc dependencies documentation Documentation related (improving, adding, etc) enhancement Improve any current implemented feature maintenance General maintenance of the repo (libraries, cicd, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants