Skip to content

SOF-7915: export physical constants via python interface#46

Open
pranabdas wants to merge 20 commits into
mainfrom
feat/SOF-7915
Open

SOF-7915: export physical constants via python interface#46
pranabdas wants to merge 20 commits into
mainfrom
feat/SOF-7915

Conversation

@pranabdas

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/py/mat3ra/utils/string.py Outdated
return re.sub(r"[!#].*$", "", text, flags=re.MULTILINE)

# Default (shell): Removes lines starting with # (except shebang)
return re.sub(r"^(\s+)?#(?!!).*$", "", text, flags=re.MULTILINE)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should we remove inline comments as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't # not a comment mark in Fortran?

Googling gives: # shows up in Fortran files mainly from the C preprocessor (#include, #ifdef, etc.) -- probably should not be deleted

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You are right. Thank you, Seth.

Comment thread src/py/mat3ra/utils/string.py Outdated
return re.sub(r"#.*$", "", text, flags=re.MULTILINE)
return re.sub(r"#(?!!).*$", "", text, flags=re.MULTILINE)
patterns = {
"espresso": r"[!#].*$", # ! or # comments

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

utils should not know about espresso

remove espresso comments by chaining fortran and python comments
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