mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
chore(ci): name the Java package in one place for tools and CI (#6596)
The docs tools, the partition gate and their registries each spelled out src/main/java/io/github/hectorvent/floci/. tools/java_sources.py now holds the package path, the tools import it, and services.yaml and service_matrix.yaml list sources relative to the package root, so the move to io.floci.aws changes one line here. A registry entry still in the repo-relative form fails with a message naming the new form. prefetch-images.sh finds TestImages.java by name. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
1 parent
454d7b6ebd
commit
e8ef0b147e
13 files changed
+234
-173
No files matched your search
@@ -0,0 +1,19 @@
|
||||
"""Where Floci's Java sources live: the one place the tools under tools/ name the Java package.
|
||||
|
||||
Tools import the paths from here instead of writing src/main/java/<package>/... themselves, so a
|
||||
package rename changes this file and nothing else in tools/. Registries that list source files
|
||||
(tools/docs/services.yaml, tools/docs/service_matrix.yaml) hold paths relative to PACKAGE_DIR.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
SOURCE_ROOT = "src/main/java"
|
||||
PACKAGE_DIR = f"{SOURCE_ROOT}/io/github/hectorvent/floci"
|
||||
SERVICES_PACKAGE_DIR = f"{PACKAGE_DIR}/services"
|
||||
|
||||
|
||||
def package_source(relative: str) -> str:
|
||||
"""The repo-relative path of a source file a registry lists relative to PACKAGE_DIR."""
|
||||
if relative.startswith(("src/", "/")):
|
||||
raise ValueError(f"{relative}: registry paths are relative to {PACKAGE_DIR}/, "
|
||||
f"for example services/sqs/SqsJsonHandler.java")
|
||||
return f"{PACKAGE_DIR}/{relative}"
|
||||
Reference in new issue
Block a user