Skip to content

Commit

Permalink
Merge pull request #25 from NatalieThurlby/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
NatalieZelenka authored Sep 5, 2021
2 parents ca5c522 + c7e8553 commit c2a9d01
Show file tree
Hide file tree
Showing 14 changed files with 1,009 additions and 222 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tests/data/
__pycache__/
*.egg-info/
.idea/
docs/contents/api
27 changes: 24 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from distutils.util import convert_path

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))

# get version:
ns = {}
Expand All @@ -41,8 +42,12 @@
# extensions coming with Sphinx (named 'sphinx._ext.*') or your custom
# ones.
extensions += [
'myst_nb'
'myst_nb',
# "sphinxarg.ext",
'sphinx.ext.autosummary',
]
autosummary_generate = True


# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -63,8 +68,24 @@
html_theme_options = {
'github_url': 'https://github.com/NatalieThurlby/ontolopy',
'twitter_url': 'https://twitter.com/hashtag/ontolopy',
'search_bar_text': 'Search this site...',
'search_bar_position': 'navbar',
'search_bar_text': 'Search the docs...',
"icon_links": [
{
"name": "PyPI",
"url": "https://pypi.org/project/ontolopy",
"icon": "fas fa-box-open",
}
],
"search_bar_position": "navbar"
}

html_sidebars = {
'index': [],
'contents/changelog': [],
'contents/installation': [],
'contents/quickstart': [],
'contents/develop': [],
'contents/roadmap': [],
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
22 changes: 22 additions & 0 deletions docs/contents/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

[//]: # (TODO: Link to GitHub releases)

## [1.1.0-beta](https://github.com//NatalieThurlby/ontolopy/compare/1.0.2-beta...1.1.0-beta)
- New functionality:
- `Obo()` class:
- Added `opy.Obo.merge()`: merge one ontology into another.
- Added `opy.Obo.from_dict()`: create `Obo()` from a dictionary.
- Added `opy.Obo.copy()`: copies `Obo()` object.
- Separated `load_obo` from `Obo()` class.
- Added local functions that are used to extract synonyms and synonym types from synonym strings.
- new `opy.uberon` module, containing:
- `Uberon()` class that inherits from `Obo()`, including `sample_map_by_ont` method.
- `uberon_from_obo` function
- new `Relations.format_all` method.
- Refactoring:
- Made the static class variables for reading ontologies private variables.
- Refactored `opy.relations.Relations` class to subclass Pandas DataFrame.
- Testing:
- Added test for `obo.Obo.merge()`.
- Updated tests to include new behaviour for synonyms
- Documentation:
- Improved docstrings for `Obo()` class.
- Set up sphinx autodoc and used to document `Obo()` class.

## [1.0.2-beta](https://github.com//NatalieThurlby/ontolopy/compare/1.0.1-beta...1.0.2-beta)
- Fixed GitHub action for versioned docs [[#9](https://github.com/NatalieThurlby/ontolopy/issues/9)]

Expand Down
21 changes: 21 additions & 0 deletions docs/contents/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# API Reference

```{admonition} What's an API?
API stands for "Application Programming Interface". Ontolopy's API Reference describes everything you needs to know about Ontolopy to know how to use it. It describes all public objects, modules, and functions.
```

## `ontolopy.obo`

The `ontolopy.obo` module contains code for creating and working with the `Obo` class: objects that represent ontologies.

```{eval-rst}
.. currentmodule:: ontolopy.obo
.. autosummary::
:toctree: api/
Obo
Obo.merge
download_obo
load_obo
```
2 changes: 1 addition & 1 deletion docs/contents/roadmap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Road map
# Road-map

This road map is subject to change, but exists to give an outline of plans for Ontolopy in the near future:
- Increase test coverage
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ contents/quickstart
contents/changelog
contents/roadmap
contents/develop
contents/reference
```
5 changes: 3 additions & 2 deletions ontolopy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from .obo import Obo, validate_term, get_obo
from .relations import Relations
from .obo import Obo, download_obo, load_obo
from .relations import Relations, relation_path_to_text
from .uberon import Uberon, uberon_from_obo
Loading

0 comments on commit c2a9d01

Please sign in to comment.