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

Add calculations/helpers/*.xml to MANIFEST.in #760

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

qiaojunfeng
Copy link
Collaborator

Otherwise the calculations.helpers.pw_input_helper will raise exception here

module_dir = os.path.dirname(__file__)
if module_dir == '':
module_dir = os.curdir
xml_path = os.path.join(module_dir, f'INPUT_PW-{version}.xml')
try:
with open(xml_path, 'r') as handle:
dom = xml.dom.minidom.parse(handle)
except IOError as exception:
prefix = 'INPUT_PW-'
suffix = '.xml'
versions = [
fname[len(prefix):-len(suffix)]
for fname in os.listdir(module_dir)
if fname.startswith(prefix) and fname.endswith(suffix)
]
versions = sorted(versions, key=Version)
strictversions = versions + [version]
strictversions = sorted(strictversions, key=Version)
pos = strictversions.index(version)
if pos == 0:
add_str = ' (the version you specified is too old)'
else:
add_str = f' (the older, closest version you can use is {strictversions[pos - 1]})'
raise QEInputValidationError(
f"Unknown Quantum Espresso version: {version}. Available versions: {', '.join(versions)};{add_str}"
) from exception

@sphuber sphuber self-requested a review December 9, 2021 10:20
Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

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

Thanks @qiaojunfeng

@sphuber sphuber merged commit a3ae4e4 into aiidateam:develop Dec 9, 2021
@qiaojunfeng qiaojunfeng deleted the manifest branch December 9, 2021 10:34
bastonero pushed a commit to bastonero/aiida-quantumespresso that referenced this pull request Dec 20, 2021
To ensure the files are included in the distribution.
@ltalirz
Copy link
Member

ltalirz commented Jan 17, 2022

Hey guys, just realized that this was fixed already - can you please make a new release?

PyPI build is still broken #765

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