diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fbf9d73..6cd15d9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,11 +9,8 @@ on: branches: [main] jobs: - black: - uses: mdolab/.github/.github/workflows/black.yaml@main - - flake8: - uses: mdolab/.github/.github/workflows/flake8.yaml@main + format-and-lint: + uses: mdolab/.github/.github/workflows/format-and-lint.yaml@main test: runs-on: ubuntu-latest @@ -25,7 +22,7 @@ jobs: - python-version: 3.11 numpy-version: "~=1.21.0" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -43,6 +40,6 @@ jobs: # --- publish to PyPI pypi: - needs: [test, flake8, black] + needs: [test, format-and-lint] uses: mdolab/.github/.github/workflows/pypi.yaml@main secrets: inherit diff --git a/.gitignore b/.gitignore index 3ea9deb..7857b93 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ examples/* _build* *.egg-info *.vscode +.pre-commit-config.yaml +ruff.toml diff --git a/LICENSE.txt b/LICENSE.txt index dc33386..2dff303 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -8,4 +8,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License. diff --git a/README.md b/README.md index 0a06ade..853c63d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This library is a thin wrapper that uses the TikZ library and LaTeX to build the Please see the [documentation](https://mdolab-pyxdsm.readthedocs-hosted.com) for installation details and API documentation. -To locally build the documentation, enter the `doc` folder and enter `make html` in the terminal. +To locally build the documentation, enter the `doc` folder and enter `make html` in the terminal. You can then view the built documentation in the `_build` folder. ### XDSM diagram @@ -33,4 +33,3 @@ Here is the bibtex entry for that paper: doi = {10.1007/s00158-012-0763-y}, author = {Andrew B. Lambe and Joaquim R. R. A. Martins} } - diff --git a/doc/examples.rst b/doc/examples.rst index ed39662..a037520 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -2,8 +2,8 @@ Examples ======== -Here is a simple example. -There are some other more advanced things you can do as well. +Here is a simple example. +There are some other more advanced things you can do as well. Check out the `examples folder `_ for more complex scripts. .. literalinclude:: ../examples/mdf.py @@ -18,7 +18,7 @@ This will output ``mdf.tex``, a standalone tex document that (by default) is als More complicated example ------------------------ -Here is an example that uses a whole bunch of the more advanced features in ``pyXDSM``. +Here is an example that uses a whole bunch of the more advanced features in ``pyXDSM``. .. image:: images/kitchen_sink.png :scale: 30 @@ -34,4 +34,4 @@ Block matrix equation An example script is available `here `_. .. image:: images/matrix_eqn.png - :scale: 15 \ No newline at end of file + :scale: 15 diff --git a/doc/index.rst b/doc/index.rst index f931a69..5bf1a1f 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -17,7 +17,7 @@ Introduction What is XDSM? ------------- -The eXtended Design Structure Matrix (XDSM) is a graphical language for describing the movement of data and the execution sequence for a multidisciplinary optimization problem. +The eXtended Design Structure Matrix (XDSM) is a graphical language for describing the movement of data and the execution sequence for a multidisciplinary optimization problem. You can read the `paper by Lambe and Martins `_ for all the details. How to use it @@ -64,4 +64,3 @@ The following is required to be in the preamble of the document: \usepackage{tikz} \usetikzlibrary{arrows,chains,positioning,scopes,shapes.geometric,shapes.misc,shadows} - diff --git a/pyxdsm/matrix_eqn.py b/pyxdsm/matrix_eqn.py index f132704..ab6957c 100644 --- a/pyxdsm/matrix_eqn.py +++ b/pyxdsm/matrix_eqn.py @@ -403,11 +403,11 @@ def connect(self, src, target, text="", color=None, highlight=1): self._connections[src, target] = CellData(text=text, color=color, highlight=highlight) def text(self, src, target, text): - "don't connect the src and target, but put some text where a connection would be" + """Don't connect the src and target, but put some text where a connection would be""" self._text[src, target] = CellData(text=text, color=None, highlight=-1) def _process_vars(self): - """map all the data onto i,j grid""" + """Map all the data onto i,j grid""" if self._setup: return