Skip to content

Commit 01b8aec

Browse files
committed
[tools] Move section_subclasses.yaml
Closes #212 The `section_subclasses.yaml` file is moved from the `doc` folder to the new `odml/resources` folder. This allows usage of the file with all install options.
1 parent afdc61e commit 01b8aec

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ until the next release.
55

66
# Latest changes in master
77

8+
## Minor changes, updates and fixes
9+
- The `section_subclasses.yaml` file is moved from the `doc` folder to the new `odml/resources` folder. This allows usage of the file with all install options. See issue #212 for details.
10+
811
# Version 1.4.3
912

1013
## Introduction of odML templates support and update in odML terminology handling

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include LICENSE
22
include README.rst
33
include odml/info.json
4-
include doc/section_subclasses.yaml
4+
include odml/resources/section_subclasses.yaml
File renamed without changes.

odml/tools/rdf_converter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def __init__(self, odml_documents):
4343

4444
self.section_subclasses = {}
4545

46-
subclass_path = os.path.join(dirname(dirname(dirname(abspath(__file__)))),
47-
'doc', 'section_subclasses.yaml')
46+
subclass_path = os.path.join(odml.__path__[0], 'resources',
47+
'section_subclasses.yaml')
4848

4949
if os.path.isfile(subclass_path):
5050
with open(subclass_path, "r") as f:

test/test_rdf_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def test_adding_values(self):
132132
object=Literal("val")))), 3)
133133

134134
def test_section_subclass(self):
135-
p = os.path.join(dirname(dirname(abspath(__file__))), 'doc', 'section_subclasses.yaml')
135+
p = os.path.join(odml.__path__[0], 'resources', 'section_subclasses.yaml')
136136
with open(p, "r") as f:
137137
subclass = yaml.load(f)
138138

0 commit comments

Comments
 (0)