diff --git a/doc/source/_static/js/landing_page.js b/doc/source/_static/js/landing_page.js index 93a70092..77326a04 100644 --- a/doc/source/_static/js/landing_page.js +++ b/doc/source/_static/js/landing_page.js @@ -11,15 +11,19 @@ function collectFamilies(data) { for (const project of projects) { if (!project || typeof project !== "object") continue; - const family = project.family; + // Handle families array + const projectFamilies = project.families || ["Other"]; + const icon = project.icon || "ansys-icon-light.svg"; // Fallback icon - if (family) { - if (!familyData[family]) { - familyData[family] = { count: 0, icon: icon }; + projectFamilies.forEach((family) => { + if (family) { + if (!familyData[family]) { + familyData[family] = { count: 0, icon: icon }; + } + familyData[family].count += 1; } - familyData[family].count += 1; - } + }); } return familyData; @@ -239,9 +243,23 @@ function applyFilters() { const projectCards = document.querySelectorAll(".project-card"); projectCards.forEach((card) => { - const family = card.getAttribute("data-family").toLowerCase(); - const rawTags = card.getAttribute("data-tags"); + // Handle families from data attributes + const rawFamilies = card.getAttribute("data-families"); + let cardFamilies = []; + + if (rawFamilies) { + try { + // Parse as JSON array + cardFamilies = JSON.parse(rawFamilies.replace(/'/g, '"')).map( + (family) => family.toLowerCase(), + ); + } catch (error) { + // Fallback to treating as single family string + cardFamilies = [rawFamilies.toLowerCase()]; + } + } + const rawTags = card.getAttribute("data-tags"); let cardTags = []; if (rawTags) { try { @@ -255,7 +273,10 @@ function applyFilters() { // Check if the card matches the selected families const matchesAllFamilies = - selectedFamilies.length === 0 || selectedFamilies.includes(family); + selectedFamilies.length === 0 || + selectedFamilies.some((selectedFamily) => + cardFamilies.includes(selectedFamily), + ); // Check if the card matches the selected tags const matchesAllTags = diff --git a/doc/source/api.rst b/doc/source/api.rst index a6159fd5..5feeea1d 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -24,7 +24,7 @@ PyAnsys packages API reference :gutter: 3 3 4 4 {% for project, metadata in projects['projects'].items() %} - {% if 'Tools' not in metadata['family'] %} + {% if 'Tools' not in metadata.get('families', []) %} .. grid-item-card:: {{ metadata['name'] }} :img-top: {{ metadata['thumbnail'] }} :link: {{ metadata['documentation']['api'] }} diff --git a/doc/source/examples.rst b/doc/source/examples.rst index 7aa3df21..56ab70cf 100644 --- a/doc/source/examples.rst +++ b/doc/source/examples.rst @@ -19,7 +19,7 @@ PyAnsys packages examples :gutter: 3 3 4 4 {% for project, metadata in projects['projects'].items() %} - {% if 'Tools' not in metadata['family'] %} + {% if 'Tools' not in metadata.get('families', []) %} .. grid-item-card:: {{ metadata['name'] }} :img-top: {{ metadata['thumbnail'] }} :link: {{ metadata['documentation']['examples'] }} diff --git a/doc/source/index.rst b/doc/source/index.rst index 65057d80..0439c26e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -22,12 +22,15 @@ it is now a collection of many Python packages for using Ansys products through
{% for project, metadata in projects['projects'].items() %} - {% set family = metadata.get('family', 'other') | lower | replace(' ', '-') %} - {% set tags = metadata.get('tags', 'other') | lower %} + {% set families = metadata.get('families', ['Other']) %} + {% set family_attr = families | join(',') | lower | replace(' ', '-') %} + {% set family_display = families[0] | lower | replace(' ', '-') %} + {% set tags = metadata.get('tags', []) %}
@@ -36,7 +39,9 @@ it is now a collection of many Python packages for using Ansys products through

{{ metadata['name'] }}

{{ metadata['description'] }}

- {{ family.capitalize() }} + {% for family in families %} + {{ family }} + {% endfor %} {% for tag in metadata['tags'] %} {{ tag }} {% endfor %} diff --git a/doc/source/user_guide.rst b/doc/source/user_guide.rst index 721c9099..f8751674 100644 --- a/doc/source/user_guide.rst +++ b/doc/source/user_guide.rst @@ -16,7 +16,7 @@ PyAnsys packages user guides :gutter: 3 3 4 4 {% for project, metadata in projects['projects'].items() %} - {% if 'Tools' not in metadata['family'] %} + {% if 'Tools' not in metadata.get('families', []) %} .. grid-item-card:: {{ metadata['name'] }} :img-top: {{ metadata['thumbnail'] }} :link: {{ metadata['documentation']['user_guide'] }} diff --git a/projects.yaml b/projects.yaml index b6aa2a10..a0108fdc 100644 --- a/projects.yaml +++ b/projects.yaml @@ -6,7 +6,7 @@ projects: repository: https://github.com/ansys/pyacp description: Pythonic interface to Ansys Composite PrepPost (ACP) thumbnail: _static/thumbnails/pyacp.png - family: Structures + families: [Structures] tags: [Flagship, Composites] icon: _static/icons/structures.svg documentation: @@ -20,7 +20,7 @@ projects: repository: https://github.com/ansys/pyadditive description: Pythonic interface to the Ansys Additive service thumbnail: _static/thumbnails/intro.png - family: Structures + families: [Structures] tags: [Flagship, Composites] icon: _static/icons/structures.svg documentation: @@ -34,7 +34,7 @@ projects: repository: https://github.com/ansys/pyaedt description: Pythonic interface to Ansys Electronics Desktop (AEDT) thumbnail: _static/thumbnails/pyaedt.png - family: Electronics + families: [Electronics] tags: [Flagship] icon: _static/icons/electromagnetics.svg documentation: @@ -48,7 +48,7 @@ projects: repository: https://github.com/ansys/pyansys-geometry description: Pythonic interface to the Ansys Geometry service thumbnail: _static/thumbnails/pyansys-geometry.png - family: CAD + families: [CAD] tags: [Flagship] icon: _static/icons/design.svg documentation: @@ -62,7 +62,7 @@ projects: repository: https://github.com/ansys/pyansys-math description: Pythonic interface to PyAnsys Math libraries thumbnail: _static/thumbnails/pyansys-math.png - family: Structures + families: [Structures] tags: [Tools] icon: _static/icons/structures.svg documentation: @@ -76,7 +76,7 @@ projects: repository: https://github.com/ansys/pyansys-sound description: Pythonic interface to Ansys Sound thumbnail: _static/thumbnails/pyansys-sound.png - family: Acoustics + families: [Acoustics] tags: [Post-processing, Flagship] icon: _static/icons/sound.svg documentation: @@ -90,7 +90,7 @@ projects: repository: https://github.com/ansys/pyconceptev description: Pythonic interface to Ansys ConceptEV library thumbnail: _static/thumbnails/pyconceptev.png - family: Electronics + families: [Electronics] tags: [Tools] icon: _static/icons/electromagnetics.svg documentation: @@ -104,7 +104,7 @@ projects: repository: https://github.com/ansys/pydpf-core description: Pythonic interface to the Data Processing Framework (DPF) for building advanced and customized workflows thumbnail: _static/thumbnails/pydpf-core.png - family: Structures + families: [Structures] tags: [Post-processing, Flagship] icon: _static/icons/platform.svg documentation: @@ -118,7 +118,7 @@ projects: repository: https://github.com/ansys/pydpf-post description: Pythonic interface to access and postprocess Ansys solver result files thumbnail: _static/thumbnails/pydpf-post.png - family: Structures + families: [Structures] tags: [Post-processing, Flagship] icon: _static/icons/platform.svg documentation: @@ -132,7 +132,7 @@ projects: repository: https://github.com/ansys/pydpf-composites description: Pythonic interface to postprocess layered and short-fiber composite models thumbnail: _static/thumbnails/pydpf-composites.png - family: Structures + families: [Structures] tags: [Post-processing, Composites] icon: _static/icons/structures.svg documentation: @@ -146,7 +146,7 @@ projects: repository: https://github.com/ansys/pydyna description: Pythonic interface to build the Ansys DYNA input deck, submit it to the Ansys LS-DYNA solver, and postprocess its results thumbnail: _static/thumbnails/pydyna.png - family: Structures + families: [Structures] tags: [Flagship] icon: _static/icons/structures.svg documentation: @@ -160,7 +160,7 @@ projects: repository: https://github.com/ansys/pydynamicreporting description: Pythonic interface to Ansys Dynamic Reporting for service and control of its database and reports thumbnail: _static/thumbnails/pydynamicreporting.png - family: Platform + families: [Fluids, Electronics] tags: [Tools] icon: _static/icons/platform.svg documentation: @@ -174,7 +174,7 @@ projects: repository: https://github.com/ansys/pyedb description: Pythonic interface to the Ansys Electronics Database (EDB) client library thumbnail: _static/thumbnails/pyedb.png - family: Electronics + families: [Electronics] tags: [Flagship] icon: _static/icons/electromagnetics.svg documentation: @@ -188,7 +188,7 @@ projects: repository: https://github.com/ansys/pyedb-core description: Pythonic interface to Ansys Electronics Database (EDB) thumbnail: _static/thumbnails/pyedb.png - family: Electronics + families: [Electronics] tags: [Flagship] icon: _static/icons/electromagnetics.svg documentation: @@ -202,7 +202,7 @@ projects: repository: https://github.com/ansys/pyensight description: Pythonic interface to EnSight, the Ansys simulation postprocessor thumbnail: _static/thumbnails/pyensight.png - family: Fluids + families: [Fluids] tags: [Flagship] icon: _static/icons/fluids.svg documentation: @@ -216,7 +216,7 @@ projects: repository: https://github.com/ansys/pyfluent description: Pythonic interface to Ansys Fluent thumbnail: _static/thumbnails/pyfluent.png - family: Fluids + families: [Fluids] tags: [Flagship, Visualization] icon: _static/icons/fluids.svg documentation: @@ -230,7 +230,7 @@ projects: repository: https://github.com/ansys/pyfluent-visualization description: Pythonic interface to visualize Ansys Fluent simulations thumbnail: _static/thumbnails/pyfluent-visualization.png - family: Fluids + families: [Fluids] tags: [Tools, Visualization] icon: _static/icons/fluids.svg documentation: @@ -244,7 +244,7 @@ projects: repository: https://github.com/ansys/pygranta description: Pythonic interface to Ansys Granta MI services thumbnail: _static/thumbnails/pygranta.png - family: Materials + families: [Materials] tags: [Flagship] icon: _static/icons/materials.svg documentation: @@ -258,7 +258,7 @@ projects: repository: https://github.com/ansys/pyhps description: Pythonic interface to Ansys HPC Platform Services (HPS) thumbnail: _static/thumbnails/intro.png - family: Platform + families: [Platform] tags: [Tools] icon: _static/icons/platform.svg documentation: @@ -272,7 +272,7 @@ projects: repository: https://github.com/ansys/pyhps-data-transfer description: A Python client for Data Transfer in Ansys HPC Platform Services thumbnail: _static/thumbnails/intro.png - family: Platform + families: [Platform] tags: [Tools] icon: _static/icons/platform.svg documentation: @@ -286,7 +286,7 @@ projects: repository: https://github.com/ansys/pymapdl description: A Python client library for Ansys MAPDL (Mechanical APDL) thumbnail: _static/thumbnails/pymapdl.png - family: Structures + families: [Structures] tags: [Flagship] icon: _static/icons/structures.svg documentation: @@ -300,7 +300,7 @@ projects: repository: https://github.com/ansys/pymapdl-reader description: A legacy Python library to read MAPDL result files (MAPDL 14.5 and later) thumbnail: _static/thumbnails/pymapdl.png - family: Structures + families: [Structures] tags: [Tools] icon: _static/icons/structures.svg documentation: @@ -314,7 +314,7 @@ projects: repository: https://github.com/ansys/pymechanical description: Pythonic interface to Ansys Mechanical thumbnail: _static/thumbnails/pymechanical.png - family: Structures + families: [Structures] tags: [Flagship] icon: _static/icons/structures.svg documentation: @@ -328,7 +328,7 @@ projects: repository: https://github.com/ansys/pymodelcenter description: Pythonic interface to Ansys ModelCenter thumbnail: _static/thumbnails/pymodelcenter.png - family: Connect + families: [Connect] tags: [Flagship] icon: _static/icons/connect.svg documentation: @@ -342,7 +342,7 @@ projects: repository: https://github.com/ansys/pymotorcad description: Pythonic interface to Ansys Motor-CAD thumbnail: _static/thumbnails/pymotorcad.png - family: Electronics + families: [Electronics] tags: [Flagship] icon: _static/icons/electromagnetics.svg documentation: @@ -356,7 +356,7 @@ projects: repository: https://github.com/ansys/pyoptislang description: Pythonic interface to Ansys optiSLang thumbnail: _static/thumbnails/pyoptislang.png - family: Platform + families: [Connect] tags: [Flagship] icon: _static/icons/platform.svg documentation: @@ -370,7 +370,7 @@ projects: repository: https://github.com/ansys/pypim description: Pythonic interface to the Ansys PIM (Product Instance Management) API thumbnail: _static/thumbnails/intro.png - family: Platform + families: [Platform] tags: [Tools] icon: _static/icons/platform.svg documentation: @@ -384,7 +384,7 @@ projects: repository: https://github.com/ansys/pyprimemesh description: Python library to acquire geometries and prepare surface and volume meshes for multiple solvers thumbnail: _static/thumbnails/pyprimemesh.png - family: Meshing + families: [Meshing, CAD] tags: [Flagship] icon: _static/icons/platform.svg documentation: @@ -398,7 +398,7 @@ projects: repository: https://github.com/ansys/pyrocky description: Python interface to Ansys Rocky using Rocky PrePost API thumbnail: _static/thumbnails/pyrocky.png - family: Fluids + families: [Fluids] tags: [Flagship] icon: _static/icons/fluids.svg documentation: @@ -412,7 +412,7 @@ projects: repository: https://github.com/ansys/pyscadeone description: Pythonic interface to Ansys Scade One thumbnail: _static/thumbnails/pyscadeone.png - family: Embedded Software + families: [Embedded Software] tags: [Software] icon: _static/icons/embedded-software.svg documentation: @@ -426,7 +426,7 @@ projects: repository: https://github.com/ansys/pyseascape description: Pythonic interface to Ansys RedHawkSC and TotemSC thumbnail: _static/thumbnails/intro.png - family: Semiconductors + families: [Semiconductors] tags: [Flagship] icon: _static/icons/semiconductors.svg documentation: @@ -440,7 +440,7 @@ projects: repository: https://github.com/ansys/pysherlock description: Pythonic interface to Ansys Sherlock thumbnail: _static/thumbnails/pysherlock.png - family: Electronics + families: [Electronics, Multiphysics, Structures] tags: [Flagship, Thermal] icon: _static/icons/structures.svg documentation: @@ -454,7 +454,7 @@ projects: repository: https://github.com/ansys/pysimai description: Pythonic interface to SimAI thumbnail: _static/thumbnails/pysimai.png - family: AI + families: [AI] tags: [Flagship] icon: _static/icons/ai-ml.svg documentation: @@ -468,7 +468,7 @@ projects: description: A Python wrapper for Ansys Speos thumbnail: _static/thumbnails/pyspeos.png repository: https://speos.docs.pyansys.com/version/stable/index.html - family: Optics + families: [Optics] tags: [Flagship] icon: _static/icons/optics.svg documentation: @@ -483,7 +483,7 @@ projects: repository: https://github.com/ansys/pysystemcoupling description: Pythonic interface to Ansys System Coupling thumbnail: _static/thumbnails/pysystem-coupling.png - family: Other + families: [Structures] tags: [Flagship] icon: _static/icons/design.svg documentation: @@ -497,7 +497,7 @@ projects: repository: https://github.com/ansys/pyturbogrid description: Pythonic interface to Ansys TurboGrid, a high-quality turbomachinery meshing software app thumbnail: _static/thumbnails/pyturbogrid.png - family: Fluids + families: [Fluids] tags: [Flagship] icon: _static/icons/fluids.svg documentation: @@ -511,7 +511,7 @@ projects: repository: https://github.com/ansys/pytwin description: Pythonic interface to communicate with consumption workflows for Ansys digital twins thumbnail: _static/thumbnails/pytwin.png - family: Digital Twin + families: [Digital Twin] tags: [Flagship] icon: _static/icons/digital-twins.svg documentation: @@ -525,7 +525,7 @@ projects: repository: https://github.com/ansys/pyworkbench description: Pythonic interface to Ansys Workbench thumbnail: _static/thumbnails/intro.png - family: Other + families: [Platform, Multiphysics] tags: [Flagship] icon: _static/icons/platform.svg documentation: @@ -539,7 +539,7 @@ projects: repository: https://github.com/ansys/openapi-common description: Shared Ansys software components to enable package interoperability and minimize maintenance thumbnail: _static/thumbnails/intro.png - family: Other + families: [Other] tags: [Tools] icon: _static/icons/ansys-icon-light.svg documentation: @@ -553,7 +553,7 @@ projects: description: Shared Ansys Electronics Desktop (AEDT) toolkit components to enable package interoperability and minimize maintenance thumbnail: _static/thumbnails/intro.png repository: https://github.com/ansys/pyaedt-toolkits-common - family: Tools + families: [Tools] tags: [PyAEDT toolkits] icon: _static/icons/ansys-icon-light.svg documentation: @@ -564,7 +564,7 @@ projects: description: Python wrapper for modeling antennas using Ansys Electronics Desktop (AEDT) via PyAEDT thumbnail: _static/thumbnails/intro.png repository: - family: Tools + families: [Tools] tags: [PyAEDT toolkits] icon: _static/icons/ansys-icon-light.svg documentation: @@ -575,7 +575,7 @@ projects: description: Python wrapper for automating the segmentation and skew of interior permanent magnet (IPM) and surface permanent magnet (SPM) motors using Ansys Electronics Desktop (AEDT) thumbnail: _static/thumbnails/intro.png repository: - family: Tools + families: [Tools] tags: [PyAEDT toolkits] icon: _static/icons/ansys-icon-light.svg documentation: @@ -586,7 +586,7 @@ projects: description: Simple cross-platform QT application to install Python and PyAnsys packages thumbnail: _static/thumbnails/ansys-python-manager.png repository: - family: Tools + families: [Tools] tags: [General purpose] icon: _static/icons/ansys-icon-light.svg documentation: @@ -597,7 +597,7 @@ projects: description: PyAnsys cheat sheets for different libraries as quick reference guides thumbnail: _static/thumbnails/pyansys-cheat-sheets.png repository: - family: Tools + families: [Tools] tags: [General purpose] icon: _static/icons/ansys-icon-light.svg documentation: @@ -608,7 +608,7 @@ projects: description: Ansys project used to calculate Power Density or Cumulative Distribution Function thumbnail: _static/thumbnails/5gwizard.png repository: https://github.com/ansys/5G-Wizard - family: Tools + families: [Tools] tags: [General purpose] icon: _static/icons/ansys-icon-light.svg documentation: @@ -619,7 +619,7 @@ projects: description: Demonstrating the REST and gRPC communication protocols via client-server interactions thumbnail: _static/thumbnails/pyansys-common.png repository: - family: Tools + families: [Tools] tags: [Demo] icon: _static/icons/ansys-icon-light.svg documentation: @@ -630,7 +630,7 @@ projects: description: Ansys tool for creating new projects according to Ansys guidelines thumbnail: _static/thumbnails/pyansys-common.png repository: https://templates.ansys.com/version/stable - family: Tools + families: [Tools] tags: [Repository management] icon: _static/icons/ansys-icon-light.svg documentation: @@ -641,7 +641,7 @@ projects: description: Collection of GitHub Workflows to be reused by projects in the Ansys ecosystem thumbnail: _static/thumbnails/pyansys-common.png repository: https://actions.docs.ansys.com/version/stable - family: Tools + families: [Tools] tags: [Repository management] icon: _static/icons/ansys-icon-light.svg documentation: @@ -652,7 +652,7 @@ projects: description: Ansys repository containing customized pre-commit hooks thumbnail: _static/thumbnails/pyansys-common.png repository: https://pre-commit-hooks.docs.ansys.com/version/stable - family: Tools + families: [Tools] tags: [Repository management] icon: _static/icons/ansys-icon-light.svg documentation: @@ -663,7 +663,7 @@ projects: description: Ansys tool intended to synchronize the content of two different repositories thumbnail: _static/thumbnails/pyansys-common.png repository: https://ansys.github.io/ansys-tools-repo-sync/version/stable - family: Tools + families: [Tools] tags: [Repository management] icon: _static/icons/ansys-icon-light.svg documentation: @@ -674,7 +674,7 @@ projects: description: Repository for updating an organization's ``all-members`` team automatically thumbnail: _static/thumbnails/pyansys-common.png repository: https://github.com/ansys/ansys-all-members - family: Tools + families: [Tools] tags: [Repository management] icon: _static/icons/ansys-icon-light.svg documentation: @@ -685,7 +685,7 @@ projects: description: Extension of the popular PyData Sphinx Theme that is used by Numpy, Pandas, PyVista, and many more scientific Python packages thumbnail: _static/thumbnails/pyansys-common.png repository: https://sphinxdocs.ansys.com/version/stable/index.html - family: Tools + families: [Tools] tags: [Documentation] icon: _static/icons/ansys-icon-light.svg documentation: @@ -696,7 +696,7 @@ projects: description: Python development tool for leveraging the power of OpenAI to automatically generate suggestions for improving GitHub pull requests thumbnail: _static/thumbnails/pyansys-common.png repository: https://review-bot.docs.pyansys.com/version/stable/index.html - family: Tools + families: [Tools] tags: [Artificial intelligence] icon: _static/icons/ansys-icon-light.svg documentation: @@ -707,7 +707,7 @@ projects: description: Enhanced Python API to Meilisearch thumbnail: _static/thumbnails/pyansys-common.png repository: https://pymeilisearch.docs.ansys.com/version/stable/index.html - family: Tools + families: [Tools] tags: [Documentation] icon: _static/icons/ansys-icon-light.svg documentation: @@ -718,7 +718,7 @@ projects: description: A Python wrapper to convert XML documentation into Python source code with its Sphinx documentation. thumbnail: _static/thumbnails/pyansys-common.png repository: https://pyconverter-xml2py.docs.pyansys.com/version/stable/index.html - family: Tools + families: [Tools] tags: [Documentation] icon: _static/icons/ansys-icon-light.svg documentation: