Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
🚚 Rename Bionty to PublicOntology class (#536)
Browse files Browse the repository at this point in the history
* 🚚 Rename Bionty to PublicOntology class

* πŸ’š Use 3.10

* πŸ’š Fix import

* πŸ’š Fix import

* πŸ’š Fix

* πŸ’š Add quotes
  • Loading branch information
sunnyosun authored Jan 12, 2024
1 parent d2662bc commit 11f9318
Show file tree
Hide file tree
Showing 28 changed files with 158 additions and 165 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
python-version: ["3.10"]
group: ["bionty-unit", "bionty-docs"]
timeout-minutes: 25

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
aws-region: eu-central-1

- name: Lint
if: matrix.python-version == '3.9' && matrix.group == 'bionty-unit'
if: matrix.python-version == '3.10' && matrix.group == 'bionty-unit'
run: |
nox -s lint
- name: Build
Expand All @@ -75,7 +75,7 @@ jobs:
path: .coverage

- name: Deploy docs
if: ${{ matrix.python-version == '3.9' && matrix.group == 'bionty-docs' }}
if: ${{ matrix.python-version == '3.10' && matrix.group == 'bionty-docs' }}
id: netlify
uses: nwtgck/[email protected]
with:
Expand All @@ -94,7 +94,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
cache: "pip"
cache-dependency-path: ".github/workflows/build.yml"
- run: |
Expand Down
15 changes: 8 additions & 7 deletions bionty/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
.. autosummary::
:toctree: .
Bionty
BiontyField
PublicOntology
PublicOntologyField
Bionty sources:
PublicOntology sources:
.. autosummary::
:toctree: .
Expand Down Expand Up @@ -65,11 +65,11 @@

# dynamic classes
from . import dev

# tools
from ._bionty import Bionty, BiontyField
from ._display_sources import display_available_sources, display_currently_used_sources
from ._ontology import Ontology

# tools
from ._public_ontology import PublicOntology, PublicOntologyField
from ._settings import settings

# sources
Expand All @@ -92,6 +92,7 @@
from .entities._tissue import Tissue

# backward compat
Entity = Bionty
Entity = PublicOntology
Bionty = PublicOntology
Readout = ExperimentalFactor
Species = Organism
2 changes: 1 addition & 1 deletion bionty/_display_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def display_available_sources() -> pd.DataFrame:
return parse_sources_yaml(settings.local_sources).set_index("entity") # type: ignore


# This function naming is consistent with the `currently_used` field in BiontySource SQL table
# This function naming is consistent with the `currently_used` field in PublicSource SQL table
# Do not rename!
def display_currently_used_sources() -> pd.DataFrame:
"""Displays all currently used sources.
Expand Down
Loading

0 comments on commit 11f9318

Please sign in to comment.