From ccb66b17630efcebbe719167dcd964e81ee00088 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Mon, 13 May 2024 13:16:04 -0600 Subject: [PATCH 1/6] Add URL checking to MD and RST files --- .github/workflows/test_branches.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 5063571c65f..7e5e5aff3ad 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -47,7 +47,17 @@ jobs: uses: crate-ci/typos@master with: config: ./.github/workflows/typos.toml - + - name: URL Checker + uses: urlstechie/urlchecker-action@0.0.34 + with: + # A comma-separated list of file types to cover in the URL checks + file_types: .md,.rst + # Choose whether to include file with no URLs in the prints. + print_all: false + # More verbose summary at the end of a run + verbose: true + # How many times to retry a failed request (defaults to 1) + retry_count: 3 build: name: ${{ matrix.TARGET }}/${{ matrix.python }}${{ matrix.other }} From ecbe3193c47ed2a872b59b1ea75bce4308c03e58 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Mon, 13 May 2024 13:24:16 -0600 Subject: [PATCH 2/6] Did this section break everything? --- .github/workflows/test_branches.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 7e5e5aff3ad..5063571c65f 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -47,17 +47,7 @@ jobs: uses: crate-ci/typos@master with: config: ./.github/workflows/typos.toml - - name: URL Checker - uses: urlstechie/urlchecker-action@0.0.34 - with: - # A comma-separated list of file types to cover in the URL checks - file_types: .md,.rst - # Choose whether to include file with no URLs in the prints. - print_all: false - # More verbose summary at the end of a run - verbose: true - # How many times to retry a failed request (defaults to 1) - retry_count: 3 + build: name: ${{ matrix.TARGET }}/${{ matrix.python }}${{ matrix.other }} From 9a68aab60ad71993b6a5ab89db07e869e4a95cdd Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Mon, 13 May 2024 15:25:25 -0600 Subject: [PATCH 3/6] Fix broken links; ignore pyomo-jenkins --- .github/workflows/test_branches.yml | 14 +++++++++++++- .../pynumero/pynumero.sparse.block_vector.rst | 2 +- doc/OnlineDocs/contribution_guide.rst | 2 +- doc/OnlineDocs/modeling_extensions/dae.rst | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 5063571c65f..20b5b869304 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -47,7 +47,19 @@ jobs: uses: crate-ci/typos@master with: config: ./.github/workflows/typos.toml - + - name: URL Checker + uses: urlstechie/urlchecker-action@0.0.34 + with: + # A comma-separated list of file types to cover in the URL checks + file_types: .md,.rst + # Choose whether to include file with no URLs in the prints. + print_all: false + # More verbose summary at the end of a run + verbose: true + # How many times to retry a failed request (defaults to 1) + retry_count: 3 + # Exclude Jenkins because it's behind a firewall + exclude_urls: https://pyomo-jenkins.sandia.gov build: name: ${{ matrix.TARGET }}/${{ matrix.python }}${{ matrix.other }} diff --git a/doc/OnlineDocs/contributed_packages/pynumero/pynumero.sparse.block_vector.rst b/doc/OnlineDocs/contributed_packages/pynumero/pynumero.sparse.block_vector.rst index 6e1dc1f20e5..c17d3d1df86 100644 --- a/doc/OnlineDocs/contributed_packages/pynumero/pynumero.sparse.block_vector.rst +++ b/doc/OnlineDocs/contributed_packages/pynumero/pynumero.sparse.block_vector.rst @@ -77,7 +77,7 @@ NumPy compatible functions: * `numpy.arccos() `_ * `numpy.sinh() `_ * `numpy.cosh() `_ - * `numpy.abs() `_ + * `numpy.abs() `_ * `numpy.tanh() `_ * `numpy.arccosh() `_ * `numpy.arcsinh() `_ diff --git a/doc/OnlineDocs/contribution_guide.rst b/doc/OnlineDocs/contribution_guide.rst index b98dcc3d014..832bb70a78a 100644 --- a/doc/OnlineDocs/contribution_guide.rst +++ b/doc/OnlineDocs/contribution_guide.rst @@ -412,7 +412,7 @@ Including External Packages +++++++++++++++++++++++++++ The `pyomocontrib_simplemodel -`_ package +`_ package is derived from Pyomo, and it defines the class SimpleModel that illustrates how Pyomo can be used in a simple, less object-oriented manner. Specifically, this class mimics the modeling style supported diff --git a/doc/OnlineDocs/modeling_extensions/dae.rst b/doc/OnlineDocs/modeling_extensions/dae.rst index 703e83f4f14..ff0fb75e610 100644 --- a/doc/OnlineDocs/modeling_extensions/dae.rst +++ b/doc/OnlineDocs/modeling_extensions/dae.rst @@ -738,7 +738,7 @@ supported by CasADi. A list of available integrators for each package is given below. Please refer to the `SciPy `_ and `CasADi -`_ documentation directly for the most up-to-date information about +`_ documentation directly for the most up-to-date information about these packages and for more information about the various integrators and options. From 17646cc7bcca03ab4508afd9d698ad9efb6dcd70 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Mon, 13 May 2024 15:30:59 -0600 Subject: [PATCH 4/6] We don't actually support 'external' contrib packages --- .github/workflows/test_branches.yml | 2 +- doc/OnlineDocs/contribution_guide.rst | 44 ++------------------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 20b5b869304..9fd15ebcb19 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -59,7 +59,7 @@ jobs: # How many times to retry a failed request (defaults to 1) retry_count: 3 # Exclude Jenkins because it's behind a firewall - exclude_urls: https://pyomo-jenkins.sandia.gov + exclude_urls: https://pyomo-jenkins.sandia.gov/ build: name: ${{ matrix.TARGET }}/${{ matrix.python }}${{ matrix.other }} diff --git a/doc/OnlineDocs/contribution_guide.rst b/doc/OnlineDocs/contribution_guide.rst index 832bb70a78a..9ad5bdfee0e 100644 --- a/doc/OnlineDocs/contribution_guide.rst +++ b/doc/OnlineDocs/contribution_guide.rst @@ -404,50 +404,10 @@ Contrib packages will be tested along with Pyomo. If test failures arise, then these packages will be disabled and an issue will be created to resolve these test failures. -The following two examples illustrate the two ways -that ``pyomo.contrib`` can be used to integrate third-party -contributions. - -Including External Packages -+++++++++++++++++++++++++++ - -The `pyomocontrib_simplemodel -`_ package -is derived from Pyomo, and it defines the class SimpleModel that -illustrates how Pyomo can be used in a simple, less object-oriented -manner. Specifically, this class mimics the modeling style supported -by `PuLP `_. - -While ``pyomocontrib_simplemodel`` can be installed and used separate -from Pyomo, this package is included in ``pyomo/contrib/simplemodel``. -This allows this package to be referenced as if were defined as a -subpackage of ``pyomo.contrib``. For example:: - - from pyomo.contrib.simplemodel import * - from math import pi - - m = SimpleModel() - - r = m.var('r', bounds=(0,None)) - h = m.var('h', bounds=(0,None)) - - m += 2*pi*r*(r + h) - m += pi*h*r**2 == 355 - - status = m.solve("ipopt") - -This example illustrates that a package can be distributed separate -from Pyomo while appearing to be included in the ``pyomo.contrib`` -subpackage. Pyomo requires a separate directory be defined under -``pyomo/contrib`` for each such package, and the Pyomo developer -team will approve the inclusion of third-party packages in this -manner. - - Contrib Packages within Pyomo +++++++++++++++++++++++++++++ -Third-party contributions can also be included directly within the +Third-party contributions can be included directly within the ``pyomo.contrib`` package. The ``pyomo/contrib/example`` package provides an example of how this can be done, including a directory for plugins and package tests. For example, this package can be @@ -465,7 +425,7 @@ import this package, but if an import failure occurs, Pyomo will silently ignore it. Otherwise, this pyomo package will be treated like any other. Specifically: -* Plugin classes defined in this package are loaded when `pyomo.environ` is loaded. +* Plugin classes defined in this package are loaded when ``pyomo.environ`` is loaded. * Tests in this package are run with other Pyomo tests. From 495c012943a17a272737454400a5ced9260e866a Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Mon, 13 May 2024 15:45:34 -0600 Subject: [PATCH 5/6] Add to PR file --- .github/workflows/test_pr_and_main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index a45fdd54f03..d0fe40c05bf 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -57,6 +57,19 @@ jobs: uses: crate-ci/typos@master with: config: ./.github/workflows/typos.toml + - name: URL Checker + uses: urlstechie/urlchecker-action@0.0.34 + with: + # A comma-separated list of file types to cover in the URL checks + file_types: .md,.rst + # Choose whether to include file with no URLs in the prints. + print_all: false + # More verbose summary at the end of a run + verbose: true + # How many times to retry a failed request (defaults to 1) + retry_count: 3 + # Exclude Jenkins because it's behind a firewall + exclude_urls: https://pyomo-jenkins.sandia.gov/ build: From 293807c1a0953c8d5ea15069fc684ba11cfd70e5 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Mon, 13 May 2024 15:46:16 -0600 Subject: [PATCH 6/6] Apparently removed one line in branches file --- .github/workflows/test_branches.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 9fd15ebcb19..11a3fde709e 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -61,6 +61,7 @@ jobs: # Exclude Jenkins because it's behind a firewall exclude_urls: https://pyomo-jenkins.sandia.gov/ + build: name: ${{ matrix.TARGET }}/${{ matrix.python }}${{ matrix.other }} runs-on: ${{ matrix.os }}