Skip to content

Commit

Permalink
documentation updates before registering (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaferranti authored Jan 22, 2023
1 parent a133077 commit 436edcb
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 44 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
|:------:|:--------------:|:---------------:|:--------------:|
|[![version][ver-img]][ver-url]|[![CI Status][ci-img]][ci-url]|[![Stable docs][stable-img]][stable-url]|[![contributing guidelines][contrib-img]][contrib-url]|
|[![Licese: MIT][license-img]][license-url]|[![Coverage][cov-img]][cov-url]|[![Dev docs][dev-img]][dev-url]|[![SciML Code Style][style-img]][style-url]|
|[![downloads][download-img]][download-url]|[![pkgeval-img]][pkgeval-url]||[![gitter-chat][chat-img]][chat-url]|

A Julia library for fuzzy inference.

Expand All @@ -12,7 +13,7 @@ A Julia library for fuzzy inference.
To install the package, open a Julia session and run

```julia
using Pkg; Pkg.add(url="https://github.com/lucaferranti/FuzzyLogic.jl.git")
using Pkg; Pkg.add("FuzzyLogic")
```

the package can then be loaded with
Expand All @@ -21,13 +22,11 @@ the package can then be loaded with
using FuzzyLogic
```

## Roadmap
## Features

- **Rich!** Mamdani and Sugeno inference systems, both Type-1 and Type-2, several [membership functions](https://lucaferranti.github.io/FuzzyLogic.jl/stable/api/memberships) and [algoritms options](https://lucaferranti.github.io/FuzzyLogic.jl/stable/api/fis) available.
- **Compatible!** Able to read/write your model from/to [IEEE 1855-2016 Fuzzy Markup Language](https://en.wikipedia.org/wiki/Fuzzy_markup_language) and [IEC 61131-7 Fuzzy Control Language](https://ffll.sourceforge.net/fcl.htm) and Matlab Fuzzy toolbox `.fis` files.
- **Rich!** Mamdani and Sugeno Type-1 inference systems, several membership functions and algoritms options available.
- **Expressive!** Clear Domain Specific Language to write your model as human readable Julia code
- **Productive!** Several visualization tools to help debug and tune your model.
- **Portable!** Compile your final model to Julia or C/C++ code.

## Quickstart example

Expand Down Expand Up @@ -58,7 +57,7 @@ fis = @mamfis function tipper(service, food)::tip
service == excellent || food == delicious --> tip == generous
end

fis(; service=1, food=2)
fis(service=1, food=2)
```

## Documentation
Expand All @@ -74,12 +73,15 @@ Contributions are welcome! If you find a bug or want to request a feature, [open

- Copyright (c) 2022 [Luca Ferranti](https://github.com/lucaferranti)

[ver-img]: https://img.shields.io/badge/lifecycle-maturing-important
[ver-url]: #
[ver-img]: https://juliahub.com/docs/FuzzyLogic/version.svg
[ver-url]: https://github.com/lucaferranti/FuzzyLogic.jl/releases/latest

[license-img]: https://img.shields.io/badge/license-MIT-yellow.svg
[license-url]: https://github.com/lucaferranti/FuzzyLogic.jl/blob/main/LICENSE

[download-img]: https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/FuzzyLogic&label=downloads
[download-url]: https://pkgs.genieframework.com/?packages=FuzzyLogic

[stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[stable-url]:https://lucaferranti.github.io/FuzzyLogic.jl/stable/

Expand All @@ -92,8 +94,15 @@ Contributions are welcome! If you find a bug or want to request a feature, [open
[cov-img]: https://codecov.io/gh/lucaferranti/FuzzyLogic.jl/branch/main/graph/badge.svg
[cov-url]: https://codecov.io/gh/lucaferranti/FuzzyLogic.jl

[contrib-img]: https://img.shields.io/badge/Contributor-Guide-important
[pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/F/FuzzyLogic.svg
[pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/F/FuzzyLogic.html

[contrib-img]: https://img.shields.io/badge/Contributor-Guide-blueviolet
[contrib-url]: https://lucaferranti.github.io/FuzzyLogic.jl/dev/contributing

[style-img]: https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826
[style-url]: https://github.com/SciML/SciMLStyle
[style-url]: https://github.com/SciML/SciMLStyle

[chat-img]: https://badges.gitter.im/badge.svg
[chat-url]: https://gitter.im/FuzzyLogic-jl/dev

1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"

[compat]
DocThemeIndigo = "0.1.3"
ImageCore = "0.9.4"
ImageFiltering = "0.7.3"
Literate = "2.14"
Plots = "1.38"
Expand Down
31 changes: 29 additions & 2 deletions docs/src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@ All contributions should go through git branches. If you are not familiar with g
**1.** Clone the repository

```
git clone
git clone https://github.com/lucaferranti/FuzzyLogic.jl.git
```
and enter it with

```
cd FuzzyLogic.jl
```

!!! warning "Warning"
From now on, these instructions assume you are in the `FuzzyLogic.jl` folder

**2.** [Fork the repository](https://github.com/lucaferranti/FuzzyLogic.jl).

**3.** Add your for as remote with
**3.** Add your fork as remote with

```
git remote add $new_remote_name $your_fork_link
Expand Down Expand Up @@ -84,6 +92,25 @@ git switch -c $new-branch-name
## Coding guideline

* The package follows [SciMLStyle](https://github.com/sciml/SciMLStyle).
* You can run the tests locally from the Julia REPL with

```julia
include("test/runtests.jl")
```

* Each test file is stand-alone, hence you can also run individual files, e.g. `include("test/test_parser.jl")`

* To make finding tests easier, the test folder structure should (roughly) reflect the structure of the `src` folder.

## Working on the documentation

* You can build the documentation locally with

```
julia --project=docs docs/make.jl
```

* Tutorials and applications are written using [Literate.jl](https://github.com/fredrikekre/Literate.jl), hence if working on those, you should edit the source file under the `literate` folder and not directly the markdown.

## Further reading

Expand Down
63 changes: 31 additions & 32 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

|**Info**|**Build status**|**Documentation**|**Contributing**|
|:------:|:--------------:|:---------------:|:--------------:|
|![version](https://img.shields.io/badge/lifecycle-maturing-important)|[![CI Status](https://github.com/lucaferranti/FuzzyLogic.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/lucaferranti/FuzzyLogic.jl/actions/workflows/CI.yml?query=branch%3Amain)|[![Stable docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://lucaferranti.github.io/FuzzyLogic.jl/stable/)|[![contributing guidelines](https://img.shields.io/badge/Contributor-Guide-important)](https://lucaferranti.github.io/FuzzyLogic.jl/dev/contributing)|
|[![version](https://juliahub.com/docs/FuzzyLogic/version.svg)](https://github.com/lucaferranti/FuzzyLogic.jl/releases/latest)|[![CI Status](https://github.com/lucaferranti/FuzzyLogic.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/lucaferranti/FuzzyLogic.jl/actions/workflows/CI.yml?query=branch%3Amain)|[![Stable docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://lucaferranti.github.io/FuzzyLogic.jl/stable/)|[![contributing guidelines](https://img.shields.io/badge/Contributor-Guide-blueviolet)](https://lucaferranti.github.io/FuzzyLogic.jl/dev/contributing)|
|[![Licese: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/lucaferranti/FuzzyLogic.jl/blob/main/LICENSE)|[![Coverage](https://codecov.io/gh/lucaferranti/FuzzyLogic.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/lucaferranti/FuzzyLogic.jl)|[![Dev docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://lucaferranti.github.io/FuzzyLogic.jl/dev/)|[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)|
|[![downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/FuzzyLogic&label=downloads)](https://pkgs.genieframework.com/?packages=FuzzyLogic)|[![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/F/FuzzyLogic.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/F/FuzzyLogic.html)||[![gitter-chat](https://badges.gitter.im/badge.svg)](https://gitter.im/FuzzyLogic-jl/dev)|

A Julia library to perform Fuzzy inference.
A Julia library for fuzzy inference.

## Installation

To install the package, open a Julia session and run

```julia
using Pkg; Pkg.add(url="https://github.com/lucaferranti/FuzzyLogic.jl.git")
using Pkg; Pkg.add("FuzzyLogic")
```

the package can then be loaded with
Expand All @@ -21,46 +22,44 @@ the package can then be loaded with
using FuzzyLogic
```

## Roadmap
## Features

- **Rich!** Mamdani and Sugeno inference systems, both Type-1 and Type-2, several [membership functions](https://lucaferranti.github.io/FuzzyLogic.jl/stable/api/memberships) and [algoritms options](https://lucaferranti.github.io/FuzzyLogic.jl/stable/api/fis) available.
- **Compatible!** Able to read/write your model from/to [IEEE 1855-2016 Fuzzy Markup Language](https://en.wikipedia.org/wiki/Fuzzy_markup_language) and [IEC 61131-7 Fuzzy Control Language](https://ffll.sourceforge.net/fcl.htm) and Matlab Fuzzy toolbox `.fis` files.
- **Rich!** Mamdani and Sugeno Type-1 inference systems, several membership functions and algoritms options available.
- **Expressive!** Clear Domain Specific Language to write your model as human readable Julia code
- **Productive!** Several visualization tools to help debug and tune your model.
- **Portable!** Compile your final model to Julia or C/C++ code.

## Quickstart example

```julia
fis = @mamfis function tipper(service in 0:10, food in 0:10)::{tip in 0:30}
poor = GaussianMF(0.0, 1.5)
good = GaussianMF(5.0, 1.5)
excellent = GaussianMF(10.0, 1.5)

rancid = TrapezoidalMF(-2, 0, 1, 3)
delicious = TrapezoidalMF(7, 9, 10, 12)

cheap = TriangularMF(0, 5, 10)
average = TriangularMF(10, 15, 20)
generous = TriangularMF(20, 25, 30)

service == poor || food == rancid => tip == cheap
service == good => tip == average
service == excellent || food == delicious => tip == generous
fis = @mamfis function tipper(service, food)::tip
service := begin
domain = 0:10
poor = GaussianMF(0.0, 1.5)
good = GaussianMF(5.0, 1.5)
excellent = GaussianMF(10.0, 1.5)
end

food := begin
domain = 0:10
rancid = TrapezoidalMF(-2, 0, 1, 3)
delicious = TrapezoidalMF(7, 9, 10, 12)
end

tip := begin
domain = 0:30
cheap = TriangularMF(0, 5, 10)
average = TriangularMF(10, 15, 20)
generous = TriangularMF(20, 25, 30)
end

service == poor || food == rancid --> tip == cheap
service == good --> tip == average
service == excellent || food == delicious --> tip == generous
end

fis(; service=1, food=2)
fis(service=1, food=2)
```

## Documentation

- [**STABLE**](https://lucaferranti.github.io/FuzzyLogic.jl/stable/): Documentation of the latest release
- [**DEV**](https://lucaferranti.github.io/FuzzyLogic.jl/dev/): Documentation of the version on main

## Contributing

Contributions are welcome! If you find a bug or want to request a feature, [open an issue](https://github.com/lucaferranti/FuzzyLogic.jl/issues). You are also encouraged to send pull requests (PRs). For small changes, it is ok to open a PR directly. For bigger changes, it is advisable to discuss it in an issue first. Before opening a PR, make sure to check the [contributing guidelines](https://lucaferranti.github.io/FuzzyLogic.jl/dev/contributing).

## Copyright

- Copyright (c) 2022 [Luca Ferranti](https://github.com/lucaferranti)

2 comments on commit 436edcb

@lucaferranti
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/76176

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 436edcb67b4683b68798eb020aca3cb1ff040a2f
git push origin v0.1.0

Please sign in to comment.