Skip to content

Commit

Permalink
Moved molecule package under lib folder
Browse files Browse the repository at this point in the history
Brings molecule code layoyut in sync with ansible and ansible-lint.
Keeping packages at root repository level is not a good practice and
can introduce hard to identify bugs during testing.
  • Loading branch information
ssbarnea committed Oct 19, 2020
1 parent 3d7fd11 commit 750f29a
Show file tree
Hide file tree
Showing 208 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -47,7 +47,7 @@ repos:
- id: mypy
# empty args needed in order to match mypy cli behavior
args: []
entry: mypy molecule/
entry: mypy lib/
pass_filenames: false
additional_dependencies:
- packaging
Expand Down
2 changes: 1 addition & 1 deletion .yamllint
@@ -1,7 +1,7 @@
extends: default
ignore: |
*.molecule/
molecule/cookiecutter/
lib/molecule/cookiecutter/
.tox
# HACK: https://github.com/pyupio/pyup/issues/346
.pyup.yml
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 6 additions & 4 deletions setup.cfg
Expand Up @@ -53,6 +53,8 @@ keywords =
[options]
use_scm_version = True
python_requires = >=3.6
package_dir =
= lib
packages = find:
include_package_data = True
zip_safe = False
Expand Down Expand Up @@ -137,14 +139,14 @@ molecule.verifier =
ansible = molecule.verifier.ansible:Ansible

[options.packages.find]
where = .
where = lib

[tool:pytest]
addopts = --doctest-modules --durations 10 --color=yes
doctest_optionflags = ALLOW_UNICODE ELLIPSIS
junit_suite_name = molecule_test_suite
norecursedirs = dist doc build .tox .eggs molecule/test/scenarios molecule/test/resources
testpaths = molecule/test/
norecursedirs = dist doc build .tox .eggs lib/molecule/test/scenarios lib/molecule/test/resources
testpaths = lib/molecule/test/
filterwarnings =
# treat warnings as errors unless we add them below
error
Expand All @@ -165,4 +167,4 @@ ignore = E741,W503,W504,H,E501,E203,D102
max-line-length = 88
per-file-ignores =
docs/conf.py: D
molecule/test/*: D100,D103,D104
lib/molecule/test/*: D100,D103,D104
4 changes: 2 additions & 2 deletions tox.ini
Expand Up @@ -71,7 +71,7 @@ commands =
sh -c "PYTEST_ADDOPTS= python -m pytest -p no:cov --collect-only 2>&1 >{envlogdir}/collect.log"
# -n auto used only on unit as is not supported by functional yet
# html report is used by Zuul CI to display reports
python -m pytest molecule/test/unit/ {env:_EXTRAS} {env:PYTEST_ADDOPTS:} {posargs}
python -m pytest lib/molecule/test/unit/ {env:_EXTRAS} {env:PYTEST_ADDOPTS:} {posargs}


whitelist_externals =
Expand Down Expand Up @@ -127,7 +127,7 @@ extras =
[testenv:dockerfile]
description = Tests validity of embedded Dockerfile template used by docker driver
commands =
ansible-playbook molecule/data/validate-dockerfile.yml
ansible-playbook lib/molecule/data/validate-dockerfile.yml
extras =
docker
selinux
Expand Down

0 comments on commit 750f29a

Please sign in to comment.