File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #------------------------------------------------------------------------------#
2- # hsd-python: package for manipulating HSD-formatted data in Python #
3- # Copyright (C) 2011 - 2021 DFTB+ developers group #
4- # Licensed under the BSD 2-clause license. #
5- #------------------------------------------------------------------------------#
1+ #--------------------------------------------------------------------------------------------------#
2+ # hsd-python: package for manipulating HSD-formatted data in Python #
3+ # Copyright (C) 2011 - 2021 DFTB+ developers group
4+ # # BSD 2-clause license.
5+ #
6+ #--------------------------------------------------------------------------------------------------#
67#
78"""
89Toolbox for reading, writing and manipulating HSD-data.
Original file line number Diff line number Diff line change 1- #------------------------------------------------------------------------------#
2- # hsd-python: package for manipulating HSD-formatted data in Python #
3- # Copyright (C) 2011 - 2021 DFTB+ developers group #
4- # Licensed under the BSD 2-clause license. #
5- #------------------------------------------------------------------------------#
1+ #-------------------------------------------------------------------------------------------------- #
2+ # hsd-python: package for manipulating HSD-formatted data in Python #
3+ # Copyright (C) 2011 - 2021 DFTB+ developers group #
4+ # Licensed under the BSD 2-clause license. #
5+ #-------------------------------------------------------------------------------------------------- #
66#
77"""
88Implements common functionalities for the HSD package
Original file line number Diff line number Diff line change 1- #------------------------------------------------------------------------------#
2- # hsd-python: package for manipulating HSD-formatted data in Python #
3- # Copyright (C) 2011 - 2021 DFTB+ developers group #
4- # Licensed under the BSD 2-clause license. #
5- #------------------------------------------------------------------------------#
1+ #-------------------------------------------------------------------------------------------------- #
2+ # hsd-python: package for manipulating HSD-formatted data in Python #
3+ # Copyright (C) 2011 - 2021 DFTB+ developers group #
4+ # Licensed under the BSD 2-clause license. #
5+ #-------------------------------------------------------------------------------------------------- #
66#
77"""
88Contains an event-driven builder for dictionary based (JSON-like) structure
Original file line number Diff line number Diff line change 1- #------------------------------------------------------------------------------#
2- # hsd-python: package for manipulating HSD-formatted data in Python #
3- # Copyright (C) 2011 - 2021 DFTB+ developers group #
4- # Licensed under the BSD 2-clause license. #
5- #------------------------------------------------------------------------------#
1+ #--------------------------------------------------------------------------------------------------#
2+ # hsd-python: package for manipulating HSD-formatted data in Python #
3+ # Copyright (C) 2011 - 2021 DFTB+ developers group
4+ # # BSD 2-clause license.
5+ #
6+ #--------------------------------------------------------------------------------------------------#
67#
78"""
89Contains an event handler base class.
Original file line number Diff line number Diff line change 11# hsd-python: package for manipulating HSD-formatted data in Python #
2- # Copyright (C) 2011 - 2021 DFTB+ developers group #
2+ # Copyright (C) 2011 - 2021 DFTB+ developers group #
33# Licensed under the BSD 2-clause license. #
44#------------------------------------------------------------------------------#
55#
Original file line number Diff line number Diff line change 11# hsd-python: package for manipulating HSD-formatted data in Python #
2- # Copyright (C) 2011 - 2021 DFTB+ developers group #
2+ # Copyright (C) 2011 - 2021 DFTB+ developers group #
33# Licensed under the BSD 2-clause license. #
44#------------------------------------------------------------------------------#
55#
Original file line number Diff line number Diff line change 1- #------------------------------------------------------------------------------#
2- # hsd-python: package for manipulating HSD-formatted data in Python #
3- # Copyright (C) 2011 - 2021 DFTB+ developers group #
4- # Licensed under the BSD 2-clause license. #
5- #------------------------------------------------------------------------------#
1+ #-------------------------------------------------------------------------------------------------- #
2+ # hsd-python: package for manipulating HSD-formatted data in Python #
3+ # Copyright (C) 2011 - 2021 DFTB+ developers group #
4+ # Licensed under the BSD 2-clause license. #
5+ #-------------------------------------------------------------------------------------------------- #
66#
77"""
88Contains the event-generating HSD-parser.
@@ -145,9 +145,7 @@ def _parse(self, line):
145145 # Equal sign
146146 elif sign == "=" :
147147 # Ignore if followed by "{" (DFTB+ compatibility)
148- if after .lstrip ().startswith ("{" ):
149- # _oldbefore may already contain the tagname, if the
150- # tagname was followed by an attribute -> append
148+ if after .lstrip ().startswith ("{" ): # _oldbefore may already contain the tagname, if the # tagname was followed by an attribute -> append
151149 self ._oldbefore += before
152150 else :
153151 self ._hsdattrib [common .HSD_ATTRIB_EQUAL ] = True
Original file line number Diff line number Diff line change 11#!/bin/env python3
2- #------------------------------------------------------------------------------#
3- # hsd-python: package for manipulating HSD-formatted data in Python #
4- # Copyright (C) 2011 - 2021 DFTB+ developers group #
5- # Licensed under the BSD 2-clause license. #
6- #------------------------------------------------------------------------------#
2+ #-------------------------------------------------------------------------------------------------- #
3+ # hsd-python: package for manipulating HSD-formatted data in Python #
4+ # Copyright (C) 2011 - 2021 DFTB+ developers group #
5+ # Licensed under the BSD 2-clause license. #
6+ #-------------------------------------------------------------------------------------------------- #
77#
88"""Tests for the dictbuilder class"""
99
1010import io
1111import pytest
1212import hsd
1313
14+ # Some abbreviations
1415_HSD_LINE = hsd .HSD_ATTRIB_LINE
1516_HSD_EQUAL = hsd .HSD_ATTRIB_EQUAL
1617_HSD_NAME = hsd .HSD_ATTRIB_NAME
1718
19+
1820# General test list format for valid tests
1921# [("Test name", ([List of HSD events], expected dictionary outcome))]
2022
Original file line number Diff line number Diff line change 11#!/bin/env python3
2- #------------------------------------------------------------------------------#
3- # hsd-python: package for manipulating HSD-formatted data in Python #
4- # Copyright (C) 2011 - 2021 DFTB+ developers group #
5- # Licensed under the BSD 2-clause license. #
6- #------------------------------------------------------------------------------#
2+ #--------------------------------------------------------------------------------------------------#
3+ # hsd-python: package for manipulating HSD-formatted data in Python #
4+ # Copyright (C) 2011 - 2021 DFTB+ developers group
5+ # # BSD 2-clause license.
6+ #
7+ #--------------------------------------------------------------------------------------------------#
78#
89import numpy as np
910import hsd
Original file line number Diff line number Diff line change 11#!/bin/env python3
2- #------------------------------------------------------------------------------#
3- # hsd-python: package for manipulating HSD-formatted data in Python #
4- # Copyright (C) 2011 - 2021 DFTB+ developers group #
5- # Licensed under the BSD 2-clause license. #
6- #------------------------------------------------------------------------------#
2+ #-------------------------------------------------------------------------------------------------- #
3+ # hsd-python: package for manipulating HSD-formatted data in Python #
4+ # Copyright (C) 2011 - 2021 DFTB+ developers group #
5+ # Licensed under the BSD 2-clause license. #
6+ #-------------------------------------------------------------------------------------------------- #
77#
88import io
99import pytest
You can’t perform that action at this time.
0 commit comments