Skip to content

Conversation

beygorghor
Copy link
Collaborator

@beygorghor beygorghor commented Sep 24, 2025

First PR to implement LQAS sampling in micro-planning.

Related JIRA tickets : IA-4485

Self proofreading checklist

  • Did I use eslint and ruff formatters?
  • Is my code clear enough and well documented?
  • Are my typescript files well typed?
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests?
  • Documentation has been included (for new feature)

Doc

Here

Changes

  • Link Planning to pipelines uuids
  • allow user to save a pipeline in planning modale, if openhexa is configured
  • endpoint to know if openhexa is configured
  • allow to exlcude org units from search by excluding parents
  • Custom LQAS form to launch the pipeline.

How to test

  • Make sure the OpenHexa config is correctly set
  • Edit a planning and select "LQAS Assignment Pipeline", save it,
  • open planning (click on the eye), you should see a sampling button.
  • Play with the inputs in the drawer and try to launch a sampling computation

Print screen / video

Screen.Recording.2025-09-30.at.14.38.33.mov

Notes

  • For now feed-back on pipeline is happening in the drawer, we swill change this an refresh assignments when task is done, or display an error message
  • you need a specific openhexa config with this slug (openhexa-config) to make it work:

{
  "openhexa_url": "https://api.openhexa.org/graphql/",
  "openhexa_token": "TOKEN",
  "workspace_slug": "iaso-demo-df5d5f", 
  "lqas_pipeline_code": "iaso-test-pipeline"
}

You'll need to adapt Iaso cutom connection to use a ngrok url and use specific credential to update the task on your machine

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

@beygorghor beygorghor marked this pull request as ready for review September 30, 2025 13:12
@beygorghor beygorghor requested review from tdethier and Bewi September 30, 2025 13:33
Copy link
Member

@tdethier tdethier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only read the backend code: there are a few things I would change, but nothing major. I guess this could work like that.

We should take some time to investigate a couple of suggestions I made - I'm not sure if they are feasible or not

@beygorghor beygorghor requested review from Bewi and bmonjoie October 1, 2025 11:08
const addToArray = useCallback(
const add = useCallback(
(arrayName: string, value: any = undefined) => {
const currentArray = parameterValues?.[arrayName] || [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not important but:
addToArray already do this check const currentArray = [...(array || [])];
You could just have: const updatedArray = addToArray(value, parameterValue?.[arrayName]);

Same for other array functions

Copy link
Contributor

@Bewi Bewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@beygorghor beygorghor merged commit 8d87c74 into develop Oct 2, 2025
3 checks passed
@beygorghor beygorghor deleted the IA-4485-planning-pipelines branch October 2, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants