Browse Source

Close #28

pull/31/head
Daniel Gyulai 3 years ago
parent
commit
24cdacfcb0
  1. 8
      alice-ci/setup.cfg
  2. 13
      alice-ci/src/alice/__init__.py
  3. 5
      alice-ci/src/alice/__main__.py
  4. 4
      alice-ci/src/alice/cli.py
  5. 2
      alice-ci/src/alice/config.py
  6. 4
      alice-ci/src/alice/configparser.py
  7. 8
      alice-ci/src/alice/runnerfactory.py
  8. 5
      alice-ci/src/alice/runners/__init__.py
  9. 4
      alice-ci/src/alice/runners/dockerrunner.py
  10. 1
      alice-ci/src/alice/runners/pypirunner.py
  11. 4
      alice-ci/src/alice/runners/pythonrunner.py
  12. 4
      alice-ci/src/alice/runners/pyutils.py

8
alice-ci/setup.cfg

@ -16,7 +16,9 @@ classifiers =
[options]
package_dir =
= src
packages = alice
packages =
alice
alice.runners
python_requires = >=3.6
install_requires =
PyYAML
@ -26,5 +28,5 @@ install_requires =
console_scripts =
alice = alice.cli:main
[options.packages.find]
where = src
#[options.packages.find]
#where = src

13
alice-ci/src/alice/__init__.py

@ -1,10 +1,9 @@
# flake8: noqa F401
from alice.configparser import ConfigParser
from alice.exceptions import NonZeroRetcode
from alice.runnerfactory import Factory
from alice.runners.pythonrunner import PythonRunner
from alice.exceptions import NonZeroRetcode
from alice.exceptions import RunnerError
from alice.exceptions import ConfigException
from .configparser import ConfigParser
from .exceptions import NonZeroRetcode
from .runnerfactory import Factory
from .exceptions import NonZeroRetcode
from .exceptions import RunnerError
from .exceptions import ConfigException
name = "alice"

5
alice-ci/src/alice/__main__.py

@ -1,3 +1,4 @@
from alice.cli import main
import alice
main()
if __name__ == '__main__':
alice.cli.main()

4
alice-ci/src/alice/cli.py

@ -2,8 +2,8 @@ import logging
import os
import argparse
from alice.configparser import ConfigParser
from alice.exceptions import ConfigException, NonZeroRetcode, RunnerError
from .configparser import ConfigParser
from .exceptions import ConfigException, NonZeroRetcode, RunnerError
def gen_env(param_list):

2
alice-ci/src/alice/config.py

@ -1,7 +1,7 @@
import logging
import os
from alice.exceptions import ConfigException
from .exceptions import ConfigException
class ConfigHolder:

4
alice-ci/src/alice/configparser.py

@ -3,8 +3,8 @@ from os import getcwd, path, environ
import subprocess
import yaml
from alice.exceptions import ConfigException
from alice.runnerfactory import Factory
from .exceptions import ConfigException
from .runnerfactory import Factory
class ConfigParser:

8
alice-ci/src/alice/runnerfactory.py

@ -1,10 +1,10 @@
import logging
from os.path import join, abspath
from alice.runners.pythonrunner import PythonRunner
from alice.runners.pypirunner import PyPiRunner
from alice.runners.dockerrunner import DockerRunner
from alice.exceptions import ConfigException
from .runners.pythonrunner import PythonRunner
from .runners.pypirunner import PyPiRunner
from .runners.dockerrunner import DockerRunner
from .exceptions import ConfigException
class Factory():

5
alice-ci/src/alice/runners/__init__.py

@ -1,3 +1,4 @@
# flake8: noqa F401
from alice.runners.pythonrunner import PythonRunner
from alice.runners.pypirunner import PyPiRunner
from .pythonrunner import PythonRunner
from .pypirunner import PyPiRunner
from .dockerrunner import DockerRunner

4
alice-ci/src/alice/runners/dockerrunner.py

@ -4,8 +4,8 @@ import logging
from os import path, getcwd
import docker
from alice.runners.pyutils import grab_from, gen_dict
from alice.exceptions import ConfigException, NonZeroRetcode, RunnerError
from .pyutils import grab_from, gen_dict
from ..exceptions import ConfigException, NonZeroRetcode, RunnerError
class ImageSource(Enum):

1
alice-ci/src/alice/runners/pypirunner.py

@ -87,7 +87,6 @@ class PyPiRunner():
return sorted(releases, key=parse_version, reverse=True)
def build(self, config, package):
# TODO: Actual build - silent, unless failure!
pkg_path = path.join(config.workdir, package)
if not path.isdir(pkg_path):
raise ConfigException(f"Path does not exists: {pkg_path}")

4
alice-ci/src/alice/runners/pythonrunner.py

@ -4,8 +4,8 @@ import os
import sys
import shlex
from alice.exceptions import NonZeroRetcode, RunnerError, ConfigException
from alice.runners.pyutils import glob_command
from ..exceptions import NonZeroRetcode, RunnerError, ConfigException
from .pyutils import glob_command
# TODO: Handle config like PyPiConfig

4
alice-ci/src/alice/runners/pyutils.py

@ -5,8 +5,8 @@ import sys
from pkg_resources import parse_version
import re
from alice.exceptions import RunnerError, ConfigException
from alice.config import ConfigHolder
from ..exceptions import RunnerError, ConfigException
from ..config import ConfigHolder
class PackageManager:

Loading…
Cancel
Save