Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
]
}
},
"postCreateCommand": "pip3 install -r requirements.txt && bash external/setup_loki_b.sh --non-interactive && echo 'Workspace ready. Run: make regtest'"
"postCreateCommand": "pip3 install -r requirements.txt && python3 -m pip install --user --upgrade 'setuptools>=64' 'wheel>=0.42' 'pip>=24' && python3 -m pip install --user -e . && echo 'export PATH=\"$HOME/.local/bin:$PATH\"' >> ~/.bashrc && source ~/.bashrc && bash external/setup_loki_b.sh --non-interactive && echo 'Workspace ready. Run: make regtest'"
}
23 changes: 12 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@
from pathlib import Path


def main(config_path):
def main():
"""
Main entry point for running the global plasma model using a YAML config.
"""
# Allow passing YAML file as command-line arg
config_path = sys.argv[1] if len(sys.argv) > 1 else "cases/ashida1995/config.yml"

if not os.path.isfile(config_path):
print(f"Error: Config file not found: {config_path}")
print("Usage: python main.py [path/to/config.yml]")
sys.exit(1)

print(f"Using config: {config_path}\n")

try:
model_definition = build_model_definition(config_path)
except Exception as e:
Expand Down Expand Up @@ -68,13 +78,4 @@ def main(config_path):


if __name__ == "__main__":
# Allow passing YAML file as command-line arg
config_path = sys.argv[1] if len(sys.argv) > 1 else "cases/ashida1995/config.yml"

if not os.path.isfile(config_path):
print(f"Error: Config file not found: {config_path}")
print("Usage: python main.py [path/to/config.yml]")
sys.exit(1)

print(f"Using config: {config_path}\n")
main(config_path)
main()
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
name = "zdPlasmaPy"
version = "0.1.0"

[project.scripts]
zdplasmapy = "main:main"

[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=64.0"]
build-backend = "setuptools.build_meta"
# Add this to the end of your pyproject.toml

[tool.setuptools]
py-modules = ["main"]

[tool.setuptools.packages.find]
where = ["src"]
where = ["."]
include = ["src*"]
Loading