Skip to content

Commit

Permalink
Release v1.0.0-alpha.3
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Oct 10, 2019
1 parent 1649800 commit 5a9c0d8
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 7 deletions.
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,30 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
[Unreleased]: https://github.com/althonos/pronto/compare/v1.0.0-alpha.2...HEAD
[Unreleased]: https://github.com/althonos/pronto/compare/v1.0.0-alpha.3...HEAD

## [1.0.0-alpha.3] - 2019-10-10
[1.0.0-alpha.2]: https://github.com/althonos/pronto/compare/v1.0.0-alpha.2...v1.0.0-alpha.3
### Added
- Extraction of `oboInOwl:consider` annotation in `RdfXMLParser`.
- Extraction of `oboInOwl:savedBy` annotation in `RdfXMLParser`.
- Extraction of `subsetdef` and `synonymtypedef` as annotation properties in
`RdfXMLParser`.
- Support for `doap:Version` instead of `owl:VersionIri` for specification
of ontology data version.
- Proper comparison of `PropertyValue` classes, based on the lexicographic order
of their serialization.
- `Ontology.dump` and `Ontology.dumps` methods to serialize an ontology in
**obo** or **obojson** format.
### Fixed
- `Metadata` not storing optional description of ID spaces if any.
- Wrong type hints in `RelationshipData.equivalent_to_chain`.
### Changed
- Added type checking to some more property setters.
- Avoid using `networkx` in `Term.subclasses`.
- `fastobo`-derived parsers will not create a new entity if one exists in the
graph of dependencies already.
- Exposed `pronto.warnings` and the complete warnings hierarchy.

## [1.0.0-alpha.2] - 2019-10-03
[1.0.0-alpha.2]: https://github.com/althonos/pronto/compare/v1.0.0-alpha.1...v1.0.0-alpha.2
Expand Down
2 changes: 1 addition & 1 deletion pronto/_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-alpha.2
1.0.0-alpha.3
6 changes: 4 additions & 2 deletions pronto/parsers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def process_imports(
imports: Set[str],
import_depth: int = -1,
basepath: str = "",
timeout: int = 5,
) -> Dict[str, Ontology]:
# check we did not reach the maximum import depth
resolved = {}
Expand All @@ -47,9 +48,10 @@ def process_imports(
else:
id_ = f"{ref}.obo" if not os.path.splitext(ref)[1] else ref
url = f"http://purl.obolibrary.org/obo/{id_}"

resolved[ref] = Ontology(
url, max(import_depth - 1, 0), self.ont.timeout
url,
max(import_depth - 1, 0),
timeout
)

# return the resolved imports
Expand Down
5 changes: 4 additions & 1 deletion pronto/parsers/obo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import fastobo

from .base import BaseParser
Expand All @@ -18,10 +20,11 @@ def parse_from(self, handle):

# Extract metadata from the OBO header and resolve imports
self.ont.metadata = self._extract_metadata(doc.header())
self.ont.medata.imports.update(self.process_imports(
self.ont.imports.update(self.process_imports(
self.ont.metadata.imports,
self.ont.import_depth,
os.path.dirname(self.ont.path or str()),
self.ont.timeout,
))

# Extract frames from the current document.
Expand Down
5 changes: 4 additions & 1 deletion pronto/parsers/obojson.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import fastobo

from .base import BaseParser
Expand All @@ -18,10 +20,11 @@ def parse_from(self, handle):

# Extract metadata from the graph metadata and resolve imports
self.ont.metadata = self._extract_metadata(doc.header)
self.ont.medata.imports.update(self.process_imports(
self.ont.imports.update(self.process_imports(
self.ont.metadata.imports,
self.ont.import_depth,
os.path.dirname(self.ont.path or str()),
self.ont.timeout,
))

# Extract frames from the current document.
Expand Down
3 changes: 2 additions & 1 deletion pronto/parsers/rdfxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ def parse_from(self, handle):
self.ont.metadata = self._extract_meta(owl_ontology)

# Process imports
self.ont.medata.imports.update(self.process_imports(
self.ont.imports.update(self.process_imports(
self.ont.metadata.imports,
self.ont.import_depth,
os.path.dirname(self.ont.path or str()),
self.ont.timeout,
))

# Parse typedef first to handle OBO shorthand renaming
Expand Down

0 comments on commit 5a9c0d8

Please sign in to comment.