Skip to content

REFACTOR: Add examples folder and rework download logic#6055

Merged
Samuelopez-ansys merged 11 commits into
mainfrom
refactor/examples
Apr 22, 2025
Merged

REFACTOR: Add examples folder and rework download logic#6055
Samuelopez-ansys merged 11 commits into
mainfrom
refactor/examples

Conversation

@SMoraisAnsys

@SMoraisAnsys SMoraisAnsys commented Apr 16, 2025

Copy link
Copy Markdown
Collaborator

Description

This PR consists in refactoring the downloads logic. While doing so, an architecture refactoring was performed and a folder examples is now under ansys.aedt.core. It contains the modified dowloads.py module and can be extended with other actions related to the examples.

The download refactoring consist in:

  • simplifying how the download calls are performed: use input github_relative_path to provide the path to the file/folder in github, use input filter_func to specify files/folders to be filtered, use strip_prefix to remove the original structure (e.g. allowing to download the file "pyaedt/edb/Galileo.aedb/GRM32ER72A225KA35_25C_0V.sp" without creating locally "pyaedt/edb/Galileo.aedb");
  • safely constructing a URL using the user-provided input.

Issue linked

Associated to #5504

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate tests (unit, integration, system).
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved by the PR if any.
  • I have agreed with the Contributor License Agreement (CLA).

@SMoraisAnsys SMoraisAnsys self-assigned this Apr 16, 2025
@ansys-reviewer-bot

Copy link
Copy Markdown
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@codecov

codecov Bot commented Apr 16, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 85.11628% with 32 lines in your changes missing coverage. Please review.

Project coverage is 85.13%. Comparing base (a3ecaf0) to head (f67683d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6055      +/-   ##
==========================================
- Coverage   85.14%   85.13%   -0.01%     
==========================================
  Files         167      167              
  Lines       63040    63056      +16     
==========================================
+ Hits        53674    53685      +11     
- Misses       9366     9371       +5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

MaxJPRey
MaxJPRey previously approved these changes Apr 17, 2025

@MaxJPRey MaxJPRey left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

Comment thread src/ansys/aedt/core/examples/downloads.py Outdated

@Samuelopez-ansys Samuelopez-ansys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Samuelopez-ansys Samuelopez-ansys enabled auto-merge (squash) April 22, 2025 15:16
@SMoraisAnsys

Copy link
Copy Markdown
Collaborator Author

@Samuelopez-ansys @MaxJPRey Let's wait a bit before merging to see if the pyaedt-examples are not impacted. I'll open a PR to test that :)

@Samuelopez-ansys Samuelopez-ansys merged commit 07827c1 into main Apr 22, 2025
@Samuelopez-ansys Samuelopez-ansys deleted the refactor/examples branch April 22, 2025 16:11
Samuelopez-ansys pushed a commit that referenced this pull request Apr 24, 2025
Samuelopez-ansys pushed a commit that referenced this pull request Apr 24, 2025
nunesanderson pushed a commit that referenced this pull request Apr 30, 2025
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
Co-authored-by: Maxime Rey <87315832+MaxJPRey@users.noreply.github.com>
Co-authored-by: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com>
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.

4 participants