psdi-data-conversion 0.0.36__tar.gz → 0.0.38__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/CONTRIBUTING.md +27 -3
  2. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/PKG-INFO +160 -60
  3. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/README.md +158 -56
  4. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/app.py +122 -16
  5. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/constants.py +6 -5
  6. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/converter.py +13 -6
  7. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/converters/base.py +58 -55
  8. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/converters/c2x.py +1 -0
  9. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/converters/openbabel.py +10 -10
  10. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/database.py +335 -113
  11. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/main.py +151 -69
  12. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/download.htm +22 -9
  13. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/data.js +18 -4
  14. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/format.js +22 -9
  15. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/styles/psdi-common.css +5 -4
  16. psdi_data_conversion-0.0.38/psdi_data_conversion/templates/index.htm +135 -0
  17. psdi_data_conversion-0.0.38/psdi_data_conversion/testing/constants.py +18 -0
  18. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/testing/conversion_callbacks.py +9 -7
  19. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/testing/conversion_test_specs.py +128 -27
  20. psdi_data_conversion-0.0.38/psdi_data_conversion/testing/gui.py +428 -0
  21. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/testing/utils.py +121 -60
  22. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/pyproject.toml +7 -4
  23. psdi_data_conversion-0.0.38/tests/gui/gui_test.py +108 -0
  24. {psdi_data_conversion-0.0.36/tests → psdi_data_conversion-0.0.38/tests/python}/cli_test.py +75 -11
  25. {psdi_data_conversion-0.0.36/tests → psdi_data_conversion-0.0.38/tests/python}/converter_test.py +7 -4
  26. {psdi_data_conversion-0.0.36/tests → psdi_data_conversion-0.0.38/tests/python}/database_test.py +55 -8
  27. {psdi_data_conversion-0.0.36/tests → psdi_data_conversion-0.0.38/tests/python}/file_io_test.py +4 -2
  28. {psdi_data_conversion-0.0.36/tests → psdi_data_conversion-0.0.38/tests/python}/security_test.py +2 -2
  29. psdi_data_conversion-0.0.36/.github/workflows/ci-cron.yml +0 -51
  30. psdi_data_conversion-0.0.36/.github/workflows/ci-deploy-production.yml +0 -61
  31. psdi_data_conversion-0.0.36/.github/workflows/ci-feature.yml +0 -16
  32. psdi_data_conversion-0.0.36/.github/workflows/ci-main.yml +0 -34
  33. psdi_data_conversion-0.0.36/.github/workflows/ci-pr.yml +0 -26
  34. psdi_data_conversion-0.0.36/.github/workflows/ci-rc-hotfix.yml +0 -18
  35. psdi_data_conversion-0.0.36/.github/workflows/ci-release.yml +0 -130
  36. psdi_data_conversion-0.0.36/.github/workflows/job-anchore-scan.yml +0 -52
  37. psdi_data_conversion-0.0.36/.github/workflows/job-container-push.yml +0 -44
  38. psdi_data_conversion-0.0.36/.github/workflows/job-deploy-k8s.yml +0 -67
  39. psdi_data_conversion-0.0.36/.github/workflows/job-open-pull-request.yml +0 -56
  40. psdi_data_conversion-0.0.36/.github/workflows/job-publish-doc.yml +0 -52
  41. psdi_data_conversion-0.0.36/.github/workflows/job-tag.yml +0 -50
  42. psdi_data_conversion-0.0.36/.github/workflows/job-test-gui.yml +0 -36
  43. psdi_data_conversion-0.0.36/.github/workflows/job-test-python.yml +0 -51
  44. psdi_data_conversion-0.0.36/psdi_data_conversion/templates/index.htm +0 -121
  45. psdi_data_conversion-0.0.36/psdi_data_conversion/testing/constants.py +0 -12
  46. psdi_data_conversion-0.0.36/run_local.sh +0 -38
  47. psdi_data_conversion-0.0.36/tests/selenium/files/standard_test.cdxml +0 -3
  48. psdi_data_conversion-0.0.36/tests/selenium/run.sh +0 -5
  49. psdi_data_conversion-0.0.36/tests/selenium/selenium_tests.py +0 -140
  50. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/.gitignore +0 -0
  51. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/CHANGELOG.md +0 -0
  52. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/LICENSE +0 -0
  53. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/__init__.py +0 -0
  54. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/bin/LICENSE_ATOMSK +0 -0
  55. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/bin/LICENSE_C2X +0 -0
  56. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/bin/linux/atomsk +0 -0
  57. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/bin/linux/c2x +0 -0
  58. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/bin/mac/atomsk +0 -0
  59. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/bin/mac/c2x +0 -0
  60. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/converters/__init__.py +0 -0
  61. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/converters/atomsk.py +0 -0
  62. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/dist.py +0 -0
  63. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/file_io.py +0 -0
  64. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/log_utility.py +0 -0
  65. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/scripts/atomsk.sh +0 -0
  66. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/scripts/c2x.sh +0 -0
  67. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/security.py +0 -0
  68. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/accessibility.htm +0 -0
  69. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/convert.htm +0 -0
  70. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/convertato.htm +0 -0
  71. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/convertc2x.htm +0 -0
  72. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/documentation.htm +0 -0
  73. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/feedback.htm +0 -0
  74. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/header-links.html +0 -0
  75. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/index-versions/header-links.html +0 -0
  76. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/index-versions/psdi-common-footer.html +0 -0
  77. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/index-versions/psdi-common-header.html +0 -0
  78. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/psdi-common-footer.html +0 -0
  79. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/psdi-common-header.html +0 -0
  80. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/content/report.htm +0 -0
  81. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/data/data.json +0 -0
  82. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/colormode-toggle-dm.svg +0 -0
  83. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/colormode-toggle-lm.svg +0 -0
  84. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/psdi-icon-dark.svg +0 -0
  85. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/psdi-icon-light.svg +0 -0
  86. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/psdi-logo-darktext-simple.png +0 -0
  87. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/psdi-logo-darktext.png +0 -0
  88. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/psdi-logo-lighttext-simple.png +0 -0
  89. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/psdi-logo-lighttext.png +0 -0
  90. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-bluesky-black.svg +0 -0
  91. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-bluesky-white.svg +0 -0
  92. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-instagram-black.svg +0 -0
  93. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-instagram-white.svg +0 -0
  94. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-linkedin-black.png +0 -0
  95. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-linkedin-white.png +0 -0
  96. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-mastodon-black.svg +0 -0
  97. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-mastodon-white.svg +0 -0
  98. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-x-black.svg +0 -0
  99. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-x-white.svg +0 -0
  100. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-youtube-black.png +0 -0
  101. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/social-logo-youtube-white.png +0 -0
  102. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/ukri-epsr-logo-darktext.png +0 -0
  103. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/ukri-epsr-logo-lighttext.png +0 -0
  104. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/ukri-logo-darktext.png +0 -0
  105. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/img/ukri-logo-lighttext.png +0 -0
  106. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/accessibility.js +0 -0
  107. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/common.js +0 -0
  108. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/convert.js +0 -0
  109. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/convert_common.js +0 -0
  110. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/convertato.js +0 -0
  111. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/convertc2x.js +0 -0
  112. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/load_accessibility.js +0 -0
  113. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/psdi-common.js +0 -0
  114. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/javascript/report.js +0 -0
  115. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/static/styles/format.css +0 -0
  116. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/psdi_data_conversion/testing/__init__.py +0 -0
  117. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/scripts/setup_bin.py +0 -0
  118. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/1ARJ.mmcif +0 -0
  119. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/1NE6.mmcif +0 -0
  120. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/5a9z-assembly1.cif +0 -0
  121. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/Fapatite.ins +0 -0
  122. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/aceticacid.mol +0 -0
  123. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/benzyne.molden +0 -0
  124. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/caffeine-smi.tar +0 -0
  125. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/caffeine-smi.tar.gz +0 -0
  126. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/caffeine-smi.zip +0 -0
  127. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/caffeine.inchi +0 -0
  128. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/ch3cl-esp.cub +0 -0
  129. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/cyclopropane_err.mol +0 -0
  130. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/ethanol.xyz +0 -0
  131. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/fullRhinovirus.pdb +0 -0
  132. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/hemoglobin.pdb +0 -0
  133. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/nacl.cif +0 -0
  134. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/nacl.mol +0 -0
  135. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/aceticacid.log.txt +0 -0
  136. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/aceticacid.mol2 +0 -0
  137. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine-2D-fastest.xyz +0 -0
  138. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine-3D-best.xyz +0 -0
  139. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine.smi +0 -0
  140. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine.xyz +0 -0
  141. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine_a_in.smi +0 -0
  142. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine_a_in_kx_f4_l5_out.smi +0 -0
  143. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine_a_in_kx_f4_out.smi +0 -0
  144. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine_a_in_kx_out.smi +0 -0
  145. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/caffeine_a_in_x_out.smi +0 -0
  146. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/hemoglobin_Atomsk.xyz +0 -0
  147. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/hemoglobin_c2x.xyz +0 -0
  148. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/nacl.log +0 -0
  149. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/nacl.mol +0 -0
  150. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/quartz_OB.cif +0 -0
  151. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/quartz_OB.log.txt +0 -0
  152. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/quartz_atomsk.cif +0 -0
  153. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/quartz_atomsk.log.txt +0 -0
  154. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/standard_test.inchi +0 -0
  155. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/xyz_files-mol.zip +0 -0
  156. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/output/xyz_files.log.txt +0 -0
  157. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/periodic_dmol3.outmol +0 -0
  158. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/quartz.xyz +0 -0
  159. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/quartz_err.xyz +0 -0
  160. {psdi_data_conversion-0.0.36 → psdi_data_conversion-0.0.38}/test_data/standard_test.cdxml +0 -0
  161. {psdi_data_conversion-0.0.36/tests → psdi_data_conversion-0.0.38/tests/python}/dist_test.py +0 -0
  162. {psdi_data_conversion-0.0.36/tests → psdi_data_conversion-0.0.38/tests/python}/logging_test.py +0 -0
@@ -297,6 +297,22 @@ For debugging python issues, it's recommended to install the package in editable
297
297
  pip install --editable .'[gui-test]'
298
298
  ```
299
299
 
300
+ ### Running Unit Tests
301
+
302
+ The GUI unit tests require a web driver to be installed, and will install one if one isn't. To avoid repeated unnecessary API calls for the installation, you can set the environmental variable `DRIVER` when running tests to the location of your driver. This can be set to be automatically picked up by many IDEs by setting this in a `.env` file in the root of your project, e.g.:
303
+
304
+ ```
305
+ DRIVER=~/.wdm/drivers/geckodriver/linux64/v0.36.0/geckodriver
306
+ ```
307
+
308
+ To get the address of your driver, you can run the following in a Python terminal from within this projects virtual environment (after installing the `[gui-test]` optional dependencies):
309
+
310
+ ```python
311
+ from webdriver_manager.firefox import GeckoDriverManager
312
+ driver_path = GeckoDriverManager().install()
313
+ print(f"Gecko driver installed to: {driver_path}")
314
+ ```
315
+
300
316
  ## Continuous Integration
301
317
 
302
318
  This project uses various GitHub workflows to perform Continuous Integration tasks. These can be found in the `.github/workflows` folder. The files which start with "ci-" are the directly-triggered workflows, and the files which start with "job-" are reusable workflows called by the former. These workflows handle the following tasks:
@@ -310,7 +326,7 @@ See the commons within the files for further details.
310
326
 
311
327
  ## Publishing
312
328
 
313
- The Python library, CLA, and local GUI are (planned to be) published as a Python package via PyPI. This section describes how the package is set up and how it's published.
329
+ The Python library, CLA, and local GUI are published as a Python package via PyPI. This section describes how the package is set up and how it's published.
314
330
 
315
331
  ### Package Setup
316
332
 
@@ -318,11 +334,11 @@ The package's setup is defined in the `pyproject.toml` file. This defines the pr
318
334
 
319
335
  The package uses [Hatch](https://hatch.pypa.io/latest/) for its build backend, as it is simpler to configure than the classic [Setuptools](https://setuptools.pypa.io/en/latest/userguide/) and provides some useful extensibility.
320
336
 
321
- The version of the package is set to be determined from the version control system, meaning on the release branch, the version will always match the latest tag.
337
+ The version of the package is set to be determined from the version control system, meaning on the release branch, the version will always match the latest tag. This alleviates us of having to manually maintain the version for the package to keep it correct, but does result in some quirks. It's a bit fussier to set up (though that's done now), and it makes the user take an extra step if they want to install from source but haven't cloned the repository - this is noted in the installation instructions in the README.
322
338
 
323
339
  ### Initial Publication
324
340
 
325
- This section details the plan for the initial publication of this package - after this is complete, this section will be left in for reference in case of future need.
341
+ This section details the proceduce for the initial publication of this package - now that this is complete, this section is left in for reference in case of future need.
326
342
 
327
343
  First, it's necessary to install a couple required packages in order to build a Python package: `build` to build it and `twine` to upload it. These can be installed with pip via:
328
344
 
@@ -350,6 +366,14 @@ To upload, follow [this tutorial](https://packaging.python.org/en/latest/tutoria
350
366
 
351
367
  The `ci-release.yml` workflow is planned to publish any new releases to PyPI after the initial publication. This can be set up by uncommenting the relevant lines in this file, possibly updating the `job-publish-pypi.yml` to enable this (testing will be necessary), and setting up Trusted Publishing for the project on PyPI (see [guide](https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-pypi))
352
368
 
369
+ ### Project Management
370
+
371
+ This project is published on PyPI at https://pypi.org/project/psdi-data-conversion/ and on TestPyPI at https://test.pypi.org/project/psdi-data-conversion/. Maintainers can manage the project through the "Manage" link on that page or from their own projects page.
372
+
373
+ The most important setting to be aware of here is Publishing -> Trusted Publisher Management. This is the system used to allow automatic publishing of releases from GitHub. It's set up so that the current project, organisation, environment, and workflow for publishing are approved. If any of these change, this will need to be updated by adding a new trusted publisher with the new settings (on both PyPI and TestPyPI) and removing the old one.
374
+
375
+ The management page can also be used to add or remove collaborators through the Collaborators tab. Generally the project on these sites doesn't require much maintenance, but at least a few active collaborators should be on it at all times to avoid getting locked out if someone is suddenly unavailable.
376
+
353
377
  ## Deployment
354
378
 
355
379
  Deployment is handled by the `job-deploy-k8s.yml` reusable workflow, which is triggered from `ci-main.yml` to deploy to dev on each push to `main` and `ci-release.yml` to deploy to staging on each push to `release`. When a push to production is desired, it must be triggered manually by calling the `ci-deploy-production.yml` workflow on the `release` branch (it's set up to fail if run on any other branch).
@@ -1,13 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: psdi_data_conversion
3
- Version: 0.0.36
3
+ Version: 0.0.38
4
4
  Summary: Chemistry file format conversion service, provided by PSDI
5
5
  Project-URL: Homepage, https://data-conversion.psdi.ac.uk/
6
6
  Project-URL: Documentation, https://psdi-uk.github.io/psdi-data-conversion/
7
- Project-URL: Repository, https://github.com/PSDI-UK/psdi-data-conversion
8
7
  Project-URL: Issues, https://github.com/PSDI-UK/psdi-data-conversion/issues
9
8
  Project-URL: Changelog, https://github.com/PSDI-UK/psdi-data-conversion/blob/main/CHANGELOG.md
10
- Project-URL: Download, https://github.com/PSDI-UK/psdi-data-conversion/releases/latest
11
9
  Author: Ray Whorley, Don Cruickshank, Tom Underwood
12
10
  Author-email: Samantha Pearman-Kanza <s.pearman-kanza@soton.ac.uk>, Bryan Gillis <7204836+brgillis@users.noreply.github.com>
13
11
  License: Apache License
@@ -245,7 +243,7 @@ Description-Content-Type: text/markdown
245
243
 
246
244
  # PSDI Data Conversion
247
245
 
248
- Version: Pre-release 2024-02-27
246
+ Version: Pre-release 2024-04-14
249
247
 
250
248
  This is the repository for the PSDI PF2 Chemistry File Format Conversion project. The goal of this project is to provide utilities to assist in converting files between the many different file formats used in chemistry, providing information on what converters are available for a given conversion and the expected quality of it, and providing multiple interfaces to perform these conversions. These interfaces are:
251
249
 
@@ -278,7 +276,14 @@ This is the repository for the PSDI PF2 Chemistry File Format Conversion project
278
276
  - [Installation and Setup](#installation-and-setup)
279
277
  - [Running the App](#running-the-app)
280
278
  - [Testing](#testing)
281
- - [Licencing](#licencing)
279
+ - [Troubleshooting](#troubleshooting)
280
+ - [OSError: [Errno 24] Too many open files](#oserror-errno-24-too-many-open-files)
281
+ - [Errors running c2x or Atomsk converters](#errors-running-c2x-or-atomsk-converters)
282
+ - [A supported conversion fails](#a-supported-conversion-fails)
283
+ - [Input file is malformatted or corrupt](#input-file-is-malformatted-or-corrupt)
284
+ - [Input file's format is misidentified](#input-files-format-is-misidentified)
285
+ - [Other known issues](#other-known-issues)
286
+ - [Licensing](#licensing)
282
287
  - [Contributors](#contributors)
283
288
  - [Funding](#funding)
284
289
 
@@ -312,15 +317,17 @@ This is the repository for the PSDI PF2 Chemistry File Format Conversion project
312
317
  - `test_data`
313
318
  - (Files used for testing the project)
314
319
  - `tests`
315
- - (Unit tests for the project)
320
+ - `gui`
321
+ - (Unit tests for the GUI, aka the local version of the web app)
322
+ - `python`
323
+ - (Unit tests for the Python library and command-line application)
316
324
  - `CHANGELOG.md` (Updates since initial public release)
317
325
  - `CONTRIBUTING.md` (Guidelines and information for contributors to the project)
318
326
  - `DOCKERFILE` (Dockerfile for image containerising PSDI's data conversion service)
319
- - `LICENSE` (Apache Licence version 2.0)
327
+ - `LICENSE` (Apache License version 2.0)
320
328
  - `pyproject.toml` (Python project metadata and settings)
321
329
  - `README.md` (This file)
322
330
  - `requirements.txt` (Requirements for the web app deployment of this project)
323
- - `run_local.sh` (Helper script to run the web app locally)
324
331
 
325
332
  ## Requirements
326
333
 
@@ -468,6 +475,24 @@ options] [-s/--strict] [--nc/--no-check] [-q/--quiet] [-g/--log-file <log file n
468
475
 
469
476
  Call `psdi-data-convert -h` for details on each of these options.
470
477
 
478
+ Note that some requested conversions may involve ambiguous formats which share the same extension. In this case, the application will print a warning and list possible matching formats, with a disambiguating name that can be used to specify which one. For instance, the `c2x` converter can convert into two variants of the `pdb` format, and if you ask it to convert to `pdb` without specifying which one, you'll see:
479
+
480
+ ```
481
+ ERROR: Extension 'pdb' is ambiguous and must be defined by ID. Possible formats and their IDs are:
482
+ 9: pdb-0 (Protein Data Bank)
483
+ 259: pdb-1 (Protein Data Bank with atoms numbered)
484
+ ```
485
+
486
+ This provides the IDs ("9" and "259") and disambiguating names ("pdb-0" and "pdb-1") for the matching formats. Either can be used in the call to the converter, e.g.:
487
+
488
+ ```bash
489
+ psdi-data-conversion nacl.cif -t 9 -w c2x
490
+ # Or equivalently:
491
+ psdi-data-conversion nacl.cif -t pdb-0 -w c2x
492
+ ```
493
+
494
+ The "<format>-0" pattern can be used with any format, even if it's unambiguous, and will be interpreted as the first instance of the format in the database with valid conversions. Note that as the database expands in future versions and more valid conversions are added, these disambiguated names may change, so it is recommended to use the format's ID in scripts and with the library to ensure consistency between versions of this package.
495
+
471
496
  #### Requesting Information on Possible Conversions
472
497
 
473
498
  The script can also be used to get information on possible conversions by providing the `-l/--list` argument:
@@ -542,6 +567,8 @@ Where `filename` is the name of the file to convert (either fully-qualified or r
542
567
 
543
568
  See the method's documentation via `help(run_converter)` after importing it for further details on usage.
544
569
 
570
+ Note that as with running the application through the command-line, some extra care may be needed in the case that the input or output format is ambiguous - see the [Data Conversion](#data-conversion) section above for more details on this. As with running through the command-line, a format's ID or disambiguated name must be used in the case of ambiguity.
571
+
545
572
  #### `constants`
546
573
 
547
574
  This package defines most constants used in the package. It may be imported via:
@@ -596,54 +623,15 @@ pip install .'[gui]'
596
623
 
597
624
  If your system does not allow installation in this manner, it may be necessary to set up a virtual environment. See the instructions in the [command-line application installation](#installation) section above for how to do that, and then try to install again once you've set one up and activated it.
598
625
 
599
- If you've installed this repository from source, you can use the provided `run_local.sh` bash script to run the application. Otherwise (e.g. if you've installed from a wheel or PyPI), copy and paste the following into a script:
600
-
601
- ```bash
602
- #!/bin/bash
603
-
604
- # The envvar MAX_FILESIZE can be used to set the maximum allowed filesize in MB - 0 indicates no maximum
605
- if [ -z $MAX_FILESIZE ]; then
606
- export MAX_FILESIZE=0
607
- fi
608
-
609
- # The envvar MAX_FILESIZE_OB can be used to set the maximum allowed filesize in MB for the Open Babel converter - 0
610
- # indicates no maximum. This is currently set to 1 MB by default as the converter seems to hang above this limit (not
611
- # even allowing the process to be cancelled). This can be changed in the future if this is patched
612
- if [ -z $MAX_FILESIZE_OB ]; then
613
- export MAX_FILESIZE_OB=1
614
- fi
615
-
616
- # Logging control - "full" sets server-style logging, which is necessary to produce the output logs with the expected
617
- # names. This should not be changed, or else errors will occur
618
- export LOG_MODE=full
619
-
620
- # The level to log at. Leave blank for defaults, which logs at INFO level for user output and ERROR level for the server
621
- # log and stdout. If set to a different value here (e.g. DEBUG), all these channels will be set to that level
622
- export LOG_LEVEL=
623
-
624
- # The envvar SERVICE_MODE can be set to "true" to make this behave as if it's running as the public web service -
625
- # uncomment the following line to enable that
626
- # export SERVICE_MODE=true
627
-
628
- # Uncomment the following line to enable debug mode
629
- # export FLASK_ENV=development
630
-
631
- # Execute a local run of the application from the proper path
632
-
633
- PACKAGE_PATH=`python -c "import psdi_data_conversion; print(psdi_data_conversion.__path__[0])"`
634
- cd $PACKAGE_PATH/..
635
- python -m flask --app psdi_data_conversion/app.py run
636
- ```
637
-
638
- If desired, you can modify the environmental variables set in this script to modify the operation - see the comments on each for details.
639
-
640
626
  ### Running the App
641
627
 
642
- Run the `run_local.sh` script to start the server. You can then access the website by going to <http://127.0.0.1:5000> in a browser (this will also be printed in the terminal, and you can CTRL+click it there to open it in your default browser). Guidance for using the app is given on each page of it.
628
+ Once installed, the command-line script `psdi-data-convert-gui` will be made available, which can be called to start the server. You can then access the website by going to <http://127.0.0.1:5000> in a browser (this will also be printed in the terminal, and you can CTRL+click it there to open it in your default browser). Guidance for using the app is given on each page of it. When you're finished with the app, key CTRL+C in the terminal where you called the script to shut down the server, or, if the process was backgrounded, kill the appropriate process.
643
629
 
644
630
  In case of problems when using Chrome, try opening Chrome from the command line:
645
631
  open -a "Google Chrome.app" --args --allow-file-access-from-files
646
632
 
633
+ The local version has some customisable options for running it, which can can be seen by running `psdi-data-convert-gui --help`. Most of these are only useful for development, but one notable setting is `--max-file-size-ob`, which sets the maximum allowed filesize for conversions with the Open Babel converter in megabytes. This is set to 1 MB by default, since Open Babel has a known bug which causes it to hang indefinitely for some conversions over this size (such as from large `mmcif` files). This can be set to a higher value (or to 0 to disable the limit) if the user wishes to disable this safeguard.
634
+
647
635
  ## Extending Functionality
648
636
 
649
637
  The Python library and CLA are written to make it easy to extend the functionality of this package to use other file format converters. This can be done by downloading or cloning the project's source from it's GitHub Repository (https://github.com/PSDI-UK/psdi-data-conversion), editing the code to add your converter following the guidance in the "[Adding File Format Converters](https://github.com/PSDI-UK/psdi-data-conversion/blob/main/CONTRIBUTING.md#adding-file-format-converters)" section of CONTRIBUTING.md to integrate it with the Python code, and installing the modified package on your system via:
@@ -662,28 +650,140 @@ To test the CLA and Python library, install the optional testing requirements lo
662
650
 
663
651
  ```bash
664
652
  pip install .'[test]'
665
- pytest
653
+ pytest tests/python
666
654
  ```
667
655
 
668
656
  To test the local version of the web app, install the GUI testing requirements locally (which also include the standard GUI requirements and standard testing requirements), start the server, and test by executing the GUI test script:
669
657
 
670
658
  ```bash
671
659
  pip install .'[gui-test]'
672
- ./run_local.sh & # Start the server for the web app in the background
673
- cd tests/selenium
674
- ./run.sh
675
- kill %1 # Stop the web server - it may have a different job ID. If you don't know the job ID, you can alternatively call "fg" to bring the job to the foreground, then type CTRL+c to stop it
660
+ pytest tests/gui
661
+ ```
662
+
663
+ Both of these sets of tests can also be run together if desired through:
664
+
665
+ ```bash
666
+ pip install .'[gui-test]'
667
+ pytest
668
+ ```
669
+
670
+ ## Troubleshooting
671
+
672
+ This section presents solutions for commonly-encountered issues.
673
+
674
+ ### OSError: [Errno 24] Too many open files
675
+
676
+ You may see the error:
677
+
678
+ ```
679
+ OSError: [Errno 24] Too many open files
676
680
  ```
677
681
 
678
- ## Licencing
682
+ while running the command-line application, using the Python library, or running tests This error is caused by a program hitting the limit of the number of open filehandles allowed by the OS. This limit is typically set to 1024 on Linux systems and 256 on MacOS systems, and thus this issue occurs much more often on the latter. You can see what your current limit is by running the command:
683
+
684
+ ```bash
685
+ ulimit -a | grep "open files"
686
+ ```
687
+
688
+ This limit can be temporarily increased for the current terminal session by running the command:
689
+
690
+ ```bash
691
+ ulimit -n 1024 # Or another, higher number
692
+ ```
693
+
694
+ First, try increasing the limit and then redo the operation which caused this error to see if this resolves it. If this does, you can make this change permanent in a few ways, the easiest of which is to add this command to your `.bashrc` file so it will be set for every new terminal session.
695
+
696
+ If you see this error when the filehandle limit is already set to a high value such as 1024, this may indicate the presence of a bug in the project which causes a leaking of filehandles, so please open an issue about it, pasting the error you get and the details of your system, particularly including your current filehandle limit.
697
+
698
+ ### Errors running c2x or Atomsk converters
699
+
700
+ We provide support for the c2x and Atomsk converters by packing binaries which support common Linux and MacOS platforms with this project, but we cannot guarantee universal support for these binaries. In particular, they may rely on dynamically-linked libraries which aren't installed on your system.
701
+
702
+ Look through the error message you received for messages such as "Library not loaded" or "no such file", and see if they point to the name of a library which you can try installing. For instance, if you see that it's searching for `libquadmath.0.dylib` but not finding it, you can try installing this library. In this case, this library can be installed through apt with:
703
+
704
+ ```bash
705
+ sudo apt install libquadmath0
706
+ ```
707
+
708
+ or through brew via:
709
+
710
+ ```bash
711
+ brew install gcc
712
+ ```
713
+
714
+ Alternatively, you can run your own versions of the `c2x` and `atomsk` binaries with this project. Compile them yourself however you wish - see the projects at https://github.com/codenrx/c2x and https://github.com/pierrehirel/atomsk and follow their instructions to build a binary on your system. Once you've done so, add the binary to your `$PATH`, and this project will pick that up and use it in preference to the prepackaged binary.
715
+
716
+ On the other hand, it's possible that an error of this sort will occur if you have a non-working binary of one of these converters in your `$PATH`. If this might be the case, you can try removing it and see if the prepackaged binary works for you, or else recompile it to try to fix errors.
717
+
718
+ ### A supported conversion fails
719
+
720
+ Here we'll go over some of the most common reasons that a supported conversion might fail, and what can be done to fix the issue.
721
+
722
+ #### Input file is malformatted or corrupt
723
+
724
+ Usually if there is a problem with the input file, the error message you receive should indicate some difficulty reading it. If the error message indicates this might be the issue, try the following:
725
+
726
+ Check the validity of the input file, ideally using another tool which can read in a file of its type, and confirm that it can be read successfully. This doesn't guarantee that the file is valid, as some utilities are tolerant to some formatting errors, but if you get an error here, then you know the issue is with the file. If the file can be read by another utility, see if the conversion you're attempting is supported by another converter - it might be that the file has a negligible issue that another converter is able to ignore.
727
+
728
+ If you've confirmed that the input file is malformatted or corrupt, see if it's possible to regenerate it or fix it manually. There may be a bug in the program which generated it - if this is under your control, check the format's documentation to help fix it. Otherwise, you can see if you can use the format's documentation as a guide to manually fix the file.
729
+
730
+ #### Input file's format is misidentified
731
+
732
+ If you've followed the steps in the previous section and confirmed that the input file is valid, but you're still having issues with it, one possibility is that this application is misidentifying the file's format. This can happen if you've given the file an extension which isn't expected of its format, or in rare cases where an extension is shared by multiple formats.
733
+
734
+ To remedy this, try explicitly specifying the format, rather than letting the application guess it from the extension. You can see all supported formats by running `psdi-data-convert -l`, and then get details on one with `psdi-data-convert -l -f <format>` to confirm that it's the correct format. You can then call the conversion script with the argument `-f <format>`, or within Python make a call to the library with `run_converter(..., from_format=<format>)` to specify the format.
735
+
736
+ `<format>` here can be the standard extension of the format (in the case of unambiguous extensions), its ID, or its disambiguated name. To give an example which explains what each of these are, let's say you have an MDL MOL file you wish to convert to XYZ, so you get information about it and possible converters with `psdi-data-convert -l -f mol -t xyz`:
737
+
738
+ ```base
739
+ $ psdi-data-convert -l -f mol
740
+ WARNING: Format 'mol' is ambiguous and could refer to multiple formats. It may be necessary to explicitly specify which
741
+ you want to use when calling this script, e.g. with '-f mol-0' - see the disambiguated names in the list below:
742
+
743
+ 18: mol-0 (MDL MOL)
744
+ 216: mol-1 (MOLDY)
745
+
746
+ 20: xyz (XYZ cartesian coordinates)
747
+
748
+ The following registered converters can convert from mol-0 to xyz:
749
+
750
+ Open Babel
751
+ c2x
752
+
753
+ For details on input/output flags and options allowed by a converter for this conversion, call:
754
+ psdi-data-convert -l <converter name> -f mol-0 -t xyz
755
+
756
+ The following registered converters can convert from mol-1 to xyz:
757
+
758
+ Atomsk
759
+
760
+ For details on input/output flags and options allowed by a converter for this conversion, call:
761
+ psdi-data-convert -l <converter name> -f mol-1 -t xyz
762
+ ```
763
+
764
+ This output indicates that the application is aware of two formats which share the `mol` extension: MDL MOL and MOLDY. It lists the ID, disambiguated name, and description of each: ID `18` and disambiguated name `mol-0` for MDL MOL, and ID `216` and disambiguated name `mol-1` for MOLDY. The XYZ format, on the other hand, is unambiguous, and only lists the standard extension for it as its disambiguated name (although `xyz-0` will be accepted without error as well).
765
+
766
+ The program then lists converters which can handle the requested conversion, revealing a potential pitfall: The Open Babel and c2x converters can convert from MDL MOL to XYZ, which the Atomsk converter can convert from MOLDY to XYZ. If you don't specify which format you're converting from, the script might assume you meant to use the other one, if that's the only one compatible with the converter you've requested (or with the default converter, Open Babel, if you didn't explicitly request one). So to be careful here, it's best to specify this input format unambiguously.
767
+
768
+ Since in this example you have an MDL MOL file, you would use `-f 18` or `-f mol-0` to explicitly specify it in the command-line, or similarly provide one of these to the `from_format` argument of `run_converter` within Python. The application will then properly handle it, including alerting you if you request a conversion that isn't supported by your requested converter (e.g. if you request a conversion of this MDL MOL file to XYZ with Atomsk).
769
+
770
+ Important note: The disambiguated name is generated dynamically and isn't stored in the database, and in rare cases may change for some formats in future versions of this application which expand support to more formats and conversions. For uses which require forward-compatibility with future versions of this application, the ID should be used instead.
771
+
772
+ #### Other known issues
773
+
774
+ Through testing, we've identified some other conversion issues, which we list here:
775
+
776
+ - Open Babel will indefinitely hang when attempting to convert large files (more than ~1 MB) of certain types (such as `mmcif`). This is an issue with the converter itself and not our application, which we hope will be fixed in a future version. If this occurs, the job will have to be forcibly terminated. CTRL+C will fail to terminate it, but it can be stopped with CTRL+Z, then terminated with `kill %N`, where N is the number listed beside the job when it is stopped (usually 1). The conversion should then be attempted with another supported converter.
777
+
778
+ ## Licensing
679
779
 
680
780
  This project is provided under the Apache License version 2.0, the terms of which can be found in the file `LICENSE`.
681
781
 
682
- This project redistributes compiled binaries for the Atomsk and c2x converters. These are both licenced under the
782
+ This project redistributes compiled binaries for the Atomsk and c2x converters. These are both licensed under the
683
783
  GNU General Public License version 3 and are redistributed per its terms. Any further redistribution of these binaries,
684
- including redistribution of this project as a whole, including them, must also follow the terms of this licence.
784
+ including redistribution of this project as a whole, including them, must also follow the terms of this license.
685
785
 
686
- This requires conspicuously displaying notice of this licence, providing the text of of the licence (provided here in
786
+ This requires conspicuously displaying notice of this license, providing the text of of the license (provided here in
687
787
  the files `psdi_data_conversion/bin/LICENSE_C2X` and `psdi_data_conversion/bin/LICENSE_ATOMSK`), and appropriately
688
788
  conveying the source code for each of these. Their respective source code may be found at:
689
789