Skip to content

Commit

Permalink
(#68) Enhance doc structure
Browse files Browse the repository at this point in the history
  • Loading branch information
SevgiAkten committed Nov 6, 2024
1 parent e019d8a commit 2e240b3
Show file tree
Hide file tree
Showing 21 changed files with 735 additions and 906 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,24 @@ Inspired by traditional genetic algorithms and cellular automata principles with
For more information, please visit the project repository.

## Citation
Please cite our work using the citation info

Karakaya, Sevgi Akten, and Mehmet Hakan Satman. "An Improved Cellular Genetic Algorithm with Machine-Coded Operators for Real-Valued Optimisation Problems." Journal of Engineering Research and Applied Science 13.1 (2024): 2500-2514.
If you use `pycellga` in your research, please cite it as follows:

**APA Format**

Karakaya, S. A., & Satman, M. H. (2024). An Improved Cellular Genetic Algorithm with Machine-Coded Operators for Real-Valued Optimisation Problems. *Journal of Engineering Research and Applied Science, 13*(1), 2500-2514.

**BibTeX Format**

For LaTeX users, please use the following BibTeX entry to cite `pycellga`:

```bibtex
@article{karakaya2024improved,
title={An Improved Cellular Genetic Algorithm with Machine-Coded Operators for Real-Valued Optimisation Problems},
author={Karakaya, Sevgi Akten and Satman, Mehmet Hakan},
journal={Journal of Engineering Research and Applied Science},
volume={13},
number={1},
pages={2500--2514},
year={2024}
}
45 changes: 45 additions & 0 deletions docs/citing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Citing
======

If you use `pycellga` in your research, please cite it as follows:

**APA Format**

Karakaya, S. A., & Satman, M. H. (2024). An Improved Cellular Genetic Algorithm with Machine-Coded Operators for Real-Valued Optimisation Problems. *Journal of Engineering Research and Applied Science, 13*(1), 2500-2514.
**BibTeX Format**

For LaTeX users, please use the following BibTeX entry to cite `pycellga`:

.. code-block:: bibtex
@article{karakaya2024improved,
title={An Improved Cellular Genetic Algorithm with Machine-Coded Operators for Real-Valued Optimisation Problems},
author={Karakaya, Sevgi Akten and Satman, Mehmet Hakan},
journal={Journal of Engineering Research and Applied Science},
volume={13},
number={1},
pages={2500--2514},
year={2024}
}
**Citation Examples in Various Formats**

1. **MLA Format**

Karakaya, Sevgi Akten, and Mehmet Hakan Satman. "An Improved Cellular Genetic Algorithm with Machine-Coded Operators for Real-Valued Optimisation Problems." *Journal of Engineering Research and Applied Science* 13.1 (2024): 2500-2514.

2. **Chicago Style**

Karakaya, Sevgi Akten, and Mehmet Hakan Satman. "An Improved Cellular Genetic Algorithm with Machine-Coded Operators for Real-Valued Optimisation Problems." *Journal of Engineering Research and Applied Science* 13, no. 1 (2024): 2500-2514.

3. **Harvard Format**

Karakaya, S.A. and Satman, M.H., 2024. An Improved Cellular Genetic Algorithm with Machine-Coded Operators for Real-Valued Optimisation Problems. *Journal of Engineering Research and Applied Science*, 13(1), pp.2500-2514.


**Why Cite `pycellga`?**

Citing `pycellga` in your research helps other researchers identify and reference the software, supports continued development, and acknowledges the work that went into creating the package. Your citations also contribute to the visibility and impact of the `pycellga` project in the scientific community.

---
10 changes: 9 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["sphinx.ext.todo", "sphinx.ext.viewcode", "sphinx.ext.autodoc", "sphinx.ext.napoleon"]
extensions = ["sphinx.ext.todo", "sphinx.ext.viewcode", "sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.autosectionlabel"]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

add_module_names = False


# -- Options for HTML output -------------------------------------------------
Expand All @@ -32,6 +33,13 @@
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']

html_theme_options = {
'collapse_navigation': False,
'sticky_navigation': True,
'navigation_depth': 4,
'titles_only': False
}

autodoc_default_options = {
'members': True,
'undoc-members': True,
Expand Down
116 changes: 116 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
Contributing
============

We’re thrilled that you’re considering contributing to `pycellga`! Community contributions drive innovation and help us improve the software. Whether it’s reporting bugs, suggesting enhancements, or submitting pull requests, your support is invaluable.


Ways to Contribute
------------------

Here are some ways you can make meaningful contributions to `pycellga`:

- **Report Bugs**: If you encounter an issue, create a detailed bug report in our `issue tracker <https://github.com/SevgiAkten/pycellga/issues>`_.
- **Suggest Features**: Have ideas for new features or enhancements? Submit a feature request to help guide our roadmap.
- **Fix Bugs or Implement Features**: Browse open issues, pick one, and submit a pull request with your solution.
- **Improve Documentation**: Documentation is key to helping users understand the software. Fix typos, clarify steps, or add examples to make it even better.

Development Setup
-----------------

To begin contributing code, set up your development environment as follows:

**Step 1: Fork the Repository**

Create your own copy of `pycellga` by forking the repository:

1. Visit the `repository <https://github.com/SevgiAkten/pycellga>`_.
2. Click the "Fork" button in the upper-right corner.
3. Select your GitHub account to create the fork.

For a step-by-step guide on forking, visit GitHub’s `Fork a Repo <https://docs.github.com/en/get-started/quickstart/fork-a-repo>`_ page.

**Step 2: Clone Your Fork**

Clone your forked repository to your local machine:

.. code-block:: bash
git clone https://github.com/username/pycellga.git
cd pycellga
**Step 3: Install Dependencies**

Install the required dependencies:

.. code-block:: bash
pip install -r requirements.txt
**Step 4: Create a New Branch**

Create a branch for your changes:

.. code-block:: bash
git checkout -b feature-or-bugfix-name
Use descriptive names for branches, such as `add-new-feature` or `fix-bug`.

Pull Request Guidelines
-----------------------

When you’re ready to submit your changes, follow these guidelines to ensure a smooth review process:

1. **Write Clear Commit Messages**: Each commit message should be clear and descriptive.
2. **Run Tests**: Verify that all tests pass. Tests can be run from the `tests` folder or main directory:

- From the `tests` folder:

.. code-block:: bash
cd tests
pytest * # or
pytest -v
- From the main project directory:

.. code-block:: bash
pytest -v
3. **Submit a Pull Request**: Push your branch to GitHub, navigate to the main repository, and open a pull request.

4. **Respond to Reviews**: Be responsive to feedback during the review process, and make any requested changes to ensure your contribution is merged smoothly.

Coding Standards
----------------

To maintain a consistent and readable codebase, please adhere to the following guidelines:

- **PEP 8**: Follow PEP 8 coding style standards for Python code.
- **Type Annotations**: Include type hints for function arguments and return values.
- **Docstrings**: Provide clear docstrings for functions and classes. We recommend using the Google docstring style.

Running Tests
-------------

Before submitting a pull request, ensure that all tests pass. Tests can be run in the `tests` folder or from the main directory as follows:

1. **From the `tests` folder**:

.. code-block:: bash
cd tests
pytest * # or
pytest -v
2. **From the main project directory**:

.. code-block:: bash
pytest -v
If you add new functionality, consider adding tests to cover your changes.


Thank you for considering a contribution to `pycellga`. We’re excited to see what you’ll bring to the project!
15 changes: 9 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
PYCELLGA Documentation
PYCELLGA Documentation
====================================

`pycellga`: A Python Package for Improved Cellular Genetic Algorithms
Expand All @@ -14,11 +14,14 @@ utilizing a spatially structured population organized in a grid-like topology.
This structure allows each individual to interact only with its neighboring individuals,
promoting diversity and maintaining a balance between exploration and exploitation during the optimization process.
`pycellga` has machine coded operators with byte implementations. Beside it has Alpha-male CGA,
Machine Coded Compact CGA and Improved CGA with Machine Coded Operaors for real-valued optimization problems.
Machine Coded Compact CGA and Improved CGA with Machine Coded Operators for real-valued optimization problems.

.. toctree::
:maxdepth: 2
:caption: Contents:

modules
:maxdepth: 1
:caption: Table of Contents:

installation
pycellga
usage_examples
contributing
citing
101 changes: 101 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
Installation
============

This section provides detailed instructions for installing `pycellga` and its dependencies.

Requirements
------------

Before installing `pycellga`, make sure you have the following installed:

- Python 3.7 or higher
- `pip` package manager

Installing from PyPI
---------------------

The easiest way to install `pycellga` is via PyPI. You can use `pip` to install it directly from the Python Package Index:

.. code-block:: bash
pip install pycellga
Installing from Source
----------------------

To install `pycellga` from source, follow these steps:

1. Clone the repository from GitHub:

.. code-block:: bash
git clone https://github.com/SevgiAkten/pycellga.git
2. Navigate to the cloned repository directory:

.. code-block:: bash
cd pycellga
3. Install the package using `pip`:

.. code-block:: bash
pip install .
Optional Dependencies
---------------------

`pycellga` has optional dependencies for certain features. To use these features, you may need to install additional packages:

- **Jupyter Notebooks**: If you plan to use Jupyter Notebooks for tutorials or examples, install `jupyter`:

.. code-block:: bash
pip install jupyter
- **Matplotlib**: For visualizing optimization results, install `matplotlib`:

.. code-block:: bash
pip install matplotlib
Verifying the Installation
--------------------------

To verify that `pycellga` is installed correctly, you can import it in Python:

.. code-block:: python
import pycellga
print(pycellga.__version__)
If no errors occur, the installation is successful.

Troubleshooting
---------------

If you encounter any issues during installation, try the following steps:

1. Ensure you are using Python 3.7 or higher by running:

.. code-block:: bash
python --version
2. Make sure `pip` is up-to-date:

.. code-block:: bash
pip install --upgrade pip
3. If issues persist, refer to the GitHub repository for troubleshooting tips or to submit an issue.

Uninstallation
--------------

To uninstall `pycellga`, you can use the following command:

.. code-block:: bash
pip uninstall pycellga
7 changes: 0 additions & 7 deletions docs/modules.rst

This file was deleted.

Loading

0 comments on commit 2e240b3

Please sign in to comment.