Skip to content
Merged
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
27 changes: 15 additions & 12 deletions doc/source/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,14 @@ Installing PyHPS in developer mode allows you to modify and enhance the source:

# Activate it in Windows Powershell
.venv\Scripts\Activate.ps1

#. Ensure that you have the latest required build system and documentation,
testing, and CI tools:

.. code:: bash

python -m pip install -U pip setuptools tox
python -m pip install -r requirements/requirements_build.txt
python -m pip install -r requirements/requirements_doc.txt
python -m pip install -r requirements/requirements_tests.txt

#. Install the project in editable mode:
#. Install the package in editable mode with the required build system, documentation,
and testing tools:

.. code:: bash

python -m pip install --editable .
python -m pip install -U pip setuptools tox
python -m pip install --editable .[tests,doc]

#. Verify your development installation:

Expand Down Expand Up @@ -150,6 +142,17 @@ the building requirements and then executing the build module:
python -m twine check dist/*


Generate or update JMS resources
--------------------------------

To generate Job Management Service (JMS) resources from the corresponding schemas, run this command::

python generate_resources.py

To apply code styling standards to the generated code, run this command::

pre-commit run --all-files

Generate or update RMS models
-----------------------------

Expand Down
4 changes: 4 additions & 0 deletions src/ansys/hps/client/jms/resource/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class Task(Object):
ID of the license context in use.
custom_data : dict, optional
Dictionary type field for storing custom data.
working_directory : str, optional
Working directory of the task.
"""

class Meta:
Expand Down Expand Up @@ -113,6 +115,7 @@ def __init__(
owned_file_ids=missing,
license_context_id=missing,
custom_data=missing,
working_directory=missing,
**kwargs
):
self.id = id
Expand All @@ -139,6 +142,7 @@ def __init__(
self.owned_file_ids = owned_file_ids
self.license_context_id = license_context_id
self.custom_data = custom_data
self.working_directory = working_directory

self.obj_type = self.__class__.__name__

Expand Down
5 changes: 5 additions & 0 deletions src/ansys/hps/client/jms/schema/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,8 @@ class Meta(ObjectSchemaWithModificationInfo.Meta):
allow_none=True,
metadata={"description": "Dictionary type field for storing custom data."},
)

working_directory = fields.String(
allow_none=True,
metadata={"description": "Working directory of the task."},
)