psdi-data-conversion 0.0.36__py3-none-any.whl → 0.0.37__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
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.37
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/
@@ -278,7 +278,10 @@ This is the repository for the PSDI PF2 Chemistry File Format Conversion project
278
278
  - [Installation and Setup](#installation-and-setup)
279
279
  - [Running the App](#running-the-app)
280
280
  - [Testing](#testing)
281
- - [Licencing](#licencing)
281
+ - [Troubleshooting](#troubleshooting)
282
+ - [OSError: [Errno 24] Too many open files](#oserror-errno-24-too-many-open-files)
283
+ - [Errors running c2x or Atomsk converters](#errors-running-c2x-or-atomsk-converters)
284
+ - [Licensing](#licensing)
282
285
  - [Contributors](#contributors)
283
286
  - [Funding](#funding)
284
287
 
@@ -312,15 +315,17 @@ This is the repository for the PSDI PF2 Chemistry File Format Conversion project
312
315
  - `test_data`
313
316
  - (Files used for testing the project)
314
317
  - `tests`
315
- - (Unit tests for the project)
318
+ - `gui`
319
+ - (Unit tests for the GUI, aka the local version of the web app)
320
+ - `python`
321
+ - (Unit tests for the Python library and command-line application)
316
322
  - `CHANGELOG.md` (Updates since initial public release)
317
323
  - `CONTRIBUTING.md` (Guidelines and information for contributors to the project)
318
324
  - `DOCKERFILE` (Dockerfile for image containerising PSDI's data conversion service)
319
- - `LICENSE` (Apache Licence version 2.0)
325
+ - `LICENSE` (Apache License version 2.0)
320
326
  - `pyproject.toml` (Python project metadata and settings)
321
327
  - `README.md` (This file)
322
328
  - `requirements.txt` (Requirements for the web app deployment of this project)
323
- - `run_local.sh` (Helper script to run the web app locally)
324
329
 
325
330
  ## Requirements
326
331
 
@@ -596,50 +601,9 @@ pip install .'[gui]'
596
601
 
597
602
  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
603
 
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
604
  ### Running the App
641
605
 
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.
606
+ 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
607
 
644
608
  In case of problems when using Chrome, try opening Chrome from the command line:
645
609
  open -a "Google Chrome.app" --args --allow-file-access-from-files
@@ -662,28 +626,80 @@ To test the CLA and Python library, install the optional testing requirements lo
662
626
 
663
627
  ```bash
664
628
  pip install .'[test]'
665
- pytest
629
+ pytest tests/python
666
630
  ```
667
631
 
668
632
  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
633
 
670
634
  ```bash
671
635
  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
636
+ pytest tests/gui
637
+ ```
638
+
639
+ Both of these sets of tests can also be run together if desired through:
640
+
641
+ ```bash
642
+ pip install .'[gui-test]'
643
+ pytest
676
644
  ```
677
645
 
678
- ## Licencing
646
+ ## Troubleshooting
647
+
648
+ This section presents solutions for commonly-encountered issues.
649
+
650
+ ### OSError: [Errno 24] Too many open files
651
+
652
+ You may see the error:
653
+
654
+ ```
655
+ OSError: [Errno 24] Too many open files
656
+ ```
657
+
658
+ 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:
659
+
660
+ ```bash
661
+ ulimit -a | grep "open files"
662
+ ```
663
+
664
+ This limit can be temporarily increased for the current terminal session by running the command:
665
+
666
+ ```bash
667
+ ulimit -n 1024 # Or another, higher number
668
+ ```
669
+
670
+ 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.
671
+
672
+ 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.
673
+
674
+ ### Errors running c2x or Atomsk converters
675
+
676
+ 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.
677
+
678
+ 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:
679
+
680
+ ```bash
681
+ sudo apt install libquadmath0
682
+ ```
683
+
684
+ or through brew via:
685
+
686
+ ```bash
687
+ brew install gcc
688
+ ```
689
+
690
+ 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.
691
+
692
+ 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.
693
+
694
+ ## Licensing
679
695
 
680
696
  This project is provided under the Apache License version 2.0, the terms of which can be found in the file `LICENSE`.
681
697
 
682
- This project redistributes compiled binaries for the Atomsk and c2x converters. These are both licenced under the
698
+ This project redistributes compiled binaries for the Atomsk and c2x converters. These are both licensed under the
683
699
  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.
700
+ including redistribution of this project as a whole, including them, must also follow the terms of this license.
685
701
 
686
- This requires conspicuously displaying notice of this licence, providing the text of of the licence (provided here in
702
+ This requires conspicuously displaying notice of this license, providing the text of of the license (provided here in
687
703
  the files `psdi_data_conversion/bin/LICENSE_C2X` and `psdi_data_conversion/bin/LICENSE_ATOMSK`), and appropriately
688
704
  conveying the source code for each of these. Their respective source code may be found at:
689
705
 
@@ -1,5 +1,5 @@
1
1
  psdi_data_conversion/__init__.py,sha256=urMsTqsTHTch1q4rMT9dgGnrvdPFMP9B8r-6Kr8H5sE,404
2
- psdi_data_conversion/app.py,sha256=LMVK3R8Ooz0vj8Pb4N5MkKQDOb91i5FhH5aHty5RDDM,8998
2
+ psdi_data_conversion/app.py,sha256=POsNNY3KAfRp6_irBLM_c1ZDsS5qygcOF9I5dB3aYe4,12196
3
3
  psdi_data_conversion/constants.py,sha256=jh9-EqTt3E5I5H5axpANjQI_JuVeqsACoUVHuw6RX8Y,7351
4
4
  psdi_data_conversion/converter.py,sha256=f5Uos26M3KfDFQ-zoEOJVs0lEASkYRQyXrR0B9MhDmU,22906
5
5
  psdi_data_conversion/database.py,sha256=WMOdz6T2b2XuE_d-Ex_v5oRi-TDEHcku_yT04en4GoE,44274
@@ -16,7 +16,7 @@ psdi_data_conversion/bin/mac/atomsk,sha256=pqExRdkR8NSqSasHZjE74R_CiM6Dkr_yvfyak
16
16
  psdi_data_conversion/bin/mac/c2x,sha256=dI-bBoQ6uqc6KMYKJaq0x7ejJgOf_wysTxQA5BrF8AY,2581960
17
17
  psdi_data_conversion/converters/__init__.py,sha256=15Ldt06eyZ0bgNPB4qg419U0Zcjt6TUCTzjCBo8EIzM,210
18
18
  psdi_data_conversion/converters/atomsk.py,sha256=_V33me1e4HW0-YXvdE-z6PdwtSK2gYV6QZf5d8aPqH4,1523
19
- psdi_data_conversion/converters/base.py,sha256=QTXOWEkrKmQvBANEmJilNtI3i0fRFkbVetVtYk8zXxw,35535
19
+ psdi_data_conversion/converters/base.py,sha256=aPxYhI4cbE74K_erMjtP2XJ695atILvsr1qASsRWios,35505
20
20
  psdi_data_conversion/converters/c2x.py,sha256=RjvOUxrb7R09s58p1kQKhICVUvozNJc4bvhQGkk89Ng,1498
21
21
  psdi_data_conversion/converters/openbabel.py,sha256=BGEXPdOfm5QNO67gymH8PrmW88pMvXF8_9fosz3_Bcg,13150
22
22
  psdi_data_conversion/scripts/atomsk.sh,sha256=N_NMO5q8sI3Lt1TerC-xcKbMI0kfscAudy5UAbY0uR0,804
@@ -26,7 +26,7 @@ psdi_data_conversion/static/content/convert.htm,sha256=sw4U8yQQXNYXl2ruYPfg6qIMo
26
26
  psdi_data_conversion/static/content/convertato.htm,sha256=IQ2PUodkWdZbbuvctDs2Ow0tEJXvhrnzhvGYDF7Oiiw,3669
27
27
  psdi_data_conversion/static/content/convertc2x.htm,sha256=mqMscskUPS1JtV1ABl91kH_JyCmK7ORFjD1n2_MZFz4,3669
28
28
  psdi_data_conversion/static/content/documentation.htm,sha256=1GiEjlDCP0kJ3CKkx3l1gPxeOPp4bdOP95MPKx4dzvI,5557
29
- psdi_data_conversion/static/content/download.htm,sha256=J_KwSKjWJJj9-v4ouGuddG_LIMmWzo7Zn7CjiJleUrw,4163
29
+ psdi_data_conversion/static/content/download.htm,sha256=DQKWEuq_Bjv2TyV6DnPXnHrSOBvGYRHOU-m6YOwfsh4,4727
30
30
  psdi_data_conversion/static/content/feedback.htm,sha256=fZrhn4Egs9g6ygqPzV6ZG9ndYK02VdALNVNXRsZ716k,1788
31
31
  psdi_data_conversion/static/content/header-links.html,sha256=7B2bHa7dLfSZ4hPMvVJ3kR0niVAOO3FtHJo0K6m1oP4,693
32
32
  psdi_data_conversion/static/content/psdi-common-footer.html,sha256=CM9F6AXM1LVMLvTP51xTzOicEelSXlyXQyN-BjrQAJk,3933
@@ -72,15 +72,16 @@ psdi_data_conversion/static/javascript/load_accessibility.js,sha256=jTLfmubEmko2
72
72
  psdi_data_conversion/static/javascript/psdi-common.js,sha256=I0QqGQ7l_rA4KEfenQTfPc-uOXXp8sxMh_NHL3EkFm4,6231
73
73
  psdi_data_conversion/static/javascript/report.js,sha256=BHH5UOhXJtB6J_xk_y6woquNKt5W9hCrQapxKtGG1eA,12470
74
74
  psdi_data_conversion/static/styles/format.css,sha256=HKgKkepZtY0NCtKm4JlsuchDL_vymBQ0pRnmfVE8L30,3097
75
- psdi_data_conversion/static/styles/psdi-common.css,sha256=bexxnnJHoq5WllRqrxmUz4GxveFWaidHXee-sA2sU6Q,17220
76
- psdi_data_conversion/templates/index.htm,sha256=or75tQreQY6FI1M8bFDcDESdL3-mHLaIn80QC4933zI,5783
75
+ psdi_data_conversion/static/styles/psdi-common.css,sha256=09VY-lldoZCrohuqPKnd9fvDget5g9ybi6uh13pYeY0,17249
76
+ psdi_data_conversion/templates/index.htm,sha256=7jQYw0oUzV0RSTcYg66MvhPWHf03napHokfFuf-W2Fs,6258
77
77
  psdi_data_conversion/testing/__init__.py,sha256=Xku7drtLTYLLPsd403eC0LIEa_iohVifyeyAITy2w7U,135
78
- psdi_data_conversion/testing/constants.py,sha256=TnUtsNmlFSzBrCWrCOp0TfKz33s8OxzHEj5LlsKJQEE,215
79
- psdi_data_conversion/testing/conversion_callbacks.py,sha256=oSq93JdTz7KvLVirq_Ibaglg1ZxzuoKuWMv9DS2ykgs,18709
80
- psdi_data_conversion/testing/conversion_test_specs.py,sha256=EVP6Y6SsVLwR7JuSK4MOdZM-MGuJpMh6WxielKAn7Vo,18944
81
- psdi_data_conversion/testing/utils.py,sha256=yU6f39rokvgAmaXr-v1LGuOvUk2GrnEb0SNAPjfc8AM,23365
82
- psdi_data_conversion-0.0.36.dist-info/METADATA,sha256=B61tLrWmSCJjjtQ6AMug5uZB3Gvms2rdgM10lCjr3UU,38308
83
- psdi_data_conversion-0.0.36.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
84
- psdi_data_conversion-0.0.36.dist-info/entry_points.txt,sha256=o5y9mx-xX_koYtoAEB4acBG8lUkmhu8TlJhYD7axDS0,69
85
- psdi_data_conversion-0.0.36.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
86
- psdi_data_conversion-0.0.36.dist-info/RECORD,,
78
+ psdi_data_conversion/testing/constants.py,sha256=6k6U3WQ9bJeC_P4Sj_zaLaymyI937b5fZtDCsZpfxmE,411
79
+ psdi_data_conversion/testing/conversion_callbacks.py,sha256=8Lu6_tkNk5hh0bx-CX8i1aBH6i2CtEs0PZkiqObFdlM,18777
80
+ psdi_data_conversion/testing/conversion_test_specs.py,sha256=Bgs-qVvnzqqes38HwhiOlum-Ufl18Efpp090GYTpwYY,24228
81
+ psdi_data_conversion/testing/gui.py,sha256=PQgsykZHDantUPgZY--rY9REb4rWukn8QwUMXsafdWo,15752
82
+ psdi_data_conversion/testing/utils.py,sha256=OZ0fmsHFgoRAH7rVYDfFnGzorXO3cg6RhIFB0fujHc8,25229
83
+ psdi_data_conversion-0.0.37.dist-info/METADATA,sha256=Dnum9-66pizoE3r1JtosgbI9kzPJLishRrc8RWCv2KA,39767
84
+ psdi_data_conversion-0.0.37.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
85
+ psdi_data_conversion-0.0.37.dist-info/entry_points.txt,sha256=xL7XTzaPRr2E67WhOD1M1Q-76hB8ausQlnNiHzuZQPA,123
86
+ psdi_data_conversion-0.0.37.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
87
+ psdi_data_conversion-0.0.37.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.21.1
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,2 +1,3 @@
1
1
  [console_scripts]
2
2
  psdi-data-convert = psdi_data_conversion.main:main
3
+ psdi-data-convert-gui = psdi_data_conversion.app:main