Skip to content

Commit 2d9a95d

Browse files
authored
Merge pull request #330 from mpsonntag/release143
Preparation for version 1.4.3 release
2 parents a5ff665 + 3171ed9 commit 2d9a95d

File tree

9 files changed

+150
-30
lines changed

9 files changed

+150
-30
lines changed

.travis.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,26 @@ matrix:
77
include:
88
- os: linux
99
python: "2.7"
10-
env: COVERALLS=1
1110
- os: linux
1211
python: "3.5"
1312
- os: linux
1413
python: "3.6"
14+
env: COVERALLS=1
15+
- os: linux
16+
python: "3.7"
17+
dist: xenial
18+
- os: linux
19+
python: "3.8"
20+
dist: xenial
1521

1622
- os: osx
1723
language: generic
1824
env:
1925
- OSXENV=3.6.0
26+
- os: osx
27+
language: generic
28+
env:
29+
- OSXENV=3.7.0
2030
- os: osx
2131
language: generic
2232
env:

CHANGELOG.md

+46-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,52 @@ until the next release.
55

66
# Latest changes in master
77

8-
...
8+
# Version 1.4.3
9+
10+
## Introduction of odML templates support and update in odML terminology handling
11+
12+
Support for importing and working with odML templates is added:
13+
- the core library now features the `TemplateHandler` class to handle import and usage of odML templates.
14+
- the default URL to fetch templates from has been set to `https://templates.g-node.org`.
15+
- all terminology URLs are updated to the new terminology deployment at `https://terminology.g-node.org`.
16+
17+
## Additional console script: 'odmlview'
18+
19+
Currently most web browsers no longer support viewing local files that include further local files like stylesheets; check [here](https://developer.mozilla.org/en-US/docs/Archive/Misc_top_level/Same-origin_policy_for_file:_URIs) for additional details. The console script `odmlview` provides a local webserver that is able to properly serve odML XML files from a local directory and render them correctly, if the appropriate stylesheets are present in the same directory.
20+
21+
```
22+
'odmlview' sets up a minimal webserver to view odml files saved in the
23+
XML format via the webbrowser. After it is started, the webserver will
24+
open a new tab in the default webbrowser and display the content of
25+
the directory the server was started from. odML files can then be
26+
viewed from there.
27+
To properly render XML, an odML file may contain the element
28+
'<?xml-stylesheet type="text/xsl" href="odmlDocument.xsl"?>' where the
29+
'odmlDocument.xsl' stylesheet should reside in the same directory as the
30+
odML file to be rendered. By using the '--fetch' flag the latest version
31+
of this stylesheet will be downloaded from `templates.g-node.org` to
32+
the current directory when starting up the service.
33+
```
34+
35+
## Console script 'odmlconversion' is renamed
36+
The console script `odmlconversion` is renamed to `odmlconvert`. For backwards compatibility the script will be available as `odmlconversion` with a deprecation notice.
37+
38+
## 'pyyaml' dependency update
39+
The `pyyaml` dependency has been changed to the non-breaking beta version 4.2b4. See issue #291 for details.
40+
41+
## Minor changes, updates and fixes
42+
- odML entity IDs are automatically added when converting from odML version 1 to odMl version 1.1 for `Document`, `Section` and `Property` elements. If an ID already exists, it stays the same, if it is compatible with the Python UUID types. Otherwise (also if empty) a new ID is created for the odML entity.
43+
- `Property` can now be set as `int` with value `0`. See issue #314 for details.
44+
- appending and extending of `Property` values of dtypes `person`, `url` and `text` is now possible. See issue #318 for details.
45+
- the default `RDFWriter` format is set to `turtle`. See issue #214 for details.
46+
- the `RDFWriter` now checks for a given file extension within the RDF document name if accidentally given there. See issue #213 for details.
47+
- the `RDFWriter` now throws a `ValueError` if an unsupported RDF format is given. See issue #215 for details.
48+
- the `XMLReader` now properly handles entity creation failures when started with option `ignore_errors=True`. See issue #276 for details.
49+
- the `pprint` method has been added to `Document` to print while document section. See issue #319 for details.
50+
- the README file has been changed from `rst` to the `md` format.
51+
- the current tutorial has been updated to include latest changes.
52+
- the automated builds have been updated to include Python versions 3.7 and 3.8; version 3.4 has been removed since it is no longer supported on travis.
53+
954

1055
# Version 1.4.2
1156

README.md

+39-20
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
[![Build status](https://ci.appveyor.com/api/projects/status/br7pe6atlwdg5618/branch/master?svg=true)](https://ci.appveyor.com/project/G-Node/python-odml/branch/master)
33
![Test coverage](https://coveralls.io/repos/github/G-Node/python-odml/badge.svg?branch=master)
44
[![PyPI version](https://img.shields.io/pypi/v/odml.svg)](https://pypi.org/project/odML/)
5+
[![Read the Docs](https://img.shields.io/readthedocs/python-odml)](https://python-odml.readthedocs.io/en/latest/)
6+
57

68
# odML (Open metaData Markup Language) core library
79

@@ -15,8 +17,43 @@ with the version control system **git**, but still want to use it, have a look a
1517
documentation available on the [git-scm website](https://git-scm.com/).
1618

1719

18-
# Breaking changes
20+
# odML Project page
21+
22+
More information about the project including related projects as well as tutorials and
23+
examples can be found at our odML [project page](https://g-node.github.io/python-odml).
24+
25+
26+
# Getting started
27+
28+
## Installation
29+
30+
*python-odml* is most conveniently installed via pip.
31+
32+
```
33+
pip install odml
34+
```
35+
36+
## Tutorial and examples
37+
38+
- We have assembled a set of
39+
[tutorials](http://github.com/G-Node/python-odml/blob/master/doc/tutorial.rst "Python Tutorial").
40+
41+
## Python convenience scripts
42+
43+
The Python installation features multiple convenience commandline scripts.
44+
45+
- `odmlconvert`: Converts odML files of previous file versions into the current one.
46+
- `odmltordf`: Converts odML files to the supported RDF version of odML.
47+
- `odmlview`: Render and browse local XML odML files in the webbrowser.
1948

49+
All scripts provide detailed usage descriptions by adding the `help` flag to the command.
50+
51+
odmlconvert -h
52+
odmltordf -h
53+
odmlview -h
54+
55+
56+
# Breaking changes
2057

2158
odML Version 1.4 introduced breaking format and API changes compared to the previous
2259
versions of odML. Files saved in the previous format versions can be converted to a 1.4
@@ -57,21 +94,6 @@ release notes](https://github.com/G-Node/python-odml/releases).
5794
* lib32z1-dev
5895

5996

60-
# Installation
61-
62-
The simplest way to install Python-odML is from PyPI using the pip tool:
63-
64-
65-
```
66-
$ pip install odml
67-
```
68-
69-
On Ubuntu, the pip package manager is available in the repositories as ```python-pip```.
70-
71-
If this method is used, the appropriate Python dependencies are downloaded and installed
72-
automatically.
73-
74-
7597
# Building from source
7698

7799
To download the Python-odML library please either use git and clone
@@ -95,15 +117,12 @@ To install the Python-odML library, enter the corresponding directory and run:
95117
**Note** The master branch is our current development branch, not all features might be
96118
working as expected. Use the release tags instead.
97119

98-
# odML Project page
99-
100-
More information about the project including related projects as well as tutorials and
101-
examples can be found at our odML [project page](https://g-node.github.io/python-odml).
102120

103121
# Contributing and Governance
104122

105123
See the [CONTRIBUTING](CONTIBUTING.md) document for more information on this.
106124

125+
107126
# Bugs & Questions
108127

109128
Should you find a behaviour that is likely a bug, please file a bug report at

appveyor.yml

+4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ environment:
66
PYVER: "3.5"
77
- PYTHON: "C:\\Python36"
88
PYVER: "3.6"
9+
- PYTHON: "C:\\Python37"
10+
PYVER: "3.7"
911
- PYTHON: "C:\\Python27-x64"
1012
PYVER: "2.7"
1113
- PYTHON: "C:\\Python35-x64"
1214
PYVER: "3.5"
1315
- PYTHON: "C:\\Python36-x64"
1416
PYVER: "3.6"
17+
- PYTHON: "C:\\Python37-x64"
18+
PYVER: "3.7"
1519

1620
build: false
1721

doc/tools.rst

+27
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,30 @@ RDFConverter
5555
:members:
5656
:inherited-members:
5757
:undoc-members:
58+
59+
.. _cli_scripts:
60+
61+
Command line scripts
62+
====================
63+
Several cli convenience scripts are automatically installed and are available from the command line.
64+
65+
odML conversion script
66+
----------------------
67+
.. automodule:: odml.scripts.odml_convert
68+
:members:
69+
:inherited-members:
70+
:undoc-members:
71+
72+
odML to RDF script
73+
------------------
74+
.. automodule:: odml.scripts.odml_to_rdf
75+
:members:
76+
:inherited-members:
77+
:undoc-members:
78+
79+
odML view (browse odml files locally)
80+
-------------------------------------
81+
.. automodule:: odml.scripts.odml_view
82+
:members:
83+
:inherited-members:
84+
:undoc-members:

docs/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ pip install odml
7777

7878
The Python installation features multiple convenience commandline scripts.
7979

80-
- `odmlconversion`: Converts odML files of previous file versions into the current one.
80+
- `odmlconvert`: Converts odML files of previous file versions into the current one.
8181
- `odmltordf`: Converts odML files to the supported RDF version of odML.
8282
- `odmlview`: Render and browse local XML odML files in the webbrowser.
8383

8484
All scripts provide detailed usage descriptions by adding the `help` flag to the command.
8585

86-
odmlconversion -h
86+
odmlconvert -h
8787
odmltordf -h
8888
odmlview -h
8989

odml/info.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"VERSION": "1.4.2",
2+
"VERSION": "1.4.3",
33
"FORMAT_VERSION": "1.1",
44
"AUTHOR": "Hagen Fritsch, Jan Grewe, Christian Kellner, Achilleas Koutsou, Michael Sonntag, Lyuba Zehl",
5-
"COPYRIGHT": "(c) 2011-2018, German Neuroinformatics Node",
5+
"COPYRIGHT": "(c) 2011-2019, German Neuroinformatics Node",
66
"CONTACT": "[email protected]",
77
"HOMEPAGE": "https://github.com/G-Node/python-odml",
88
"CLASSIFIERS": [
@@ -11,6 +11,8 @@
1111
"Programming Language :: Python :: 2.7",
1212
"Programming Language :: Python :: 3.5",
1313
"Programming Language :: Python :: 3.6",
14+
"Programming Language :: Python :: 3.7",
15+
"Programming Language :: Python :: 3.8",
1416
"Topic :: Scientific/Engineering",
1517
"Intended Audience :: Science/Research",
1618
"License :: OSI Approved :: BSD License"

odml/scripts/odml_conversion.py odml/scripts/odml_convert.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
"""odmlConversion
1+
"""odmlConvert
22
3-
odmlConversion searches for odML files within a provided SEARCHDIR
3+
odmlConvert searches for odML files within a provided SEARCHDIR
44
and converts them to the newest odML format version.
55
Original files will never be overwritten. New files will be
66
written either to a new directory at the current or a specified
77
location.
88
9-
Usage: odmlconversion [-r] [-o OUT] SEARCHDIR
9+
Usage: odmlconvert [-r] [-o OUT] SEARCHDIR
1010
1111
Arguments:
1212
SEARCHDIR Directory to search for odML files.
@@ -123,5 +123,17 @@ def main(args=None):
123123
report.close()
124124

125125

126+
def dep_note(args=None):
127+
"""
128+
Print deprecation warning and call main function.
129+
130+
:param args: Command line arguments
131+
"""
132+
133+
print("\n[DEPRECATION WARNING] 'odmlconversion' will be removed with \n"
134+
"the next version release. Please use 'odmlconvert' instead.\n")
135+
main(args)
136+
137+
126138
if __name__ == "__main__":
127139
main(sys.argv[1:])

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
classifiers=CLASSIFIERS,
5050
license="BSD",
5151
entry_points={'console_scripts': ['odmltordf=odml.scripts.odml_to_rdf:main',
52-
'odmlconversion=odml.scripts.odml_conversion:main',
52+
'odmlconversion=odml.scripts.odml_convert:dep_note',
53+
'odmlconvert=odml.scripts.odml_convert:main',
5354
'odmlview=odml.scripts.odml_view:main']}
5455
)

0 commit comments

Comments
 (0)