-
Notifications
You must be signed in to change notification settings - Fork 1
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
Llm extraction schema #32
Open
sherjeelshabih
wants to merge
37
commits into
main
Choose a base branch
from
llm-extraction-schema
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+782
−8
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
ae2bc0d
First version of edit extraction schema
Pepe-Marquez d900bbc
feat: migrate extraction schema to new version (#27)
kjappelbaum 3bcaac6
Draft of app for the extracted entries
Pepe-Marquez 2e81450
Fixed key in app.
Pepe-Marquez c383627
Polishing some annotations in the ELN
Pepe-Marquez d6c5775
Added proper radio ELN component
Pepe-Marquez 14314d5
fix typo in key
Pepe-Marquez 0fd4a67
Changed the enum of the device architecture.
Pepe-Marquez 6a7d6e9
Unsaved fixes in pyproject
Pepe-Marquez 8d85166
Changed atmosphese from section to enum
Pepe-Marquez 8405cb8
Replaced Perovskite composition
Pepe-Marquez e18a5c7
Organized imports
Pepe-Marquez b984969
Changed coefficient to str
hampusnasstrom b379b69
Changed descriptive formula to long form
hampusnasstrom 32a571e
Changed edit quantity for coefficient
hampusnasstrom ab8cb7b
feat: update schema to match the pydantic model and add field for upd…
kjappelbaum 9dfdf93
chore: update signature of normalizer function
kjappelbaum 0d4ad8d
fix: bug in normalizer
kjappelbaum c238409
chore: use better code from sourcery
kjappelbaum 43ed10f
Update src/perovskite_solar_cell_database/llm_extraction_schema.py
kjappelbaum bdea315
Added missing super normalize call and corrected default display unit
hampusnasstrom 80c0d87
Implements all feedback from Jesper
sherjeelshabih 4114360
ruff
sherjeelshabih a3b3923
Changed empty strings to Unknown and changed solvent ratio to volume_…
hampusnasstrom 90a152a
Ruff
hampusnasstrom d56b9bb
Remove gas and antisolvent quenching quantities from ProcessingStep
hampusnasstrom 6dba7cd
Fixes label for volume fraction
sherjeelshabih d144f3f
Adds hints for some appropriate fields that might require a quick check
sherjeelshabih 3b2e581
ruff isort
sherjeelshabih d6f0be7
Removes bandgap at the top level
sherjeelshabih aa12679
Adds Evaporation to ProcessingStep Method
sherjeelshabih ca4221c
Updates the description for ReactionSolution Volume
sherjeelshabih 489e22c
Fixes entry_type
sherjeelshabih 5a74873
Adds mg/mL unit
sherjeelshabih bbf2608
Ruff
sherjeelshabih dfabf12
Adds lightsource fields to stability section
sherjeelshabih 4b10f99
Moves up super()normalizer to get EntryType
sherjeelshabih File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
215 changes: 215 additions & 0 deletions
215
src/perovskite_solar_cell_database/apps/llm_extracted_solarcells.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
import yaml | ||
from nomad.config.models.ui import ( | ||
App, | ||
Column, | ||
Columns, | ||
FilterMenu, | ||
FilterMenus, | ||
Filters, | ||
) | ||
|
||
llm_extracted_solar_cells = App( | ||
# Label of the App | ||
label='LLM Extracted Solar Cells', | ||
# Path used in the URL, must be unique | ||
path='llm-extracted-solar-cells', | ||
# Used to categorize apps in the explore menu | ||
category='LLM strcutured data extraction', | ||
# Brief description used in the app menu | ||
description=""" | ||
Explore the LLM extracted solar cells. | ||
""", | ||
# Longer description that can also use markdown | ||
readme=""" | ||
Explore LLM extracted solar cells. | ||
""", | ||
# Controls the available search filters. If you want to filter by | ||
# quantities in a schema package, you need to load the schema package | ||
# explicitly here. Note that you can use a glob syntax to load the | ||
# entire package, or just a single schema from a package. | ||
filters=Filters( | ||
include=[ | ||
'*#perovskite_solar_cell_database.llm_extraction_schema.LLMExtractedPerovskiteSolarCell', | ||
] | ||
), | ||
# Controls which columns are shown in the results table | ||
columns=Columns( | ||
selected=[ | ||
'authors', | ||
# 'results.material.elements', | ||
'entry_type', | ||
'data.review_completed#perovskite_solar_cell_database.llm_extraction_schema.LLMExtractedPerovskiteSolarCell', | ||
'references', | ||
# 'data.lab_id#nomad_material_processing.combinatorial.ThinFilmCombinatorialSample' | ||
], | ||
options={ | ||
'entry_type': Column(label='Entry type', align='left'), | ||
'entry_name': Column(label='Name', align='left'), | ||
'entry_create_time': Column(label='Entry time', align='left'), | ||
'authors': Column(label='Authors', align='left'), | ||
'upload_name': Column(label='Upload name', align='left'), | ||
'references': Column(label='References', align='left'), | ||
'data.review_completed#perovskite_solar_cell_database.llm_extraction_schema.LLMExtractedPerovskiteSolarCell': Column( | ||
label='Review completed', align='left' | ||
), # noqa: E501 | ||
'data.publication_title#perovskite_solar_cell_database.llm_extraction_schema.LLMExtractedPerovskiteSolarCell': Column( | ||
label='Publication title', align='left' | ||
), # noqa: E501 | ||
# 'data.lab_id#nomad_htem_database.schema_packages.htem_package.HTEMLibrary': Column( # noqa: E501 | ||
# label='Library ID', align='left' | ||
# ), | ||
'results.material.elements': Column(label='Elements', align='left'), | ||
}, | ||
), | ||
# Dictionary of search filters that are always enabled for queries made | ||
# within this app. This is especially important to narrow down the | ||
# results to the wanted subset. Any available search filter can be | ||
# targeted here. This example makes sure that only entries that use | ||
# MySchema are included. | ||
filters_locked={ | ||
'entry_type': 'LLMExtractedPerovskiteSolarCell', | ||
}, | ||
# Controls the filter menus shown on the left | ||
filter_menus=FilterMenus( | ||
options={ | ||
'material': FilterMenu(label='Material', level=0), | ||
'elements': FilterMenu(label='Elements / Formula', level=1, size='xl'), | ||
'eln': FilterMenu(label='Electronic Lab Notebook', level=0), | ||
'custom_quantities': FilterMenu( | ||
label='User Defined Quantities', level=0, size='l' | ||
), | ||
'author': FilterMenu(label='Author / Origin / Dataset', level=0, size='m'), | ||
'metadata': FilterMenu(label='Visibility / IDs / Schema', level=0), | ||
'optimade': FilterMenu(label='Optimade', level=0, size='m'), | ||
} | ||
), | ||
# Controls the default dashboard shown in the search interface | ||
dashboard=yaml.safe_load( | ||
""" | ||
widgets: | ||
- type: terms | ||
scale: linear | ||
quantity: data.journal#perovskite_solar_cell_database.llm_extraction_schema.LLMExtractedPerovskiteSolarCell | ||
layout: | ||
xxl: | ||
minH: 3 | ||
minW: 3 | ||
h: 9 | ||
w: 6 | ||
y: 0 | ||
x: 6 | ||
xl: | ||
minH: 3 | ||
minW: 3 | ||
h: 5 | ||
w: 6 | ||
y: 0 | ||
x: 6 | ||
lg: | ||
minH: 3 | ||
minW: 3 | ||
h: 9 | ||
w: 6 | ||
y: 0 | ||
x: 6 | ||
md: | ||
minH: 3 | ||
minW: 3 | ||
h: 5 | ||
w: 4 | ||
y: 0 | ||
x: 4 | ||
sm: | ||
minH: 3 | ||
minW: 3 | ||
h: 5 | ||
w: 3 | ||
y: 0 | ||
x: 4 | ||
- type: terms | ||
scale: linear | ||
quantity: authors.name | ||
title: Reviewer names | ||
layout: | ||
xxl: | ||
minH: 3 | ||
minW: 3 | ||
h: 9 | ||
w: 6 | ||
y: 0 | ||
x: 0 | ||
xl: | ||
minH: 3 | ||
minW: 3 | ||
h: 5 | ||
w: 6 | ||
y: 0 | ||
x: 0 | ||
lg: | ||
minH: 3 | ||
minW: 3 | ||
h: 9 | ||
w: 6 | ||
y: 0 | ||
x: 0 | ||
md: | ||
minH: 3 | ||
minW: 3 | ||
h: 5 | ||
w: 4 | ||
y: 0 | ||
x: 0 | ||
sm: | ||
minH: 3 | ||
minW: 3 | ||
h: 5 | ||
w: 4 | ||
y: 0 | ||
x: 0 | ||
- type: histogram | ||
autorange: false | ||
nbins: 30 | ||
y: | ||
scale: linear | ||
x: | ||
quantity: data.publication_date#perovskite_solar_cell_database.llm_extraction_schema.LLMExtractedPerovskiteSolarCell | ||
layout: | ||
xxl: | ||
minH: 3 | ||
minW: 3 | ||
h: 3 | ||
w: 8 | ||
y: 0 | ||
x: 12 | ||
xl: | ||
minH: 3 | ||
minW: 3 | ||
h: 3 | ||
w: 7 | ||
y: 0 | ||
x: 12 | ||
lg: | ||
minH: 3 | ||
minW: 3 | ||
h: 3 | ||
w: 8 | ||
y: 0 | ||
x: 12 | ||
md: | ||
minH: 3 | ||
minW: 3 | ||
h: 3 | ||
w: 7 | ||
y: 0 | ||
x: 8 | ||
sm: | ||
minH: 3 | ||
minW: 3 | ||
h: 3 | ||
w: 5 | ||
y: 0 | ||
x: 7 | ||
|
||
""" | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (code-quality): We've found these issues:
assign-if-exp
)switch
)