FAIRmat-NFDI / nomad-perovskite-solar-cells-database

A NOMAD plugin containing the schema for the Perovskite Solar Cell Database.
https://fairmat-nfdi.github.io/nomad-perovskite-solar-cells-database/
Apache License 2.0
4 stars 1 forks source link

25 create app for ions #34

Closed Pepe-Marquez closed 1 week ago

Pepe-Marquez commented 1 week ago

This PR introduces a search app to explore the ions database. It also changes the category of the search app from the Use Cases to Halide Perovskites.

Summary by Sourcery

Introduce a new search app for exploring ions in the halide perovskites database and update the category of the solar cell app to 'Halide Perovskites'. Add a test to verify the import of the new app.

New Features:

Enhancements:

Tests:

sourcery-ai[bot] commented 1 week ago

Reviewer's Guide by Sourcery

This PR introduces a new search app for exploring the ions database in halide perovskites. The implementation includes a new app entry point, configuration for search quantities, columns, menu items, and a dashboard with a periodic table widget. Additionally, it moves the existing solar cell app from 'Use Cases' to 'Halide Perovskites' category.

Class diagram for the new Perovskite Ions App

classDiagram
    class App {
        -label: str
        -path: str
        -category: str
        -description: str
        -search_quantities: SearchQuantities
        -columns: List[Column]
        -menu: Menu
        -dashboard: Dashboard
        -filters_locked: Dict[str, List[str]]
    }
    class SearchQuantities {
        -include: List[str]
    }
    class Column {
        -quantity: str
        -selected: bool
        -title: str
    }
    class Menu {
        -title: str
        -items: List[MenuItem]
    }
    class MenuItemTerms {
        -quantity: str
        -show_input: bool
        -title: str
    }
    class MenuItemHistogram {
        -x: Axis
    }
    class Axis {
        -search_quantity: str
        -title: str
    }
    class Dashboard {
        +parse_obj(yaml_data: str)
    }
    App --> SearchQuantities
    App --> Column
    App --> Menu
    App --> Dashboard
    Menu --> MenuItemTerms
    Menu --> MenuItemHistogram
    MenuItemHistogram --> Axis
    note for App "This class represents the new Perovskite Ions App configuration"

File-Level Changes

Change Details Files
Created a new app entry point for the Halide Perovskite Ions search functionality
  • Added new AppEntryPoint configuration with name, description, and app reference
  • Imported the new perovskite_ions_app module
src/perovskite_solar_cell_database/apps/__init__.py
Implemented the main perovskite ions search app with comprehensive configuration
  • Defined search schemas for different perovskite ion types (A, B, X)
  • Configured search columns including elements, chemical formula, IUPAC name, and SMILES
  • Set up filter menu with terms and histogram items for ion properties
  • Added a dashboard with a periodic table widget
  • Implemented filters lock for specific ELN sections
src/perovskite_solar_cell_database/apps/perovskite_ions_app.py
Updated the solar cell app category for consistency
  • Changed category from 'Use Cases' to 'Halide Perovskites'
src/perovskite_solar_cell_database/apps/solar_cell_app.py
Updated project dependencies and configuration
  • Upgraded nomad-lab dependency to version 1.3.11.dev29
pyproject.toml
Added test coverage for the new app
  • Created basic import test to verify app configuration validity
tests/apps/test_perovskite_ions_app.py

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).