Skip to content

Commit

Permalink
refactor(submodule): Update paths to ensure submodule integration
Browse files Browse the repository at this point in the history
- Updated `Setup.mk` to point `BUILDER_DIR` to the new JMBuilder submodule directory (`vendor/JMBuilder`)
- Modified `retriever.py` to adjust JMBuilder path in `sys.path` and define `BUILDER_DIR` variable for proper integration
- Ensured that the project continues to run as expected with the JMBuilder submodule

These changes are crucial for maintaining project functionality after the JMBuilder migration to a submodule.
  • Loading branch information
mitsuki31 committed Sep 15, 2024
1 parent 6780c64 commit 0441558
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion make/Setup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ SOURCE_DIR := src/main
TEST_DIR := src/test
TARGET_DIR := target
DOCS_DIR := docs
BUILDER_DIR := tools/JMBuilder
BUILDER_DIR := vendor/JMBuilder
JAVA_DIR := $(SOURCE_DIR)/java
RESOURCE_DIR := $(SOURCE_DIR)/resources
CLASSES_DIR := $(TARGET_DIR)/classes
Expand Down
6 changes: 5 additions & 1 deletion scripts/retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
OUTPUT_DIR : os.PathLike
The path to the output directory for retrieved information.
BUILDER_DIR : os.PathLike
The path to the JMatrix builder directory.
Available Functions
-------------------
md5_get
Expand Down Expand Up @@ -47,6 +50,7 @@
os.path.join(os.path.dirname(__file__), '..'))
TARGET_DIR: os.PathLike = os.path.join(ROOT_DIR, 'target')
OUTPUT_DIR: os.PathLike = os.path.join(TARGET_DIR, '_retriever')
BUILDER_DIR: os.PathLike = os.path.join(ROOT_DIR, 'vendor', 'JMBuilder')


def md5_get(file: os.PathLike, block_size: int = -1) -> str:
Expand Down Expand Up @@ -100,7 +104,7 @@ def setup() -> str:
directory ``OUTPUT_DIR``.
"""
# Insert the JMBuilder path to PYTHONPATH environment
sys.path.insert(0, os.path.join(ROOT_DIR, 'tools', 'JMBuilder'))
sys.path.insert(0, BUILDER_DIR)

# DO NOT TRY TO MOVE THIS IMPORTS TO GLOBAL!! Keep on this function only
# for speed and performance when commands in Makefile run this
Expand Down

0 comments on commit 0441558

Please sign in to comment.