Skip to content

Releases: seantis/libres

1.1.0

08 Apr 12:43
8f1bc9a

Choose a tag to compare

  • Adds support for blocking resources. Scheduler now accepts a collection
    of blocking_names to indicate related resources that will block reservations
    on the managed resource (e.g. for a soccer field where you can either reserve
    the entire field or one of the two halves, the two halves should block the
    entire field and vice versa, but the halves shouldn't block each other).

    For schedulers with blocking resources you should use the new method
    allocations_with_availability_by_range to retrieve the availability and
    availability partitions for a set of allocations, since the corresponding
    attributes/method on the Allocation will be inaccurate when blocking
    resources are involved.

    For decent performance it's absolutely vital that the new GiST index on
    tsrange(reserved_slots.start, reserved_slots."end") exists, it's also worth
    adding a potentially missing index on the source_type column, you can
    use the following recipe using an alembic Operations object to migrate
    existing databases:

    context.operations.create_index(
      'ix_reserved_slots_source_type',
      'reserved_slots',
      columns=['source_type'],
      if_not_exists=True
    )
    context.operations.create_index(
      'start_end_tsrange_ix',
      'reserved_slots',
      columns=[text('tsrange(start, "end")')],
      postgresql_using='gist',
      if_not_exists=True
    )

1.0.0

10 Feb 15:58
35a4405

Choose a tag to compare

  • Adds support for Python 3.14
  • Adds support for SQLAlchemy 2.0
  • Drops support for Python 3.9
  • Drops support for SQLAlchemy 1.4

0.10.2

05 Feb 07:45
cda1083

Choose a tag to compare

  • Prepares for SQLAlchemy 2.0 support

libres 1.0 will require SQLAlchemy 2.0, this is probably the last release that will support 1.4

0.10.1

21 Jan 15:52
baeaa04

Choose a tag to compare

  • Adds proper support for SQLAlchemy 1.4. As a result of this
    Allocation.type and Reservation.type are no longer nullable
    and have a default value of 'generic', you may use the following
    recipe using an alembic Operations object to migrate existing
    databases:
    context.operations.execute("""
      UPDATE allocations
         SET type = 'generic'
       WHERE type IS NULL;
    """)
    context.operations.alter_column('allocations', 'type', nullable=False)
    context.operations.execute("""
      UPDATE reservations
         SET type = 'generic'
       WHERE type IS NULL;
    """)
    context.operations.alter_column('reservations', 'type', nullable=False)

0.10.0

15 Jan 16:11
b697860

Choose a tag to compare

  • Adds new entity ReservationBlocker for administrative blockers
    of targeted allocations for the targeted timespans, this also ends
    up adding a new column source_type to ReservedSlot which can be
    added using the following recipe using an alembic Operations object:
      operations.add_column(
        'reserved_slots',
        Column(
          'source_type',
          Enum(
              'reservation', 'blocker',
              name='reserved_slot_source_type'
          ),
          nullable=False,
          server_default='reservation'
        )
      )
      operations.alter_column(
        'reserved_slots',
        'source_type',
        server_default=None
      )

0.9.0

23 May 07:52
75fbce5

Choose a tag to compare

  • Replaces JSON database type with JSONB, this means
    Postgres as a backend is not required. You will also need
    to write a migration for existing JSON columns. You may use
    the following recipe using an alembic Operations object:
    operations.alter_column(
        'table_name',
        'column_name',
        type_=JSON,
        postgresql_using='"column_name"::jsonb'
    )

0.8.0

15 Jan 10:26
99e5162

Choose a tag to compare

  • Adds support for Python 3.13
  • Drops support for Python 3.8
  • Modernizes type hints

0.7.3

21 Aug 06:46
a40aedc

Choose a tag to compare

  • Adds support for Python 3.12

0.7.2

07 Feb 09:14
100c886

Choose a tag to compare

  • Fixes another incorrect type annotation in Scheduler.

0.7.1

18 Jan 12:30
5e4dbc2

Choose a tag to compare

  • Fixes some incorrect type annotations in Scheduler.