Debugging File Encoding and File Path Distribution Bugs for GlobalChem with Github Action Bots.

name: GlobalChem API
on: [pull_request, push, workflow_dispatch]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.7", "3.8", "3.9"]
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install
run: |
python global_chem/setup.py install
pip install python-coveralls
pip install coveralls
pip install coverage==4.5.4
pip install nose
- name: Run GlobalChem tests
run: |
cd global_chem
python -m nose --verbose --with-coverage -s -w tests/
==============================================================
ERROR: Test the deep layer network graphs
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "D:\a\global-chem\global- chem\global_chem\tests\test_global_chem.py", line 224, in test_deep_layer_networks
gc.print_deep_network()
File "D:\a\global-chem\global-chem\global_chem\global_chem\global_chem.py", line [11]
27, in print_deep_network
print(PrintTreeUtilities.printTrees(_DEEP_NETWORK_KEY[ self.root_node ]))
File "D:\a\global-chem\global-chem\global_chem\global_chem\global_chem.py", line 277, in printTrees
print("\n".join(get_repr(node)))
File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\encodings\cp[12]
52.py", line [19], in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u[25] character maps to <undefined>
sys.stdin.reconfigure(encoding='utf-8')
sys.stdout.reconfigure(encoding='utf-8')
======================================================================
ERROR: Test the Building of the GlobalChem Network
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "D:\a\global-chem\global-chem\global_chem\tests\test_global_chem.py", line 57, in test_build_global_chem_network
molecules = gc.get_node_smiles('emerging_perfluoroalkyls')
File "D:\a\global-chem\global-chem\global_chem\global_chem\global_chem.py", line 664, in get_node_smiles
raise GraphNetworkError(
global_chem.global_chem.GraphNetworkError: No Node named emerging_perfluoroalkyls exists
C:\\path\\to\\file
/path/to/file
self.splitter = '/' 
if os.name == 'nt':
self.splitter = '\\'
absolute_file_path = self.splitter.join(os.path.abspath(__file__).split(self.splitter))

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store