Skip to content

Commit

Permalink
Use src instead of lib for modules
Browse files Browse the repository at this point in the history
Replace use of lib/ folder with src/ which is preferable as it causes
less problems. This solder is also recognized and used by multiple
tools without extra configurations.

Lib was more problematic because it also happens to be on the default
.gitignore file on new repositories.

Related: microsoft/pylance-release#236
  • Loading branch information
ssbarnea committed Nov 17, 2020
1 parent 5f5f73b commit bb99bd3
Show file tree
Hide file tree
Showing 213 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
- id: mypy
# empty args needed in order to match mypy cli behavior
args: []
entry: mypy lib/
entry: mypy src/
pass_filenames: false
additional_dependencies:
- packaging
Expand Down
6 changes: 3 additions & 3 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Based on ansible-lint config
extends: default
ignore: |
lib/molecule/cookiecutter/scenario/driver/delegated/{{cookiecutter.molecule_directory}}
lib/molecule/cookiecutter/molecule/{{cookiecutter.role_name}}
lib/molecule/cookiecutter/scenario/verifier/ansible/{{cookiecutter.molecule_directory}}
src/molecule/cookiecutter/scenario/driver/delegated/{{cookiecutter.molecule_directory}}
src/molecule/cookiecutter/molecule/{{cookiecutter.role_name}}
src/molecule/cookiecutter/scenario/verifier/ansible/{{cookiecutter.molecule_directory}}
rules:
braces:
max-spaces-inside: 1
Expand Down
26 changes: 13 additions & 13 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ include .pylintrc
include .yamllint
include mypy.ini
include tox.ini
include lib/molecule/test/functional/.ansible-lint
include src/molecule/test/functional/.ansible-lint
include .config/molecule/config.yml
recursive-include docs *.ico
recursive-include docs *.png
recursive-include docs *.py
recursive-include docs *.rst
recursive-include lib *.flake8
recursive-include lib *.j2
recursive-include lib *.json
recursive-include lib *.md
recursive-include lib *.py
recursive-include lib *.rst
recursive-include lib *.typed
recursive-include lib *.yaml
recursive-include lib *.yamllint
recursive-include lib *.yml
recursive-include src *.flake8
recursive-include src *.j2
recursive-include src *.json
recursive-include src *.md
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.typed
recursive-include src *.yaml
recursive-include src *.yamllint
recursive-include src *.yml
recursive-include playbooks *.yaml
recursive-include snap *.yaml
recursive-include tools *.sh
recursive-include lib/molecule/test/scenarios extra-host
recursive-include lib/molecule/test/scenarios hosts
recursive-include src/molecule/test/scenarios extra-host
recursive-include src/molecule/test/scenarios hosts
recursive-exclude .github *.*
recursive-exclude .mypy_cache *.*
recursive-exclude docs/docstree/html *.*
Expand Down
10 changes: 5 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ keywords =
use_scm_version = True
python_requires = >=3.6
package_dir =
= lib
= src
packages = find:
include_package_data = True
zip_safe = False
Expand Down Expand Up @@ -137,14 +137,14 @@ molecule.verifier =
ansible = molecule.verifier.ansible:Ansible

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

[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 lib/molecule/test/scenarios lib/molecule/test/resources
testpaths = lib/molecule/test/
norecursedirs = dist doc build .tox .eggs src/molecule/test/scenarios src/molecule/test/resources
testpaths = src/molecule/test/
filterwarnings =
# treat warnings as errors unless we add them below
error
Expand All @@ -165,4 +165,4 @@ ignore = E741,W503,W504,H,E501,E203,D102
max-line-length = 88
per-file-ignores =
docs/conf.py: D
lib/molecule/test/*: D100,D103,D104
src/molecule/test/*: D100,D103,D104
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.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,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 lib/molecule/test/unit/ {env:_EXTRAS} {env:PYTEST_ADDOPTS:} {posargs}
python -m pytest src/molecule/test/unit/ {env:_EXTRAS} {env:PYTEST_ADDOPTS:} {posargs}

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

0 comments on commit bb99bd3

Please sign in to comment.