Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion calabru/__init__.py

This file was deleted.

7 changes: 4 additions & 3 deletions docs/requirement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ pytest>=6.1.1
datetime
scipy
pydata-sphinx-theme
Sphinx>=4.0
Sphinx>=5.0
nbsphinx
sphinx-autodoc-typehints
pandoc
markupsafe==2.0.1
pygments >= 2.7
PyCBA
ospgrillage
pycba
ospgrillage
ipython
34 changes: 34 additions & 0 deletions docs/source/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:
:inherited-members:
:special-members: __call__, __add__, __mul__

{% block methods %}
{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
:nosignatures:
{% for item in methods %}
{%- if not item.startswith('_') %}
~{{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
66 changes: 66 additions & 0 deletions docs/source/_templates/custom-module-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}
.. rubric:: Module attributes

.. autosummary::
:toctree:
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree:
:nosignatures:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree:
:template: custom-class-template.rst
:nosignatures:
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:toctree:
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block modules %}
{% if modules %}
.. autosummary::
:toctree:
:template: custom-module-template.rst
:recursive:
{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
10 changes: 9 additions & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
API Reference
=============

Package Modules
---------------

.. autosummary::
:toctree: gen
:template: custom-module-template.rst
:recursive:

calabru.ModelUpdating
calabru.calibrator
calabru.utils


17 changes: 12 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
import os
import sys

sys.path.insert(0, os.path.abspath("../../"))

sys.path.insert(0, os.path.abspath("../../src/."))
sys.path.insert(0, os.path.abspath("../../src/calabru/"))
from calabru import __version__ as ver
#

# -- Project information -----------------------------------------------------

Expand All @@ -23,7 +25,12 @@
author = "Colin Caprani, Jun Wei Ngan"

# The full version, including alpha/beta/rc tags
release = "0.1"
# The short Major.Minor.Build version
_v = ver.split(".")
_build = "".join([c for c in _v[2] if c.isdigit()])
version = _v[0] + "." + _v[1] + "." + _build
release = ver



# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -81,7 +88,7 @@
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/ccaprani/pycba",
"url": "https://github.com/MonashSmartStructures/calabru",
"icon": "fab fa-github-square",
},
{
Expand All @@ -101,7 +108,7 @@

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = "./images/logo.png"
html_logo = "./images/logo.png"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
Expand Down
Empty file added docs/source/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/osp_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 17 additions & 11 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
Calabru
=======
`calabru` [1]_ is a calibration framework for model/analysis/data systems in the Python
environment.
Welcome to calabru's documentation!
===================================
`calabru` [1]_ is a calibration framework in the Python environment.`calabru` is provides fast calibration of general model/functions/systems in Python environment.

The calibration framework includes several state-of-the-art model updating methods such as:

`calabru` uses several state-of-the-art model updating methods such as:

- Sensitivity-based analysis
- Bayesian-based approach (in progress)
- Bayesian-based approach

.. [1] Fun fact, "Calabru" means Calibration in the Irish language.


Documentation
=============

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

installation
api



notebooks/intro
notebooks/example
Related Packages
================
- `pycba <https://github.com/ccaprani/pycba>`_ is an analysis package for continuous beam analysis.
- `sectionproperties <https://github.com/robbievanleeuwen/section-properties>`_ is a package for the analysis of cross-sectional geometric properties and stress distributions.
- `ospgrillage <https://github.com/ccaprani/ospgrillage>`_ is a bridge deck grillage analysis package which is a pre-processor for `OpenSeesPy <https://github.com/zhuminjie/OpenSeesPy>`_, a python wrapper for the general finite element analysis framework `OpenSees <https://github.com/OpenSees/OpenSees>`_.

Indices and tables
==================
Expand Down
4 changes: 1 addition & 3 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Required Dependencies
---------------------
- Python 3.8 or later
- numpy
- scipy
- matplotlib

Instructions
------------
Expand All @@ -24,7 +22,7 @@ For contributions, first fork the repo and clone from your fork. `Here <https://

Tests
-----
`PyCBA` comes with ``pytest`` functions to verify the correct functioning of the package.
`calabru` comes with ``pytest`` functions to verify the correct functioning of the package.
Users can test this using: ::

python -m pytest
Expand Down
Loading