A couple quick suggestions about the monorepo structure:
First, I recommend using pkg-r and pkg-py rather than r-package and python-package for the package subdirectory names. The pkg- prefix keeps these folders together and the shorter versions require less typing, e.g. pak::pak("posit-dev/querychat@pkg-r") vs pak::pak("posit-dev/querychat@r-package"). I used this pattern in brand-yml and upcoming in shinychat.
Second, unlike R packages, Python's pyproject.toml file can be at the root of the repo, which then obviates the need for the subdirectory= directive when installing from GitHub. It's relatively simple to set up, you only need to update the project metadata to refer to pkg-py/src/querychat instead of src/querychat.
A small note: .Rbuildignore needs to be in the R package subdir.
Finally, with these larger projects, I think it's worth moving the Makefile to the top level and using it to coordinate everything, including common R tasks. The Makefile in this repo came from chatlas which was adapted from brand.yml's Makefile which was set up to work in a monorepo context. You can see in the shinychat monorepo branch how I extended the Makefile to cover R, Python, and docs in that file.
A couple quick suggestions about the monorepo structure:
First, I recommend using
pkg-randpkg-pyrather thanr-packageandpython-packagefor the package subdirectory names. Thepkg-prefix keeps these folders together and the shorter versions require less typing, e.g.pak::pak("posit-dev/querychat@pkg-r")vspak::pak("posit-dev/querychat@r-package"). I used this pattern in brand-yml and upcoming in shinychat.Second, unlike R packages, Python's
pyproject.tomlfile can be at the root of the repo, which then obviates the need for thesubdirectory=directive when installing from GitHub. It's relatively simple to set up, you only need to update the project metadata to refer topkg-py/src/querychatinstead ofsrc/querychat.A small note:
.Rbuildignoreneeds to be in the R package subdir.Finally, with these larger projects, I think it's worth moving the
Makefileto the top level and using it to coordinate everything, including common R tasks. TheMakefilein this repo came from chatlas which was adapted from brand.yml's Makefile which was set up to work in a monorepo context. You can see in the shinychat monorepo branch how I extended theMakefileto cover R, Python, and docs in that file.