diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index b004e09b772..d67caddaabc 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -24,7 +24,7 @@ jobs: # Skip if the commit message contains "ci skip" if: "!contains(github.event.head_commit.message, 'ci skip')" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: # Checks-out repository under $GITHUB_WORKSPACE, so job can access it @@ -33,11 +33,11 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: '3.10.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax + python-version: '3.12.3' # Version range or exact version of a Python version to use, using SemVer's version range syntax architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - name: "Install pip" - run: pip3 install --upgrade pip wheel + run: pip3 install --upgrade pip - name: "Install BuildingsPy" run: pip3 install git+https://github.com/lbl-srg/BuildingsPy@v5.2.0 diff --git a/Buildings/Resources/Documentation/userGuide/Makefile b/Buildings/Resources/Documentation/userGuide/Makefile index 31748a5b6b0..fcb3ca7e7cf 100644 --- a/Buildings/Resources/Documentation/userGuide/Makefile +++ b/Buildings/Resources/Documentation/userGuide/Makefile @@ -44,10 +44,10 @@ html: regressiontest: clean @echo "Verify whether all files compile and no uncommitted changes exist" @rm -rf virEnv - python -m venv virEnv - source virEnv/bin/activate - pip install -r requirements.txt --no-deps - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + python3 -m venv virEnv + source virEnv/bin/activate && \ + pip install -r requirements.txt --no-deps && \ + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html && \ rm -rf virEnv git diff --exit-code . diff --git a/Buildings/Resources/Documentation/userGuide/build/html/_sources/bestPractice.rst.txt b/Buildings/Resources/Documentation/userGuide/build/html/_sources/bestPractice.rst.txt index 196ed9a5919..d4d1df6da9d 100644 --- a/Buildings/Resources/Documentation/userGuide/build/html/_sources/bestPractice.rst.txt +++ b/Buildings/Resources/Documentation/userGuide/build/html/_sources/bestPractice.rst.txt @@ -111,8 +111,8 @@ We will now explain how state variables, such as temperature and pressure, can b Consider a model consisting of a mass flow source ``Modelica.Fluid.Sources.MassFlowSource_T``, a fluid volume ``Buildings.Fluid.MixingVolumes.MixingVolume`` and a fixed boundary condition ``Buildings.Fluid.Sources.Boundary_pT``, -connected in series as shown in the figure below. Note that the instance ``bou`` -implements an equation that sets the medium pressure at its port, i.e., the port pressure ``bou.ports.p`` is fixed. +connected in series as shown in the figure below. Note that the instance ``sin`` +implements an equation that sets the medium pressure at its port, i.e., the port pressure ``sin.ports.p`` is fixed. .. figure:: img/MixingVolumeInitialization.* :width: 300px diff --git a/Buildings/Resources/Documentation/userGuide/build/html/_sources/development.rst.txt b/Buildings/Resources/Documentation/userGuide/build/html/_sources/development.rst.txt index 06ab4da9321..5b537f15427 100644 --- a/Buildings/Resources/Documentation/userGuide/build/html/_sources/development.rst.txt +++ b/Buildings/Resources/Documentation/userGuide/build/html/_sources/development.rst.txt @@ -649,6 +649,14 @@ The following rules need to be followed, in addition to the guidelines described $ node app.js -f Buildings/Controls/OBC/ASHRAE/PrimarySystem/{path to package} -o json -m cdl +.. _sec_template: + +HVAC and control templates +-------------------------- + +Developing HVAC and control templates, such as for `Buildings.Temlates`, is an advanced topic +which is explained in http://lbl-srg.github.io/modelica-buildings-templates/. + .. _sec_val: Validation and unit tests diff --git a/Buildings/Resources/Documentation/userGuide/build/html/_sources/gettingStarted.rst.txt b/Buildings/Resources/Documentation/userGuide/build/html/_sources/gettingStarted.rst.txt index 01ddbe3b3b3..8e8e49b9112 100644 --- a/Buildings/Resources/Documentation/userGuide/build/html/_sources/gettingStarted.rst.txt +++ b/Buildings/Resources/Documentation/userGuide/build/html/_sources/gettingStarted.rst.txt @@ -10,6 +10,7 @@ Literature for Users -------------------- The following books are useful for new users to get started: +* Modelica Buildings Library trainings documentation at https://simulationresearch.lbl.gov/modelica/training.html. * The online book with interactive examples of Michael Tiller at https://mbe.modelica.university/. * The books by Michael Tiller [Til2001]_ and Peter Fritzson ([Fri2011]_ and [Fri2004]_). * The tutorials that are listed at https://modelica.org/publications. @@ -27,9 +28,15 @@ as well as tools for workflow automation. It also contains numerous examples that apply these technologies to the design and operation of building and community energy systems. +Training Videos +--------------- + +Some of the Modelica Buildings Library trainings has posted recordings at https://simulationresearch.lbl.gov/modelica/training.html. Spoken tutorials for beginners are available at https://spoken-tutorial.org/tutorial-search/?search_foss=OpenModelica&search_language=English. +Modelon has various online tutorials, including getting started with the Modelica Buildings Library, at +https://help.modelon.com/latest/videos/video_overview/. Running the First Simulations ----------------------------- @@ -72,7 +79,7 @@ Hence, we also recommend reading the paper about the standardization of thermo-f The `Modelica Web Reference `_ gives a concise overview, explanation and further links about the Modelica language. -See :numref:`sec_sty_gui` for conventions and guidelines of the `Buildings` library. +See :numref:`Development` for instructions, conventions and guidelines for contributing to the `Buildings` library. References diff --git a/Buildings/Resources/Documentation/userGuide/build/html/_static/_sphinx_javascript_frameworks_compat.js b/Buildings/Resources/Documentation/userGuide/build/html/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 00000000000..81415803ec2 --- /dev/null +++ b/Buildings/Resources/Documentation/userGuide/build/html/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/Buildings/Resources/Documentation/userGuide/build/html/_static/bootstrap-sphinx.css b/Buildings/Resources/Documentation/userGuide/build/html/_static/bootstrap-sphinx.css index 549e4f3a1e4..dcbbf912396 100644 --- a/Buildings/Resources/Documentation/userGuide/build/html/_static/bootstrap-sphinx.css +++ b/Buildings/Resources/Documentation/userGuide/build/html/_static/bootstrap-sphinx.css @@ -57,6 +57,25 @@ + body { + + padding-top: 60px; + + } + .page-top { + + top: 60px; + + } + + + +.navbar-inner { + padding-left: 12px !important; + padding-right: 12px !important; +} + + table { border: 0; } diff --git a/Buildings/Resources/Documentation/userGuide/build/html/_static/bootstrap-sphinx.js b/Buildings/Resources/Documentation/userGuide/build/html/_static/bootstrap-sphinx.js index 6615b7e4e9c..17e81981d34 100644 --- a/Buildings/Resources/Documentation/userGuide/build/html/_static/bootstrap-sphinx.js +++ b/Buildings/Resources/Documentation/userGuide/build/html/_static/bootstrap-sphinx.js @@ -90,6 +90,36 @@ $(".bs-sidenav > ul > li > a").addClass("nav-header"); + // back to top + setTimeout(function () { + var $sideBar = $(".bs-sidenav"); + var $content = $(".content"); + + // Enlarge content if sidebar is larger. + if ($sideBar.outerHeight(true) > $content.outerHeight(true)) { + $content.css("min-height", $sideBar.outerHeight(true)); + } + + $sideBar + // Add affix. + .affix({ + offset: { + top: function () { + var offsetTop = $sideBar.offset().top; + var sideBarMargin = parseInt($sideBar.css("margin-top"), 10); + var navOuterHeight = $("#navbar").outerHeight(true); + + return (this.top = offsetTop - navOuterHeight); + }, + bottom: function () { + return (this.bottom = $(".footer").outerHeight(true)); + } + } + }) + // Trigger to reset if page content is scrolled to bottom. + .trigger("scroll.bs.affix.data-api"); + }, 0); + // Local TOC. patchToc($("ul.localtoc"), 2); diff --git a/Buildings/Resources/Documentation/userGuide/build/html/_static/custom.css b/Buildings/Resources/Documentation/userGuide/build/html/_static/custom.css index ae8d59a7b7d..1e8df6726a1 100644 --- a/Buildings/Resources/Documentation/userGuide/build/html/_static/custom.css +++ b/Buildings/Resources/Documentation/userGuide/build/html/_static/custom.css @@ -9,6 +9,7 @@ body{ color: #022e4d; border-radius: 4px; box-shadow: 2px -2px 5px 0px rgba(0,0,0,0.4); + padding-top: 100px; } .starter-template { @@ -21,18 +22,55 @@ body{ top: 5px; } .navbar { - height: 82px; - max-height: 82px; + width: 100%; + left: 0; + right: 0; + height: 80px; + max-height: 80px; + box-sizing: border-box; + margin: 0; + padding: 0; /* border: none;*/ -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none;user-select:none; } +.navbar > .container-fluid { + display: flex; + align-items: center; + width: 100%; + box-sizing: border-box; + padding: 0 15px; +} + +.navbar > .container-fluid .navbar-brand, +.navbar-brand { + display: flex; + align-items: center; + padding: 10px 15px; + height: auto; + min-height: 60px; + margin: 0; +} + +.navbar-logo { + max-height: 60px; + height: 60px; + width: auto; + margin-right: 20px; + display: inline-block; + vertical-align: middle; +} + + .navbar .navbar-nav{ background: #f8f8f8; margin-bottom: 0px; - margin-left: -20px; +/* margin-left: -15px; */ +/* margin-right: -15px; */ +/* padding-left: 20px; */ + width: 100%; } @@ -71,8 +109,61 @@ body{ .navbar-collapse{ border-style: none; position: absolute; - top: 50px; + top: 80px; z-index: 100; + overflow: visible; + width: calc(100% - 30px); + left: 15px; +} + +/* Dropdown menu styling */ +.navbar .navbar-nav > .dropdown { + position: relative; +} + +.dropdown-toggle { + position: relative; +} + +.dropdown-menu { + display: none !important; + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + border: 1px solid #ccc; + border-radius: 4px; + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} + +.dropdown-menu.show { + display: block !important; +} + +.open > .dropdown-menu, +.navbar .navbar-nav > .open > .dropdown-menu { + display: block !important; +} + +.dropdown-toggle::after { + display: inline-block; + width: 0; + height: 0; + margin-left: 0.385em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; } /* ---------------------------------- */ @@ -81,12 +172,6 @@ img{ max-width: 100%; } -.navbar > .container-fluid .navbar-brand > img{ - position: absolute; - left: 10px; - height: 30px; -} - .footer{ /* background-color: white; border-color: white; */ @@ -199,5 +284,98 @@ table.citation{ .page-content{ margin: 10px; } + +/* Adjust main content for fixed sidebar */ +.body.col-md-9 { + margin-left: 26%; + margin-top: 10px; +} + +/* Position sidebar column to not interfere */ +.col-md-3 { + width: 0; + padding: 0; + margin: 0; +} + +/* Sidebar list styling fix */ +.bs-sidenav { + position: fixed; + top: 100px; + left: 15px; + width: 25%; + max-height: calc(100vh - 100px); + overflow-y: auto; + overflow-x: hidden; +} + +.bs-sidenav ul { + list-style: none; + padding-left: 0; + margin-left: 0; +} + +.bs-sidenav li { + list-style: none; + padding-left: 0; + margin-left: 0; +} + +.bs-sidenav > ul > li { + list-style: none; + padding-left: 0; + margin-left: 0; + line-height: 1.5; +} + +.bs-sidenav > ul > li > a { + display: block; + padding-left: 0; + margin-left: 0; +} + +.bs-sidenav ul ul { + list-style: none; + padding-left: 20px; + margin-left: 0; +} + +.bs-sidenav ul ul li { + list-style: none; + padding-left: 0; + margin-left: 0; +} + +/* Fix for navigation list items (Previous/Next Chapter) outside ul */ +.bs-sidenav > li { + list-style: none; + padding-left: 0; + margin-left: 0; + display: block; +} + +.bs-sidenav > li > a { + display: block; + color: #716b7a; + padding: 5px 20px; + text-decoration: none; +} + +.bs-sidenav > li > a:hover, +.bs-sidenav > li > a:focus { + text-decoration: none; + background-color: #e5e3e9; + border-right: 1px solid #dbd8e0; +} /* End stylesheet from main web site -------------------- */ /* ------------------------------------------------------ */ + + +/* Fix mobile dropdown expansion for globaltoc's nested