Skip to content

feat: restructure repository#40

Open
akihikokuroda wants to merge 49 commits intogenerative-computing:mainfrom
akihikokuroda:reporestructure
Open

feat: restructure repository#40
akihikokuroda wants to merge 49 commits intogenerative-computing:mainfrom
akihikokuroda:reporestructure

Conversation

@akihikokuroda
Copy link
Copy Markdown
Member

fix #38

@akihikokuroda akihikokuroda marked this pull request as draft March 18, 2026 19:01
@akihikokuroda akihikokuroda marked this pull request as ready for review March 19, 2026 20:38
Copy link
Copy Markdown

@jakelorocco jakelorocco left a comment

Choose a reason for hiding this comment

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

Is it possible to make the workflows dynamic? Ie instead of having to create a new one for each subpackage, we just mandate all folders under mellea_contribs are subpackages and require some sort of structure?

Even if we don't have that, we should make sure to have a version of the quality check that ensures new packages have tests. For example, if I make a new subpackage and don't add tests / quality workflows right now, will I be able to merge? Or there's some necessary check still?

I'm also not certain how these differently named checks interact with github branch protections? For the mellea repo, we have to specifically select checks.

@akihikokuroda
Copy link
Copy Markdown
Member Author

@jakelorocco A new CI that checks if each subpackage has its own ci can be added. The quality of each ci is up-to the subpackage though. Is it enough as a minimum?

@jakelorocco
Copy link
Copy Markdown

@jakelorocco A new CI that checks if each subpackage has its own ci can be added. The quality of each ci is up-to the subpackage though. Is it enough as a minimum?

I think that makes sense. We should vet CI at merge time, but a check will ensure nothing gets through accidentally.

@psschwei
Copy link
Copy Markdown
Member

Once this merges, we'll also need to update the required checks in the branch protections ( as the quality checks no longer exist)

on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this would need to be run manually right? would this be more for auditing or do you see another purpose?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this must be run manually. I just left it for convenience. It can be deleted.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

So we can't have checks on this repo then? Or the checks just need to be manually kicked off for a given branch / PR?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I also don't know how branch protections interact with this. And also, if this is the case, why are the github action runners showing that checks ran below in the PR?

push:
branches:
- main
paths:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

since all the backends depend on mellea-integration-core, there is the chance that if we change something in the core that it would break the backends... should we also trigger a run of the backends if the core changes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's right. I'll add mellea-integration-core change in all integration paths.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't think we should create cross-dependencies in this repo. See my comment below, but if we update mellea-integration-core and it forces us to update other packages, then we've just inherited a ton of maintenance work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I took out the cross-dependencies build.


dependencies = [
"mellea>=0.3.2",
"mellea==0.3.2",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we want to bump this to 0.4.0?
longer-term, we probably need to sync our update strategy here to the release process
cc @jakelorocco

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I only flagged one, but there are multiple places we may need to update if we do want to bump

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Some tests failed with 0.4.0. Bumping 0.4.0 will be follow up PR.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it's fine for these to lag behind mellea (and expected since we don't want to own all the maintenance here). What happens if we bump mellea-integration-core? Do the internal packages that rely on it in here also have to get bumped? If so, that seems untenable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Integration projects can pin to a release of mellea-integration-core. The release numbering of the mellea-integration-core needs some rule that related to the compatible Mellea release and API version of the integration-core.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thinking back on this, I'm wondering if we should revert this change and just set a minimum mellea version rather than pinning to one specifically?

Copy link
Copy Markdown
Member

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

I think I am largely good with the changes here. would be good to have a review from the core team as well

Copy link
Copy Markdown

@jakelorocco jakelorocco left a comment

Choose a reason for hiding this comment

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

I think this is looking good and on the right track. The main purpose of my comments is to make longterm support from the Mellea team much less burdensome in this repo. To me, that means automating a large amount of the testing process and ensuring subpackages can be updated independently when needed.

run_tests.sh Outdated
Comment on lines +87 to +115
# Test reqlib_package (may have dependency issues)
echo "=========================================="
echo "Testing: reqlib_package"
echo "=========================================="
echo -e "${YELLOW}Note: reqlib_package requires additional dependencies (citeurl, eyecite, playwright)${NC}"
cd "$REPO_ROOT/mellea_contribs/reqlib_package"
if PYTHONPATH="src:$PYTHONPATH" python3 -m pytest test/ -v --tb=short 2>&1; then
echo -e "${GREEN}✓ reqlib_package tests PASSED${NC}"
PASSED_PROJECTS+=("reqlib_package")
else
echo -e "${YELLOW}⚠ reqlib_package tests SKIPPED (missing dependencies)${NC}"
FAILED_PROJECTS+=("reqlib_package (missing deps)")
fi
echo ""

# Test tools_package (may have dependency issues)
echo "=========================================="
echo "Testing: tools_package"
echo "=========================================="
echo -e "${YELLOW}Note: test_mprogram_robustness.py requires 'benchdrift' package (skipped)${NC}"
cd "$REPO_ROOT/mellea_contribs/tools_package"
if PYTHONPATH="src:$PYTHONPATH" python3 -m pytest test/test_double_round_robin.py test/test_top_k.py -v --tb=short 2>&1; then
echo -e "${GREEN}✓ tools_package tests PASSED (2 tests, test_mprogram_robustness.py skipped - requires benchdrift)${NC}"
PASSED_PROJECTS+=("tools_package")
else
echo -e "${YELLOW}⚠ tools_package tests FAILED${NC}"
FAILED_PROJECTS+=("tools_package")
fi
echo ""
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We should mandate that all projects have the same structure. We shouldn't need to specify different commands here than from the run_project_tests above.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Projects have the same structure now. This file was made for convenience. It probably causes confusion and maintenance issue. So I removed it.


dependencies = [
"mellea>=0.3.2",
"mellea==0.3.2",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it's fine for these to lag behind mellea (and expected since we don't want to own all the maintenance here). What happens if we bump mellea-integration-core? Do the internal packages that rely on it in here also have to get bumped? If so, that seems untenable.

push:
branches:
- main
paths:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't think we should create cross-dependencies in this repo. See my comment below, but if we update mellea-integration-core and it forces us to update other packages, then we've just inherited a ton of maintenance work.

@@ -0,0 +1 @@
README.md
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think we should either remove the README.md or add something here (even if it's auto generated). There's another README.md with the same problem.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I took out this file.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I might have missed it, but does this introduce the auto-detect packages without testing that we talked about?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This file was left for convenience. It may cause confusion so I removed this file.

Comment on lines +7 to +15
detect-changes:
runs-on: ubuntu-latest
outputs:
mellea-integration-core: ${{ steps.changes.outputs.mellea-integration-core }}
crewai-backend: ${{ steps.changes.outputs.crewai-backend }}
dspy-backend: ${{ steps.changes.outputs.dspy-backend }}
langchain-backend: ${{ steps.changes.outputs.langchain-backend }}
reqlib-package: ${{ steps.changes.outputs.reqlib-package }}
tools-package: ${{ steps.changes.outputs.tools-package }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I feel like instead of having to manually add a bunch of boilerplate for any new package that gets added to this repo, we should enforce a required package structure. Then, we don't need to duplicate this code and can just auto-process any new additions and automatically handle new packages in CI runs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This file was left for convenience. It may cause confusion so I removed this file.

on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

So we can't have checks on this repo then? Or the checks just need to be manually kicked off for a given branch / PR?

@akihikokuroda
Copy link
Copy Markdown
Member Author

@jakelorocco I'm taking out ci.yml, README.md and run_test.sh. They are not necessary and may be causing issues later. I also take back the changes mellea_integration_core kicking the 3 integrations ci.

@akihikokuroda
Copy link
Copy Markdown
Member Author

image :-(

@jakelorocco
Copy link
Copy Markdown

Hi @akihikokuroda, I see that you re-requested my review. Based on the changes since my previous review, I don't think my review comments have been addressed yet. Please let me know if you have questions / disagreements with my suggestions.

@psschwei psschwei mentioned this pull request Mar 27, 2026
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
akihikokuroda and others added 9 commits March 29, 2026 10:56
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Add detect-changes job that checks which subpackages have been modified and outputs flags for each. Each subpackage workflow now only runs when:
- Its files in mellea_contribs/ are changed, OR
- Its corresponding quality workflow file is changed

This prevents unnecessary CI runs when only unrelated subpackages are modified.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
@github-actions github-actions bot added the enhancement New feature or request label Mar 29, 2026
@akihikokuroda
Copy link
Copy Markdown
Member Author

@jakelorocco I removed the ".github/workflows/ci.yml" that is not unnecessary and may cause confusion.

I think I addressed all your comments. Thanks!

@akihikokuroda
Copy link
Copy Markdown
Member Author

Once this PR is merged, I'll work on to make the integrations work with Mellea 0.4.0.

Copy link
Copy Markdown
Member

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

We should also add some documentation on how the repo is now structured (readme, contribution docs).

strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
max-parallel: 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it possible to run these tests in parallel rather than sequentially? (will speed up CI time)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is suggested that they may cause conflicts especially LLM access. I'm not sure but I made safe setting.

cd mellea_contribs/crewai_backend
if ! command -v uv &> /dev/null; then
echo "Installing uv..."
pip install uv
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the old action used astral-sh/setup-uv@v5 to setup uv... any reason why we're doing that manually now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It had some issues with the action. I believe that the reason were integration-core is not published yet and the the it is sub-project in the repo. I would revisit once the core is published.

@akihikokuroda
Copy link
Copy Markdown
Member Author

We should also add some documentation on how the repo is now structured (readme, contribution docs).

@psschwei once this is finalized. I'll work on CD and docs.

Copy link
Copy Markdown

@jakelorocco jakelorocco left a comment

Choose a reason for hiding this comment

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

Were you able to investigate how github PR checks would be able to handle having differently named checks? I believe you have to specify each check and I'm not certain there's a way to set selection criteria for which checks are needed.

If there's not a way to do that, that's another reason why I think we should just have one check that runs the relevant tests and have the PR pass status checks based off that.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All of the ci-.yml and quality-.yml files are almost equivalent. I had previously mentioned if it would be possible to just check that tests exist in a given location and run those tests. Is that possible?

Then, for any subpackage, we can detect changes to that subpackage, and automatically run the tests without having to add boilerplate.

We can just force all tests to be runnable with pytest <subpackage>/tests or something like that.

I don't think we should force all subpackages to update this boilerplate code. If something ever changes in how we want to orchestrate, it will be a much larger change.

Comment on lines +5 to +17
paths:
- 'mellea_contribs/**'
- '.github/workflows/ci-*.yml'
- '.github/workflows/quality-*.yml'
- '.github/workflows/ci-subpackage-validation.yml'
push:
branches:
- main
paths:
- 'mellea_contribs/**'
- '.github/workflows/ci-*.yml'
- '.github/workflows/quality-*.yml'
- '.github/workflows/ci-subpackage-validation.yml'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Have you thought about how we should handle changes to files outside of this set (like pyproject.toml, etc...)? Do changes to those files require testing any of the subpackages?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This CI is for checking if all of the sub project have its own CI. The CI for the sub project should be triggered any file changes in it. The file changes in the root or directries other than mellea_contribs are not monitored.

akihikokuroda and others added 12 commits March 30, 2026 15:42
Replace 6 package-specific quality workflows with a single reusable generic
workflow that auto-discovers tests. This eliminates 240+ lines of duplicated
test logic and reduces friction when adding new subpackages.

Benefits:
- Single source of truth for test execution logic
- One file to update when CI requirements change
- Automatic test discovery (tests/ or test/ directories)
- Consistent behavior across all subpackages
- 38% fewer workflow files (13 → 8)

All CI wrappers now pass subpackage path and package-specific config
(timeout, Ollama requirement) to the generic workflow.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
The CI was trying to run tests for mellea_contribs/tools which was deleted and
renamed to mellea_contribs/tools_package. Added --diff-filter=ACMRTU to git diff
to exclude deleted files from the discovery process, preventing the CI from
trying to test non-existent directories.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
@akihikokuroda
Copy link
Copy Markdown
Member Author

@jakelorocco @psschwei The ci.yml and quality_generic.yml files updated. Please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: refactor to multi package

3 participants