Make syntax highlighting explicit in docs

This commit is contained in:
Dion Moult
2023-01-10 10:16:28 +11:00
parent 66e067d1ce
commit c8ba96cde8
236 changed files with 753 additions and 251 deletions
@@ -85,7 +85,9 @@ class Usecase:
:return: The newly created IfcTask
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -33,7 +33,9 @@ class Usecase:
:return: The newly created IfcTaskTime.
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule.
schedule = ifcopenshell.api.run("sequence.add_work_schedule", model, name="Construction Schedule A")
@@ -50,7 +50,9 @@ class Usecase:
:return: The newly created IfcTimePeriod
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -43,7 +43,9 @@ class Usecase:
:return: The newly created IfcWorkCalendar
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -44,7 +44,9 @@ class Usecase:
:return: The newly created IfcWorkPlan
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# This will hold all our construction schedules
work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction")
@@ -46,7 +46,9 @@ class Usecase:
:return: The newly created IfcWorkSchedule
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# This will hold all our construction schedules
work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction")
@@ -38,7 +38,9 @@ class Usecase:
:return: The newly created IfcWorkTime
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -45,7 +45,9 @@ class Usecase:
:return: The newly created IfcLagTime
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -68,7 +68,9 @@ class Usecase:
:return: The newly created IfcRelAssignsToProcess relationship
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -44,7 +44,9 @@ class Usecase:
:return: The newly created IfcRelAssignsToProduct relationship
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -66,7 +66,9 @@ class Usecase:
:return: The newly created IfcRecurrencePattern
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -53,7 +53,9 @@ class Usecase:
:return: The newly created IfcRelSequence
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -35,7 +35,9 @@ class Usecase:
:return: The IfcRelAggregates relationship
:rtype: ifcopenshell.entity_instance.entity_instance
Example::
Example:
.. code:: python
# This will hold all our construction schedules
work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction")
@@ -40,7 +40,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Add our own crew
crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource")
@@ -46,7 +46,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Define a convenience function to add a task chained to a predecessor
def add_task(model, name, predecessor, work_schedule):
@@ -34,7 +34,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -34,7 +34,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -35,7 +35,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model, name="5 Day Week")
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# This will hold all our construction schedules
work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction")
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# This will hold all our construction schedules
work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction")
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -34,7 +34,9 @@ class Usecase:
:return: A set of IfcProducts output by the IfcTask.
:rtype: set[ifcopenshell.entity_instance.entity_instance]
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -40,7 +40,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# See the example for ifcopenshell.api.sequence.cascade_schedule for
# details of how to set up a basic set of tasks and calculate the
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -28,7 +28,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model, name="5 Day Week")
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# This will hold all our construction schedules
work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction")
@@ -30,7 +30,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# This will hold all our construction schedules
work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction")
@@ -26,7 +26,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -30,7 +30,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -33,7 +33,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's create a new calendar.
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
@@ -31,7 +31,9 @@ class Usecase:
:return: None
:rtype: None
Example::
Example:
.. code:: python
# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.