Skip to content

Commit

Permalink
Merge pull request #7 from basf/bugfix/docs
Browse files Browse the repository at this point in the history
Bugfix/docs
  • Loading branch information
mkumar73 authored May 28, 2024
2 parents cca96d3 + b11cd4d commit 0b01a4b
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 30 deletions.
4 changes: 2 additions & 2 deletions docs/api/base_models/BaseModels.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Base Models
===========
mambular.base_models
====================

.. autoclass:: mambular.base_models.BaseMambularClassifier
:members:
Expand Down
4 changes: 2 additions & 2 deletions docs/api/models/Models.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Models
======
mambular.models
===============

.. autoclass:: mambular.models.MambularClassifier
:members:
Expand Down
4 changes: 2 additions & 2 deletions docs/api/utils/Preprocessor.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Preprocessing
=============
mambular.utils
==============

.. autoclass:: mambular.utils.Preprocessor
:members:
13 changes: 2 additions & 11 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@

# Contribute
## Contribute

Thank you for considering contributing to our Python package! We appreciate your time and effort in helping us improve our project. Please take a moment to review the following guidelines to ensure a smooth and efficient contribution process.

## Table of Contents

- Code of Conduct
- Setting Up Development Environment
- How to Contribute
- Submitting Contributions
- Issue Tracker
- License

### Code of Conduct

We kindly request all contributors to adhere to our Code of Conduct when participating in this project. It outlines our expectations for respectful and inclusive behavior within the community.
Expand Down Expand Up @@ -43,7 +34,7 @@ pip install -r docs/requirements_docs.txt

1. Create a new branch from the `develop` branch for your contributions. Please use descriptive and concise branch names.
2. Make your desired changes or additions to the codebase.
3. Ensure that your code adheres to our coding style guidelines.
3. Ensure that your code adheres to [PEP8](https://peps.python.org/pep-0008/) coding style guidelines.
4. Write appropriate tests for your changes, ensuring that they pass.
- `make test`
5. Update the documentation and examples, if necessary.
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
:maxdepth: 2
:hidden:

api/models/Models
api/base_models/BaseModels
api/utils/Preprocessor
api/models/index
api/base_models/index
api/utils/index


.. toctree::
Expand Down
10 changes: 6 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Installation
## Installation

Please follow the steps below for installing `mambular`
Please follow the steps below for installing `mambular`.

Install from the source:
### Install from the source:

```bash
cd mamba-tabular
Expand All @@ -11,4 +11,6 @@ pip install .

Note: Make sure you in the same directory where `setup.py` file resides.

This package is so far not available in PyPi.
### Installation from PyPi:

**Note:**This package is so far not available in PyPi, expected to release soon!
43 changes: 42 additions & 1 deletion docs/release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
# Build and release
## Build and release

The document outlines the steps to build and release the `mambular` package. At this point, it is assumed that the development and testing of the package have been completed successfully.

### 1. Test documentation
It is expected from the contributor to update the documentation as an when required along side the change in source code. Please use the below process to test the documentation:

```sh
cd mambular/docs/

make doctest
```
Fix any docstring related issue, then proceed with next steps.

### 2. Version update
The package version is mantained in `mambular/__version__.py` file. Increment the version according to the changes such as patch, minor, major or all.

### 3. Release
We use git flow for the package release.

```sh
git flow release start <version>
```
- A new branch is created from the `develop` branch. This new branch is named according to the convention `release/<version>`. For example, if you run `git flow release start 1.0.0`, the new branch will be `release/1.0.0`.
- The current working branch switches to the newly created release branch. This means any new commits will be added to the release branch, not the `develop` branch.
- This new branch is used to finalize the release. You can perform tasks such as version number bumps, documentation updates, and final testing.

Once you are satisfied with changes, use the below command to finish the release.
```sh
git flow release finish <version>
```

- It will Merges the release branch into `main` (or `master`).
- Tags the release with the version number.
- Merges the release branch back into `develop`.
- Deletes the release branch.

Finally, push the commits and tags to origin.

```sh
git push origin --tags
```





10 changes: 5 additions & 5 deletions mambular/models/sklearn_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,11 @@ def predict_proba(self, X):
>>> from sklearn.metrics import accuracy_score, precision_score, f1_score, roc_auc_score
>>> # Define the metrics you want to evaluate
>>> metrics = {
'Accuracy': (accuracy_score, False),
'Precision': (precision_score, False),
'F1 Score': (f1_score, False),
'AUC Score': (roc_auc_score, True)
}
... 'Accuracy': (accuracy_score, False),
... 'Precision': (precision_score, False),
... 'F1 Score': (f1_score, False),
... 'AUC Score': (roc_auc_score, True)
... }
>>> # Assuming 'X_test' and 'y_test' are your test dataset and labels
>>> # Evaluate using the specified metrics
>>> results = classifier.evaluate(X_test, y_test, metrics=metrics)
Expand Down

0 comments on commit 0b01a4b

Please sign in to comment.