Skip to content

REFACTOR: Add examples folder and rework download logic #6055

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 11 commits into from
Apr 22, 2025

Conversation

SMoraisAnsys
Copy link
Collaborator

@SMoraisAnsys SMoraisAnsys commented Apr 16, 2025

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
Contributor

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

@ansys-reviewer-bot review

Copy link

codecov bot commented Apr 16, 2025

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
Copy link
Collaborator

@MaxJPRey MaxJPRey left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@Samuelopez-ansys Samuelopez-ansys left a comment

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
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
29 checks passed
@Samuelopez-ansys Samuelopez-ansys deleted the refactor/examples branch April 22, 2025 16:11
Samuelopez-ansys added 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 <[email protected]>
Co-authored-by: Maxime Rey <[email protected]>
Co-authored-by: Samuel Lopez <[email protected]>
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