Skip to content

basic rspt parser#293

Open
JFRudzinski wants to merge 7 commits intodevelopfrom
rspt-shell-parser
Open

basic rspt parser#293
JFRudzinski wants to merge 7 commits intodevelopfrom
rspt-shell-parser

Conversation

@JFRudzinski
Copy link
Collaborator

This is basically a shell parser so that some users can upload DFT and DMFT data from the RSPt software and have minimal search capabilities, etc. They will then work on developing a "real" parser for their code which can later be used for reprocessing

@JFRudzinski JFRudzinski requested a review from ladinesa June 17, 2025 08:35
@JFRudzinski
Copy link
Collaborator Author

@ladinesa This is meant to be a quick solution for some users who belong to a large collaborative project. I set this up so that they can meet some deadline for a report/publication, but will then set them up on a route to creating a proper plugin with the new schema.

I am sure that my approach here is hacky, but also I do not want to spend too much more time on it, so if you can identify the essentials to make it acceptable in your opinion, that would be great.

I am waiting for some feedback from my data steward contact, but I think we can mostly still finalize in the mean time.

@ladinesa
Copy link
Collaborator

Maybe add a test data, just maybe parse it in test no need to assert any quantity.

@coveralls
Copy link

coveralls commented Jun 17, 2025

Pull Request Test Coverage Report for Build 15704995843

Details

  • 59 of 63 (93.65%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 92.964%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/test_rsptparser.py 10 11 90.91%
electronicparsers/rspt/parser.py 47 50 94.0%
Totals Coverage Status
Change from base Build 14973061274: 0.001%
Covered Lines: 35897
Relevant Lines: 38614

💛 - Coveralls

@JFRudzinski
Copy link
Collaborator Author

Maybe add a test data, just maybe parse it in test no need to assert any quantity.

Question about the logger for tests:

If I leave my logger statements as they are, i.e., using the input logger from the parse() function, then the logger output shows up in the GUI when I launch locally, but when I run pytest the logger is None.

On the other hand, if I instead set self.logger = get_logger(__name__) in the parser init() function and use that instead, then the pytest logs properly, but the logger output does not show up in the GUI when I launch locally.

Do you understand this? What is the correct approach?

@ladinesa
Copy link
Collaborator

in parse, logger = logger if logger is not None else get_logger(__name__)

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.

3 participants