Skip to content

Commit

Permalink
Merge pull request #2 from moldyn/prepare_v0.1.1
Browse files Browse the repository at this point in the history
Prepare v0.1.1
  • Loading branch information
braniii authored Nov 7, 2023
2 parents 3e3b22e + d4fa93c commit 58a6204
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 18 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


## [Unreleased]


## [0.1.1] - 2023-11-07
#### Added Features and Improvements 🙌
- Add python 3.12 support

#### Other changes:
- Slightly improved Readme and docs


## [0.1.0] - 2023-09-13
- Initial release 🎉


[Unreleased]: https://github.com/moldyn/normi/compare/v0.1.0...main
[Unreleased]: https://github.com/moldyn/normi/compare/v0.1.1...main
[0.1.1]: https://github.com/moldyn/normi/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/moldyn/normi/tree/v0.1.0
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
</p>

<p>
<a href="https://moldyn.github.io/normi">Docs</a> •
<a href="https://moldyn.github.io/NorMI">Docs</a> •
<a href="#features">Features</a> •
<a href="#installation">Installation</a> •
<a href="#usage">Usage</a> •
<a href="https://moldyn.github.io/normi/faq">FAQ</a>
<a href="https://moldyn.github.io/NorMI/faq">FAQ</a>
</p>
</div>

# NorMI: Nonparametric Normalized Mutual Information Estimator Based on $k$-NN Statistics
# NorMI: Nonparametric Normalized Mutual Information Estimator Based on *k*-NN Statistics
This software provides an extension to the Kraskov-Estimator to allow normalizing the mutual information.

The method will be published soon as:
Expand All @@ -51,10 +51,9 @@ If you use this software package, please cite the above mentioned paper.
- Intuitive usage via [module](#module---inside-a-python-script) and via [CI](#ci---usage-directly-from-the-command-line)
- Sklearn-style API for fast integration into your Python workflow
- No magic, only a single parameter which can be optimized via cross-validation
- Extensive [documentation](https://moldyn.github.io/normi) and detailed discussion in publication
- Extensive [documentation](https://moldyn.github.io/NorMI) and detailed discussion in publication

## Installation
<!--
The package is called `normi` and is available via [PyPI](https://pypi.org/project/normi) or [conda](https://anaconda.org/conda-forge/normi). To install it, simply call:
```bash
python3 -m pip install --upgrade normi
Expand All @@ -64,14 +63,12 @@ or
conda install -c conda-forge normi
```
or for the latest dev version
-->
The package is not yet published and only available directly from github
```bash
# via ssh key
python3 -m pip install git+ssh://[email protected]/moldyn/normi.git
python3 -m pip install git+ssh://[email protected]/moldyn/NorMI.git

# or via password-based login
python3 -m pip install git+https://github.com/moldyn/normi.git
python3 -m pip install git+https://github.com/moldyn/NorMI.git
```

### Shell Completion
Expand All @@ -86,10 +83,16 @@ In general one can call the module directly by its entry point `$ normi` or by c

### CI - Usage Directly from the Command Line
The module brings a rich CI using [click](https://click.palletsprojects.com).
Each module and submodule contains a detailed help, which can be accessed by
...
For a complete list of all options please see the
[docs](https://moldyn.github.io/NorMI/reference/cli/).
```bash
python -m normi /
--input input_file / # ascii file of shape (n_samples, n_features)
--output output_file / # creates ascii file of shape (n_features, n_features)
--n-dims / # this allows to treat every n_dims columns as a high dimensional feature
--verbose

tba
```

### Module - Inside a Python Script
```python
Expand All @@ -99,6 +102,6 @@ from normi import NormalizedMI
# X is np.ndarray of shape (n_samples, n_features)

nmi = NormalizedMI()
nmi.fit(X)
nmi_matrix = nmi.fit_transform(X)
...
```
4 changes: 2 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you want to request a change, you first have to [fork the repository](https:/
=== "bash + conda"

``` bash
conda create -n normi -c conda-forge python
conda create -n normi -c conda-forge python=3.12
conda activate normi
python -m pip install -e .[all]
```
Expand All @@ -38,7 +38,7 @@ If you want to request a change, you first have to [fork the repository](https:/
=== "zsh + conda"

``` zsh
conda create -n normi -c conda-forge python
conda create -n normi -c conda-forge python=3.12
conda activate normi
python -m pip install -e .\[all]
```
Expand Down
8 changes: 8 additions & 0 deletions docs/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ This guide will give you an overview of how to publish a new version of normi. I
## Prepare New Release

Please ensure that,

1. the version number in `setup.py` and `src/normi/__init__.py` are bumped,
1. a new tag is created via `git tag v0.*.*` and pushed `git push --tags`, and
1. the changelog includes the new tag and all changes of the release.

As an example see for e.g. the commit of `v0.1.1`, [`c2582ed`](https://github.com/moldyn/NorMI/commit/c2582ed).

## Upload to PyPI

There is an CI to publish new versions automatically. Therefore, a new release
needs to be published. Please ensure that each release is based on a tag.

## Build and Upload to PyPI (preferred)

It is as simple as creating a new release from the new tag. The Github action
will do the rest.

## Build and Upload to PyPI (admin only)

For an introduction, please take a look at the [PyPI manual](https://packaging.python.org/en/latest/tutorials/packaging-projects/).
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def remove_gh_dark_mode_only_tags(text, tag='#gh-dark-mode-only'):
# This call to setup() does all the work
setuptools.setup(
name='normi',
version='0.1.0',
version='0.1.1',
description='Estimator for Normalized Mutual Information',
long_description=README,
long_description_content_type='text/markdown',
Expand Down
2 changes: 1 addition & 1 deletion src/normi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
from ._estimators import NormalizedMI


__version__ = '0.1.0'
__version__ = '0.1.1'

0 comments on commit 58a6204

Please sign in to comment.