Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
klmcadams committed Aug 26, 2024
1 parent f974b9b commit 66fcea5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
15 changes: 13 additions & 2 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,21 @@ This way, it's not possible for you to push code that fails the style checks::

$ pre-commit install
$ git commit -am "added my cool feature"
check pre-commit.ci config...............................................Passed
black....................................................................Passed
blacken-docs.............................................................Passed
isort....................................................................Passed
flake8...................................................................Passed
codespell................................................................Passed
Add License Headers......................................................Passed
Ansys Technical Review...................................................Passed
pydocstyle...............................................................Passed
check for merge conflicts................................................Passed
debug statements (python)................................................Passed
check yaml...............................................................Passed
trim trailing whitespace.................................................Passed
check for added large files..............................................Passed
Validate GitHub Workflows................................................Passed

Documentation
-------------
Expand Down Expand Up @@ -201,8 +212,8 @@ Use the `PyMechanical Issues <https://github.com/ansys/pymechanical/issues>`_
page to submit questions, report bugs, and request new features. When possible,
use these templates:

* Bug report
* Feature request
* `Bug report <https://github.com/ansys/pymechanical/issues/new?assignees=&labels=bug&projects=&template=bug.yml&title=Bug+located+in+...>`_
* `Feature request <https://github.com/ansys/pymechanical/issues/new?assignees=&labels=enhancement&projects=&template=feature.yml&title=Add+...>`_

If your issue does not fit into one of these template categories, create your own issue.

Expand Down
3 changes: 0 additions & 3 deletions doc/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ an embedded instance or remote session.
.. grid-item-card:: Embedding Examples
:padding: 2 2 2 2
:link: https://embedding.examples.mechanical.docs.pyansys.com/examples/index.html
:text-align: center

Uses PyMechanical to embed an instance of Mechanical directly within Python as a Python object.

.. grid-item-card:: Remote Session Examples
:padding: 2 2 2 2
:link: https://examples.mechanical.docs.pyansys.com/examples/index.html
:text-align: center

Uses PyMechanical as a client to a remote Mechanical instance.

Expand All @@ -27,7 +25,6 @@ an embedded instance or remote session.
.. grid-item-card:: Embedding Instance & Remote Session Example
:padding: 2 2 2 2
:link: gallery_examples/embedding_n_remote/embedding_remote.html
:text-align: center

Demonstrates the same model setup in both an embedded instance and remote session,
as well as examples using a combination of embedded instances and remote sessions.
2 changes: 0 additions & 2 deletions doc/source/kil/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ Ansys recommends that you always use the latest version of both to achieve the b
.. grid-item-card:: :fas:`fa-solid fa-gears` Mechanical
:link: mechanical
:link-type: doc
:text-align: center

Known issues and limitations of Standalone Mechanical

.. grid-item-card:: :fab:`fa-brands fa-python` PyMechanical
:link: pymechanical
:link-type: doc
:text-align: center

Known issues and limitations of PyMechanical

Expand Down
12 changes: 12 additions & 0 deletions tests/embedding/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,15 @@ def test_rm_lockfile(embedded_app, tmp_path: pytest.TempPathFactory):
lockfile_path = os.path.join(embedded_app.DataModel.Project.ProjectDirectory, ".mech_lock")
# Assert lock file path does not exist
assert not os.path.exists(lockfile_path)


@pytest.mark.embedding
def test_gui_on_save(embedded_app, tmp_path: pytest.TempPathFactory):
"""Test lock file is removed on close of embedded application."""
mechdat_path = os.path.join(tmp_path, "test.mechdat")
embedded_app.save(mechdat_path)
embedded_app.close()

# lockfile_path = os.path.join(embedded_app.DataModel.Project.ProjectDirectory, ".mech_lock")
# Assert lock file path does not exist
assert False

Check failure on line 326 in tests/embedding/test_app.py

View workflow job for this annotation

GitHub Actions / Test Report 3.9

test_app.test_gui_on_save

assert False
Raw output
embedded_app = Ansys Mechanical [Ansys Mechanical Enterprise]
Product Version:242
Software build date: 06/03/2024 09:35:09

tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/test_gui_on_save0')

    @pytest.mark.embedding
    def test_gui_on_save(embedded_app, tmp_path: pytest.TempPathFactory):
        """Test lock file is removed on close of embedded application."""
        mechdat_path = os.path.join(tmp_path, "test.mechdat")
        embedded_app.save(mechdat_path)
        embedded_app.close()
    
        # lockfile_path = os.path.join(embedded_app.DataModel.Project.ProjectDirectory, ".mech_lock")
        # Assert lock file path does not exist
>       assert False
E       assert False

tests/embedding/test_app.py:326: AssertionError

Check failure on line 326 in tests/embedding/test_app.py

View workflow job for this annotation

GitHub Actions / Test Report 3.11

test_app.test_gui_on_save

assert False
Raw output
embedded_app = Ansys Mechanical [Ansys Mechanical Enterprise]
Product Version:242
Software build date: 06/03/2024 09:35:09

tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/test_gui_on_save0')

    @pytest.mark.embedding
    def test_gui_on_save(embedded_app, tmp_path: pytest.TempPathFactory):
        """Test lock file is removed on close of embedded application."""
        mechdat_path = os.path.join(tmp_path, "test.mechdat")
        embedded_app.save(mechdat_path)
        embedded_app.close()
    
        # lockfile_path = os.path.join(embedded_app.DataModel.Project.ProjectDirectory, ".mech_lock")
        # Assert lock file path does not exist
>       assert False
E       assert False

tests/embedding/test_app.py:326: AssertionError

Check failure on line 326 in tests/embedding/test_app.py

View workflow job for this annotation

GitHub Actions / Test Report 3.10

test_app.test_gui_on_save

assert False
Raw output
embedded_app = Ansys Mechanical [Ansys Mechanical Enterprise]
Product Version:242
Software build date: 06/03/2024 09:35:09

tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/test_gui_on_save0')

    @pytest.mark.embedding
    def test_gui_on_save(embedded_app, tmp_path: pytest.TempPathFactory):
        """Test lock file is removed on close of embedded application."""
        mechdat_path = os.path.join(tmp_path, "test.mechdat")
        embedded_app.save(mechdat_path)
        embedded_app.close()
    
        # lockfile_path = os.path.join(embedded_app.DataModel.Project.ProjectDirectory, ".mech_lock")
        # Assert lock file path does not exist
>       assert False
E       assert False

tests/embedding/test_app.py:326: AssertionError

Check failure on line 326 in tests/embedding/test_app.py

View workflow job for this annotation

GitHub Actions / Test Report 3.12

test_app.test_gui_on_save

assert False
Raw output
embedded_app = Ansys Mechanical [Ansys Mechanical Enterprise]
Product Version:242
Software build date: 06/03/2024 09:35:09

tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/test_gui_on_save0')

    @pytest.mark.embedding
    def test_gui_on_save(embedded_app, tmp_path: pytest.TempPathFactory):
        """Test lock file is removed on close of embedded application."""
        mechdat_path = os.path.join(tmp_path, "test.mechdat")
        embedded_app.save(mechdat_path)
        embedded_app.close()
    
        # lockfile_path = os.path.join(embedded_app.DataModel.Project.ProjectDirectory, ".mech_lock")
        # Assert lock file path does not exist
>       assert False
E       assert False

tests/embedding/test_app.py:326: AssertionError

0 comments on commit 66fcea5

Please sign in to comment.