Verified Commit abec3b35 authored by Raphaël Bleuse's avatar Raphaël Bleuse
Browse files

Relocate packages under root package `pybatsim`

PyBatsim shipped two packages `batsim` and `schedulers` as top-level
packages.

This commits is a first step towards a neater architecture for pybatsim.

`batsim` is a misleading name as it let users think this is a pure
Python implementation of Batsim: this is not the purpose of this
package.

`schedulers` is easy to be confused with the standard library `sched`
module.
parent d07f6645
[tool.poetry]
name = "pybatsim"
version = "3.2.1"
version = "4.0.0-alpha.0"
description = "Python API and schedulers for Batsim"
readme = "README.rst"
keywords = [
......@@ -31,8 +31,7 @@ classifiers = [
"Topic :: System :: Distributed Computing",
]
packages = [
{include = "batsim"},
{include = "schedulers"},
{include = "pybatsim", from = "src"},
]
[tool.poetry.dependencies]
......@@ -52,8 +51,8 @@ Sphinx = "^4.3.1"
tools = ["pandas"]
[tool.poetry.scripts]
pybatsim = "batsim.cmds.launcher:main"
pybatsim-experiment = "batsim.cmds.experiments:main"
pybatsim = "pybatsim.batsim.cmds.launcher:main"
pybatsim-experiment = "pybatsim.batsim.cmds.experiments:main"
[build-system]
requires = ["poetry-core>=1.0.0"]
......
import sys
if sys.version_info >= (3, 8):
from importlib import metadata
else:
import importlib_metadata as metadata
__version__ = metadata.version('pybatsim')
__all__ = [__version__]
# -*- coding: utf-8 -*-
import sys
if sys.version_info >= (3, 8):
......@@ -8,3 +10,4 @@ else:
__version__ = metadata.version('pybatsim')
__all__ = [__version__]
# -*- coding: utf-8 -*-
from .. import __version__
__all__ = [__version__]
......@@ -16,8 +16,8 @@ import json
from docopt import docopt
from batsim.tools.experiments import launch_experiment
from batsim import __version__
from pybatsim.batsim.tools.experiments import launch_experiment
from pybatsim import __version__
def main():
......
......@@ -23,8 +23,8 @@ import logging
from docopt import docopt
from batsim.tools.launcher import launch_scheduler, instanciate_scheduler
from batsim import __version__
from pybatsim.batsim.tools.launcher import launch_scheduler, instanciate_scheduler
from pybatsim import __version__
def main():
arguments = docopt(__doc__, version=__version__)
......
......@@ -6,7 +6,7 @@
or by the user to submit dynamic jobs).
"""
from batsim.batsim import Job as BatsimJob, Batsim
from pybatsim.batsim.batsim import Job as BatsimJob, Batsim
from .utils import ObserveList, filter_list, ListView
from .alloc import Allocation
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment