Skip to content

Commit

Permalink
fix: docs and env
Browse files Browse the repository at this point in the history
  • Loading branch information
Kleyt0n committed Jun 18, 2024
1 parent 27bcb90 commit 779f146
Show file tree
Hide file tree
Showing 18 changed files with 560 additions and 117 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ sphinx-togglebutton
pydata_sphinx_theme
sphinx_design==0.5
ipython==8.25.0
optymus==0.2.0
optymus==0.1.3
16 changes: 14 additions & 2 deletions docs/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This section contains examples of how to use the library.
- `How to create a dashboard for optimizations <notebooks/3.optymus_dashboard.ipynb>`_
- `Methods comparison <notebooks/4.methods_comparison.ipynb>`_
- `Visualization with PCA <notebooks/5.visualization_with_pca.ipynb>`_
- `Constraint optimization <notebooks/6.constraint_optmization.ipynb>`_
- `Constraint optimization <notebooks/6.constraint_optimization.ipynb>`_

Some applications are:

Expand All @@ -19,4 +19,16 @@ Some applications are:


.. toctree::
:maxdepth: 2
:maxdepth: 3
:caption: Examples

notebooks/1.setup_functions
notebooks/2.optimize_a_function
notebooks/3.optymus_dashboard
notebooks/4.methods_comparison
notebooks/5.visualization_with_pca
notebooks/6.constraint_optimization
notebooks/optimization_in_deep_learning
notebooks/optimization_in_economics
notebooks/optimization_in_mechanical_engineering
notebooks/optimization_in_finance
2 changes: 1 addition & 1 deletion docs/source/examples/notebooks/1.setup_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setup objective function with `optymus.benchmark`"
"## Setup objective function (benchmark or custom)"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions docs/source/examples/notebooks/2.optimize_a_function.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/source/examples/notebooks/3.optymus_dashboard.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create a results dashboard with `optymus.optimizer`"
"## Create a results dashboard"
]
},
{
Expand Down
14 changes: 14 additions & 0 deletions docs/source/examples/notebooks/optimization_in_deep_learning.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Optimization in Deep Learning"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -24,6 +31,13 @@
"from optymus import Optimizer"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Simple neural network"
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down
9 changes: 1 addition & 8 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,10 @@ To begin using `optymus`, follow these steps:
opt.print_report()
Explore the Documentation
-------------------------
Visit the `official documentation <https://optymus.readthedocs.io/en/latest/?badge=latest>`_ to understand the available optimization methods and how to use them effectively.

Refer to the documentation for detailed information on each method and its application.

Contributions
-------------

Contributions to Optymus are highly appreciated. If you have additional optimization methods, improvements, or bug fixes, please submit a pull request following the [contribution guidelines](CONTRIBUTING.md).
Contributions to Optymus are highly appreciated. If you have additional optimization methods, improvements, or bug fixes, please submit a pull request following the CONTRIBUTING.md on GitHub.

How to cite
----
Expand Down
4 changes: 2 additions & 2 deletions docs/source/reference/optimizer.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Optimizer
=======
=========

`optymus.optim` provides a class to optimize a function using a selected optimization algorithm.
`optymus` provides a class to optimize a function using a selected optimization algorithm.

.. autosummary::
:toctree: .generated/
Expand Down
2 changes: 1 addition & 1 deletion notebooks/1.setup_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setup objective function with `optymus.benchmark`"
"## Setup objective function (benchmark or custom)"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions notebooks/2.optimize_a_function.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion notebooks/3.optymus_dashboard.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create a results dashboard with `optymus.optimizer`"
"## Create a results dashboard"
]
},
{
Expand Down
14 changes: 14 additions & 0 deletions notebooks/optimization_in_deep_learning.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Optimization in Deep Learning"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -24,6 +31,13 @@
"from optymus import Optimizer"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Simple neural network"
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down
28 changes: 17 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"dash==2.17.1",
"dash_bootstrap_components==1.6.0",
"dash_bootstrap_templates==1.1.2",
"nbformat>=4.2.0",
"jax>=0.4.28",
"jaxlib>=0.4.28",
"tqdm>=4.66.4",
"pandas==2.0.3",
"numpy==1.26.4",
"matplotlib>=3.9.0",
"seaborn>=0.13.2",
"plotly==5.22.0",
"scikit-learn>=1.5.0",
"numpy==1.26.4"
]


Expand Down Expand Up @@ -66,35 +68,39 @@ exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
extend = "ruff_default.toml"
exclude = ["docs/**", "tests/**", "tutorials/**"]

[tool.hatch.envs.docs]
[tool.hatch.envs.sphinx]
dependencies = [
"pydata-sphinx-theme==0.15.2",
"sphinx_design==0.5.0",
"sphinx_togglebutton==0.3.2",
"sphinxcontrib.youtube==1.4.1",
"jax>=0.4.28",
"jaxlib>=0.4.28",
"plotly==5.22.0",
"ipython"
"sphinx_copybutton==0.5.2",
"myst_parser==3.0.1",
"nbsphinx==0.9.4",
"ipython==8.25.0"
]

[tool.hatch.envs.docs.scripts]
[tool.hatch.envs.sphinx.scripts]
foo = ["which sphinx-build"]
build = ["bash docs/source/build.sh"]


[tool.hatch.envs.testing]
dependencies = [
"dash==2.17.1",
"dash_bootstrap_components==1.6.0",
"dash_bootstrap_templates==1.1.2",
"nbformat>=4.2.0",
"jax>=0.4.28",
"jaxlib>=0.4.28",
"tqdm>=4.66.4",
"pandas>=2.2.2",
"pandas==2.0.3",
"numpy==1.26.4",
"matplotlib>=3.9.0",
"plotly==5.22.0",
"seaborn>=0.13.2",
"scikit-learn>=1.5.0",
]
]

paths = ["./src"]

[tool.hatch.envs.testing.scripts]
Expand Down
Loading

0 comments on commit 779f146

Please sign in to comment.