-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from atstarke/update-setup-files
This fix resolves an issue in the magent2 library where, after running pip install magent2, the environments were not copied over correctly, preventing users from importing and utilizing these environments. The merge ensures that all necessary environment files are properly included during installation.
- Loading branch information
Showing
5 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
# Include the CMakeLists.txt file | ||
include CMakeLists.txt | ||
|
||
# Recursively include everything in the src directory | ||
recursive-include src * | ||
|
||
# Include all files in the environments, config, and scenarios directories within the magent2 package | ||
recursive-include magent2/environments * | ||
recursive-include magent2/config * | ||
recursive-include magent2/scenarios * | ||
|
||
# Include dynamic library files | ||
include *.dylib | ||
include *.dll | ||
include *.so | ||
|
||
# Include gif files | ||
include *.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import importlib | ||
|
||
import magent2 | ||
|
||
|
||
def test_version(): | ||
assert hasattr(magent2, "__version__"), "Version should not be None" | ||
assert isinstance(magent2.__version__, str), "Version should be a string" | ||
|
||
|
||
def test_import_environments(): | ||
envs = [ | ||
"adversarial_pursuit_v4", | ||
"battle_v4", | ||
"battlefield_v5", | ||
"combined_arms_v6", | ||
"gather_v5", | ||
"magent_env", | ||
"tiger_deer_v4", | ||
] | ||
|
||
for env in envs: | ||
try: | ||
# Dynamically import the environment module | ||
importlib.import_module(f"magent2.environments.{env}") | ||
except ImportError: | ||
assert False, f"{env} should be importable" |