Skip to content

Conversation

e117649
Copy link
Contributor

@e117649 e117649 commented Oct 15, 2025

Closes #335 and closes #212

@e117649 e117649 force-pushed the refactoring branch 10 times, most recently from e666877 to c4b7d62 Compare October 15, 2025 21:31
@e117649 e117649 marked this pull request as ready for review October 15, 2025 21:47
@e117649 e117649 requested review from rafa-be and sharpener6 October 15, 2025 21:48
@gxuu
Copy link
Contributor

gxuu commented Oct 15, 2025

Why are we no longer using scaler/ as our include directory? For Python examples we had the same thing:

# examples/simple_client.py
from scaler import Client
from scaler.cluster.combo import SchedulerClusterCombo

I think we should keep them consistent. @sharpener6 @rafa-be .

@sharpener6
Copy link
Collaborator

Why are we no longer using scaler/ as our include directory? For Python examples we had the same thing:

# examples/simple_client.py
from scaler import Client
from scaler.cluster.combo import SchedulerClusterCombo

I think we should keep them consistent. @sharpener6 @rafa-be .

User should pip install opengris-scaler and run it, not just git clone and run those examples, eventually for all the CI unit tests, should build wheel, and install it then run the tests, not run the tests before making wheels

Copy link
Collaborator

@rafa-be rafa-be left a comment

Choose a reason for hiding this comment

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

All the Python changes are fine to me.

However, looking at the #include, I'm wondering if we shouldn't add a top scaler/ directory to all C++ files. That is:

src/
| - cpp/
    | - scaler/
        | - ymq/
            | - ...
        | - object_storage/
            | - ...
        | - CMakeLists.txt
| - scaler/
    | - __init__.py
    | - ...

Thus instead of having includes like this:

#include "ymq/logging.h"

We would have something like this:

#include "scaler/ymq/logging.h"

Which matches Python's module structure.

@gxuu
Copy link
Contributor

gxuu commented Oct 16, 2025

I get it

@sharpener6
Copy link
Collaborator

All the Python changes are fine to me.

However, looking at the #include, I'm wondering if we shouldn't add a top scaler/ directory to all C++ files. That is:

src/
| - cpp/
    | - scaler/
        | - ymq/
            | - ...
        | - object_storage/
            | - ...
        | - CMakeLists.txt
| - scaler/
    | - __init__.py
    | - ...

Thus instead of having includes like this:

#include "ymq/logging.h"

We would have something like this:

#include "scaler/ymq/logging.h"

Which matches Python's module structure.

Agree

@e117649 e117649 force-pushed the refactoring branch 7 times, most recently from 7d92c85 to 2ae85cf Compare October 16, 2025 16:46
@e117649 e117649 requested a review from rafa-be October 16, 2025 17:06
@sharpener6
Copy link
Collaborator

@e117649 Did you tried to build the wheel and install the wheel and import scaler working?

@e117649
Copy link
Contributor Author

e117649 commented Oct 16, 2025

@e117649 Did you tried to build the wheel and install the wheel and import scaler working?

it is not working, I'll have it fixed in 10 minutes

@e117649 e117649 force-pushed the refactoring branch 8 times, most recently from b000eee to 6ea326c Compare October 16, 2025 19:53
@e117649
Copy link
Contributor Author

e117649 commented Oct 16, 2025

@e117649 Did you tried to build the wheel and install the wheel and import scaler working?

@sharpener6 yes, importing and using scaler from a built and installed wheel now works, and all the tests running against the source (not built wheel) still work

I also moved src/cpp/scaler/ymq (previously scaler/io/ymq) to src/cpp/scaler/io/ymq to keep in line with matching the python module structure

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.

Separate C++ and Python source files in the source tree Reorganize unit-tests to match codebase structure

4 participants