LbExec 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lbexec-0.1.1/.gitignore +141 -0
- lbexec-0.1.1/.gitlab-ci.yml +71 -0
- lbexec-0.1.1/.pre-commit-config.yaml +43 -0
- lbexec-0.1.1/.pylintrc +659 -0
- lbexec-0.1.1/LICENSE +674 -0
- lbexec-0.1.1/PKG-INFO +32 -0
- lbexec-0.1.1/README.md +3 -0
- lbexec-0.1.1/pyproject.toml +90 -0
- lbexec-0.1.1/setup.cfg +4 -0
- lbexec-0.1.1/src/LbExec/__init__.py +38 -0
- lbexec-0.1.1/src/LbExec/__main__.py +39 -0
- lbexec-0.1.1/src/LbExec/cli_utils.py +381 -0
- lbexec-0.1.1/src/LbExec/options.py +165 -0
- lbexec-0.1.1/src/LbExec/workflows.py +246 -0
- lbexec-0.1.1/src/LbExec.egg-info/PKG-INFO +32 -0
- lbexec-0.1.1/src/LbExec.egg-info/SOURCES.txt +27 -0
- lbexec-0.1.1/src/LbExec.egg-info/dependency_links.txt +1 -0
- lbexec-0.1.1/src/LbExec.egg-info/entry_points.txt +2 -0
- lbexec-0.1.1/src/LbExec.egg-info/requires.txt +18 -0
- lbexec-0.1.1/src/LbExec.egg-info/top_level.txt +1 -0
- lbexec-0.1.1/tests/broken/__init__.py +11 -0
- lbexec-0.1.1/tests/broken/examples.py +16 -0
- lbexec-0.1.1/tests/example.yaml +4 -0
- lbexec-0.1.1/tests/example2/__init__.py +20 -0
- lbexec-0.1.1/tests/example_compression.yaml +7 -0
- lbexec-0.1.1/tests/example_compression_bad.yaml +7 -0
- lbexec-0.1.1/tests/examples.py +83 -0
- lbexec-0.1.1/tests/test_cli.py +299 -0
- lbexec-0.1.1/tests/test_workflows.py +207 -0
lbexec-0.1.1/.gitignore
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
98
|
+
__pypackages__/
|
|
99
|
+
|
|
100
|
+
# Celery stuff
|
|
101
|
+
celerybeat-schedule
|
|
102
|
+
celerybeat.pid
|
|
103
|
+
|
|
104
|
+
# SageMath parsed files
|
|
105
|
+
*.sage.py
|
|
106
|
+
|
|
107
|
+
# Environments
|
|
108
|
+
.env
|
|
109
|
+
.venv
|
|
110
|
+
env/
|
|
111
|
+
venv/
|
|
112
|
+
ENV/
|
|
113
|
+
env.bak/
|
|
114
|
+
venv.bak/
|
|
115
|
+
|
|
116
|
+
# Spyder project settings
|
|
117
|
+
.spyderproject
|
|
118
|
+
.spyproject
|
|
119
|
+
|
|
120
|
+
# Rope project settings
|
|
121
|
+
.ropeproject
|
|
122
|
+
|
|
123
|
+
# mkdocs documentation
|
|
124
|
+
/site
|
|
125
|
+
|
|
126
|
+
# mypy
|
|
127
|
+
.mypy_cache/
|
|
128
|
+
.dmypy.json
|
|
129
|
+
dmypy.json
|
|
130
|
+
|
|
131
|
+
# Pyre type checker
|
|
132
|
+
.pyre/
|
|
133
|
+
|
|
134
|
+
# pytype static type analyzer
|
|
135
|
+
.pytype/
|
|
136
|
+
|
|
137
|
+
# Cython debug symbols
|
|
138
|
+
cython_debug/
|
|
139
|
+
|
|
140
|
+
# Project specific
|
|
141
|
+
*.root
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration #
|
|
3
|
+
# #
|
|
4
|
+
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
|
|
6
|
+
# #
|
|
7
|
+
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
|
+
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
9
|
+
# or submit itself to any jurisdiction. #
|
|
10
|
+
###############################################################################
|
|
11
|
+
stages:
|
|
12
|
+
- test
|
|
13
|
+
# - upload_pypi
|
|
14
|
+
|
|
15
|
+
image: gitlab-registry.cern.ch/lhcb-docker/os-base/alma9-devel
|
|
16
|
+
|
|
17
|
+
.setup_environment:
|
|
18
|
+
before_script:
|
|
19
|
+
- curl -L https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
|
|
20
|
+
- eval "$(./bin/micromamba shell hook -s posix)"
|
|
21
|
+
- micromamba create -c conda-forge --yes --name lbexec-dev typer lbenv ipython black pre-commit pytest apptainer root
|
|
22
|
+
- micromamba activate lbexec-dev
|
|
23
|
+
- pip install -e .[testing] LbCondaWrappers
|
|
24
|
+
|
|
25
|
+
pre-commit:
|
|
26
|
+
image: registry.cern.ch/docker.io/library/python:3.12
|
|
27
|
+
stage: test
|
|
28
|
+
rules:
|
|
29
|
+
- when: always
|
|
30
|
+
before_script:
|
|
31
|
+
- pip install pre-commit
|
|
32
|
+
script:
|
|
33
|
+
- pre-commit run --all-files
|
|
34
|
+
variables:
|
|
35
|
+
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|
|
36
|
+
|
|
37
|
+
pylint:
|
|
38
|
+
extends: .setup_environment
|
|
39
|
+
stage: test
|
|
40
|
+
rules:
|
|
41
|
+
- when: always
|
|
42
|
+
script:
|
|
43
|
+
- pylint src/LbExec
|
|
44
|
+
|
|
45
|
+
mypy:
|
|
46
|
+
extends: .setup_environment
|
|
47
|
+
stage: test
|
|
48
|
+
rules:
|
|
49
|
+
- when: always
|
|
50
|
+
script:
|
|
51
|
+
- mypy --strict-optional src/LbExec
|
|
52
|
+
|
|
53
|
+
pytest:
|
|
54
|
+
extends: .setup_environment
|
|
55
|
+
stage: test
|
|
56
|
+
rules:
|
|
57
|
+
- when: always
|
|
58
|
+
script:
|
|
59
|
+
- pytest
|
|
60
|
+
|
|
61
|
+
# deploy-to-pypi:
|
|
62
|
+
# stage: upload_pypi
|
|
63
|
+
# only:
|
|
64
|
+
# - tags@lhcb-core/lbexec
|
|
65
|
+
# image: registry.cern.ch/docker.io/library/python:3.12
|
|
66
|
+
# before_script:
|
|
67
|
+
# - pip install build twine
|
|
68
|
+
# script:
|
|
69
|
+
# - python -m build
|
|
70
|
+
# - if [ -z "$TWINE_PASSWORD" ] ; then echo "Set TWINE_PASSWORD in CI variables" ; exit 1 ; fi
|
|
71
|
+
# - twine upload -u __token__ dist/*
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# See https://pre-commit.com for more information
|
|
2
|
+
# See https://pre-commit.com/hooks.html for more hooks
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v5.0.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: trailing-whitespace
|
|
9
|
+
- id: end-of-file-fixer
|
|
10
|
+
- id: check-yaml
|
|
11
|
+
- id: check-added-large-files
|
|
12
|
+
- id: no-commit-to-branch
|
|
13
|
+
args: [--branch, main]
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/pycqa/isort
|
|
16
|
+
rev: 5.13.2
|
|
17
|
+
hooks:
|
|
18
|
+
- id: isort
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/psf/black
|
|
21
|
+
rev: 24.10.0
|
|
22
|
+
hooks:
|
|
23
|
+
- id: black
|
|
24
|
+
|
|
25
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
26
|
+
# Ruff version.
|
|
27
|
+
rev: v0.6.9
|
|
28
|
+
hooks:
|
|
29
|
+
# Run the linter.
|
|
30
|
+
- id: ruff
|
|
31
|
+
args: [ --fix ]
|
|
32
|
+
exclude: ^tests
|
|
33
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
34
|
+
rev: v1.11.2
|
|
35
|
+
hooks:
|
|
36
|
+
- id: mypy
|
|
37
|
+
args: [--strict-optional, --ignore-missing-imports]
|
|
38
|
+
additional_dependencies: [types-PyYAML, pydantic]
|
|
39
|
+
exclude: ^tests/
|
|
40
|
+
- repo: "https://gitlab.cern.ch/lhcb-core/LbDevTools.git"
|
|
41
|
+
rev: 2.0.42
|
|
42
|
+
hooks:
|
|
43
|
+
- id: lb-add-copyright
|