Skip to content
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

Feature/sof 5462 - get name from file content #54

Open
wants to merge 7 commits into
base: epic/SOF-5386
Choose a base branch
from

Conversation

adewyer
Copy link
Contributor

@adewyer adewyer commented Jan 19, 2022

No description provided.

if (name === materialNameFromFile || !materialNameFromFile) {
return name;
}
return materialNameFromFile;
Copy link
Member

Choose a reason for hiding this comment

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

  1. Add a general utility - getLineFromContent(lineNumber)
  2. materialNameFromFileContents -> getNameFromContents
  3. getNameFromContents(fileContent) => {return getLineFromContent(1)} for POSCAR, and 0 for XYZ
    The default name and everything on lines 152-154 should not be dealt with here. We could add a function named: getNameFromFIleContent(type, fileContent, failoverName = "material") and use as a proxy.

src/parsers/utils.js Outdated Show resolved Hide resolved
@timurbazhirov timurbazhirov changed the title Feature/sof 5462 Feature/sof 5462 - get name from file content Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants