Skip to content

Commit

Permalink
Merge pull request #18 from anergictcell/refactor/pyproject
Browse files Browse the repository at this point in the history
Use pyproject.toml and HPO version update
  • Loading branch information
anergictcell committed Aug 10, 2023
2 parents 4f7e42e + 81559e9 commit c412abe
Show file tree
Hide file tree
Showing 50 changed files with 1,091,925 additions and 1,065,039 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags:
- "v*"

name: Upload Release Asset
name: Release on PyPI

jobs:
build:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Complete unit, integration tests and test coverage measurement
name: Full Tests

on:
push:
Expand Down Expand Up @@ -35,3 +35,7 @@ jobs:
- name: Unittesting (complete-check)
run: |
coverage run -m unittest discover complete-check -s tests && coverage report
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test_python_versions.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Basic Unittesting all Python versions
name: Unittesting all Python versions

on:
pull_request:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

3.2.3
-----
Data update to 2023-07-21
Migrate documentations to ReadTheDocs
Transfer repository ownership back to ``anergictcell``.

3.2.0
-----
Update Pydantic dependency to 2.0
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ fulltests:
python -m unittest discover complete-check -s tests

check:
@echo "Checking flake8"
flake8 pyhpo
@echo "Checking black linting"
black --check .
@echo "Checking ruff"
ruff .
@echo "Checking mypy standard"
mypy pyhpo
@echo "Checking mypy more stict"
@echo "Checking mypy more strict"
mypy --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs --warn-redundant-casts --warn-unreachable pyhpo

docs:
Expand Down
48 changes: 37 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
.. image:: https://codecov.io/gh/anergictcell/pyhpo/branch/master/graph/badge.svg?token=33ZGNQD61W
:target: https://codecov.io/gh/anergictcell/pyhpo

.. image:: https://github.com/anergictcell/pyhpo/actions/workflows/test_coverage.yml/badge.svg
:target: https://github.com/anergictcell/pyhpo/actions/workflows/test_coverage.yml/

.. image:: https://img.shields.io/pypi/dm/pyhpo.svg?label=Pypi%20downloads
:target: https://pypi.org/project/pyhpo/

.. image:: https://img.shields.io/pypi/v/pyhpo?label=Latest%20Release
:target: https://pypi.org/project/pyhpo/#history


*****
PyHPO
*****
Expand Down Expand Up @@ -27,6 +40,9 @@ Internally the ontology is represented as a branched linked list, every term con

It provides an interface to create ``Pandas Dataframe`` from its data, allowing integration in already existing data anlysis tools.

.. hint::

Check out `hpo3 <https://pypi.org/project/hpo3/>`_ (`Documentation <https://hpo3.readthedocs.io/en/stable/>`_) for an alternative implementation. ``hpo3`` has the exact same functionality, but is much faster 🚀 and supports multithreading for even faster large data processing.

Getting started
===============
Expand All @@ -37,26 +53,36 @@ The easiest way to install **PyHPO** is via pip
pip install pyhpo
or, you can additionally install optional packages for extra functionality
This will install a base version of **PyHPO** that offers most functionality.

.. note::

Some features of PyHPO require ``pandas`` and ``scipy``. The standard installation via pip will not include pandas or scipy and PyHPO will work just fine. (You will get a warning on the initial import though).

Without installing ``pandas``, you won't be able to export the Ontology as a ``Dataframe``, everything else will work fine.

Without installing ``scipy``, you won't be able to use the ``stats`` module, especially the enrichment calculations.


If you want to do enrichment analysis, you must also install ``scipy``.

.. code:: bash
# Include pandas during install
pip install pyhpo[pandas]
pip install 'pyhpo[scipy]'
# Include scipy
pip install pyhpo[scipy]
If you want to work with **PyHPO** using ``pandas`` dataframes, you can install the ``pandas`` dependency

# Include all dependencies
pip install pyhpo[all]
.. code:: bash
.. note::
pip install 'pyhpo[pandas]'
Some features of PyHPO require ``pandas`` and ``scipy``. The standard installation via pip will not include pandas or scipy and PyHPO will work just fine. (You will get a warning on the initial import though).
Or simply install both together:

Without installing ``pandas``, you won't be able to export the Ontology as a ``Dataframe``, everything else will work fine.
.. code:: bash
# Include all dependencies
pip install 'pyhpo[all]'
Without installing ``scipy``, you won't be able to use the ``stats`` module, especially the enrichment calculations.
Usage example
Expand Down
19 changes: 19 additions & 0 deletions RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Release checklist

Before creating a new release, follow all the below steps:

- [ ] Create release branch from master
- [ ] Merge all feature branches into release branch
- [ ] Check if new HPO version is available
- [ ] Run all checks `make check`
- [ ] Run full test suite `make fulltests`
- [ ] Check test coverage `make coverage`
- [ ] Decide which type of version bump is required (master, minor, path)
- [ ] Update version in `pyhpo.__init__`
- [ ] Update `CHANGELOG.rst`
- [ ] Create new documentation
- [ ] Create version bump commit
- [ ] Push commit
- [ ] Crate version tag, push tag
- [ ] Merge into master

Loading

0 comments on commit c412abe

Please sign in to comment.