wwpdb.utils.testing 0.17.3__tar.gz → 0.19__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.
Files changed (37) hide show
  1. wwpdb_utils_testing-0.19/MANIFEST.in +10 -0
  2. wwpdb_utils_testing-0.19/PKG-INFO +57 -0
  3. wwpdb_utils_testing-0.19/pyproject.toml +47 -0
  4. wwpdb_utils_testing-0.19/requirements.txt +1 -0
  5. wwpdb_utils_testing-0.19/setup.cfg +4 -0
  6. wwpdb_utils_testing-0.19/tox.ini +165 -0
  7. wwpdb_utils_testing-0.19/wwpdb/mock-data/README.md +5 -0
  8. wwpdb_utils_testing-0.19/wwpdb/mock-data/da_top/data/archive/D_000001/D_000001_model_P1.cif.V3 +8943 -0
  9. wwpdb_utils_testing-0.19/wwpdb/mock-data/da_top/resources_ro/actionData.xml +3971 -0
  10. wwpdb_utils_testing-0.19/wwpdb/mock-data/da_top/resources_ro/content_ws/ws_content_type_definitions.json +380 -0
  11. wwpdb_utils_testing-0.19/wwpdb/mock-data/da_top/resources_ro/depui/site_access_info.json +4 -0
  12. wwpdb_utils_testing-0.19/wwpdb/mock-data/da_top/resources_ro/emd/emdb_fsc.xsd +48 -0
  13. wwpdb_utils_testing-0.19/wwpdb/mock-data/da_top/webapps/htdocs/msgmodule/msg_tmplts.html +38 -0
  14. wwpdb_utils_testing-0.19/wwpdb/mock-data/da_top/webapps/htdocs/msgmodule/msging_launch_tmplt.html +467 -0
  15. wwpdb_utils_testing-0.19/wwpdb/mock-data/da_top/webapps/version.json +1 -0
  16. wwpdb_utils_testing-0.19/wwpdb/mock-data/site-config/common/common.cfg +6 -0
  17. wwpdb_utils_testing-0.19/wwpdb/mock-data/site-config/rcsb-east/site_common/common.cfg +4 -0
  18. wwpdb_utils_testing-0.19/wwpdb/mock-data/site-config/rcsb-east/wwpdb_deploy_test/site.cfg +83 -0
  19. {wwpdb.utils.testing-0.17.3 → wwpdb_utils_testing-0.19}/wwpdb/utils/testing/CreateRWTree.py +39 -9
  20. {wwpdb.utils.testing-0.17.3 → wwpdb_utils_testing-0.19}/wwpdb/utils/testing/Features.py +9 -9
  21. {wwpdb.utils.testing-0.17.3 → wwpdb_utils_testing-0.19}/wwpdb/utils/testing/SiteConfigSetup.py +2 -2
  22. {wwpdb.utils.testing-0.17.3 → wwpdb_utils_testing-0.19}/wwpdb/utils/testing/__init__.py +1 -1
  23. wwpdb_utils_testing-0.19/wwpdb.utils.testing.egg-info/PKG-INFO +57 -0
  24. wwpdb_utils_testing-0.19/wwpdb.utils.testing.egg-info/SOURCES.txt +26 -0
  25. {wwpdb.utils.testing-0.17.3 → wwpdb_utils_testing-0.19}/wwpdb.utils.testing.egg-info/top_level.txt +1 -0
  26. wwpdb.utils.testing-0.17.3/PKG-INFO +0 -22
  27. wwpdb.utils.testing-0.17.3/setup.cfg +0 -10
  28. wwpdb.utils.testing-0.17.3/setup.py +0 -64
  29. wwpdb.utils.testing-0.17.3/wwpdb/__init__.py +0 -1
  30. wwpdb.utils.testing-0.17.3/wwpdb/utils/__init__.py +0 -1
  31. wwpdb.utils.testing-0.17.3/wwpdb.utils.testing.egg-info/PKG-INFO +0 -22
  32. wwpdb.utils.testing-0.17.3/wwpdb.utils.testing.egg-info/SOURCES.txt +0 -16
  33. wwpdb.utils.testing-0.17.3/wwpdb.utils.testing.egg-info/not-zip-safe +0 -1
  34. wwpdb.utils.testing-0.17.3/wwpdb.utils.testing.egg-info/requires.txt +0 -6
  35. {wwpdb.utils.testing-0.17.3 → wwpdb_utils_testing-0.19}/LICENSE +0 -0
  36. {wwpdb.utils.testing-0.17.3 → wwpdb_utils_testing-0.19}/README.md +0 -0
  37. {wwpdb.utils.testing-0.17.3 → wwpdb_utils_testing-0.19}/wwpdb.utils.testing.egg-info/dependency_links.txt +0 -0
@@ -0,0 +1,10 @@
1
+ # These are included in sdist - not wheel
2
+ include tox.ini
3
+ include requirements.txt
4
+ include wwpdb/mock-data/README.md
5
+ recursive-include wwpdb/mock-data/site-config *
6
+ recursive-include wwpdb/mock-data/da_top/data/archive *.V3
7
+ recursive-include wwpdb/mock-data/da_top/resources_ro actionData.xml depui/site_access_info.json emd/emdb_fsc.xsd content_ws/*
8
+ recursive-include wwpdb/mock-data/da_top/webapps/htdocs/msgmodule *
9
+ include wwpdb/mock-data/da_top/webapps/version.json
10
+ recursive-include wwpdb/utils/tests-testing *.py
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.1
2
+ Name: wwpdb.utils.testing
3
+ Version: 0.19
4
+ Summary: wwPDB Python DB Schema Utilities
5
+ Author-email: Ezra Peisach <ezra.peisach@rcsb.org>
6
+ License: Apache 2.0
7
+ Project-URL: Homepage, https://github,com/wwpdb/py-wwpdb_utils_testing
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Natural Language :: English
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.6
14
+ Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Requires-Python: >=3.6
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+
20
+ # OneDep Core Testing Library
21
+
22
+ [![Build Status](https://dev.azure.com/wwPDB/wwPDB%20Python%20Projects/_apis/build/status/wwPDB.py-wwpdb_utils_testing?branchName=master)](https://dev.azure.com/wwPDB/wwPDB%20Python%20Projects/_build/latest?definitionId=1&branchName=master)
23
+
24
+ ## Introduction
25
+
26
+ This repository can be used by the test suite to setup/test for running environments
27
+
28
+ The code in here will allow for common setup of site-config harness as
29
+ well of allowing for fixtures to test the environment to determine if
30
+ a test can be invoked.
31
+
32
+ ### Installation
33
+
34
+ Download the library source software from the project repository:
35
+
36
+ ```bash
37
+
38
+ git clone --recurse-submodules https://github.com/wwPDB/py-wwpdb_utils_testing.git
39
+
40
+ ```
41
+
42
+ Optionally, run test suite using the Tox test runner.
43
+
44
+ ```bash
45
+ tox
46
+ ```
47
+
48
+ Installation is via the program [pip](https://pypi.python.org/pypi/pip).
49
+
50
+ ```bash
51
+ pip install wwpdb.utils.testing
52
+
53
+ or from the local repository:
54
+
55
+ pip install .
56
+ ```
57
+
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools >= 69"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "wwpdb.utils.testing"
7
+ authors = [
8
+ {name = "Ezra Peisach", email="ezra.peisach@rcsb.org"}
9
+ ]
10
+ description = "wwPDB Python DB Schema Utilities"
11
+ readme = "README.md"
12
+ requires-python = ">=3.6"
13
+ license = {text = "Apache 2.0"}
14
+ classifiers = [
15
+ "Intended Audience :: Developers",
16
+ "Natural Language :: English",
17
+ "License :: OSI Approved :: Apache Software License",
18
+ "Programming Language :: Python",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.6",
21
+ "Programming Language :: Python :: 3.7",
22
+ "Programming Language :: Python :: 3.8",
23
+ ]
24
+ dependencies = []
25
+ dynamic = ["version"]
26
+
27
+ [project.urls]
28
+ "Homepage" = "https://github,com/wwpdb/py-wwpdb_utils_testing"
29
+
30
+ [tool.setuptools.packages.find]
31
+ where = ["."]
32
+ exclude = ["wwpdb.utils.tests_*"]
33
+ namespaces = true
34
+
35
+ [tool.setuptools.dynamic]
36
+ version = {attr = "wwpdb.utils.testing.__version__"}
37
+
38
+ [tool.setuptools]
39
+ # We turn off the default to not include
40
+ # MANIFEST.in files in wheel - but keep in sdist
41
+ include-package-data = false
42
+
43
+ [tool.setuptools.package-data]
44
+ mypkg = ["*.pyi", "*.rst", "py.typed"]
45
+
46
+ [tool.distutils.bdist_wheel]
47
+ universal = true
@@ -0,0 +1 @@
1
+ # Extra requirements for tox
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,165 @@
1
+ # File: tox.ini (Templated version)
2
+
3
+ #
4
+ ##
5
+ [local_settings]
6
+ # project specific local settings
7
+ test_pattern = "*Test.py"
8
+ #
9
+ # Source pathls (unquoted and space separated list of files/directories) for linting and format checks
10
+ source_paths = wwpdb/utils/testing wwpdb/utils/tests_testing
11
+ #
12
+ # Start directory path for test discovery
13
+ # Each path must reference valid directory that is searchable by python3.9 (i.e. contains __init__.py)
14
+ # ** It is harmless to point to paths containing no tests.
15
+ #
16
+ test_path_1 = "wwpdb/utils/tests_testing"
17
+ # These are placeholders valid source directories without tests files
18
+ test_path_2 = "wwpdb/utils/testing"
19
+ test_path_3 = "wwpdb/utils/testing"
20
+ test_path_4 = "wwpdb/utils/testing"
21
+ #
22
+ mypy_path = "wwpdb"
23
+ #
24
+ # Comma separate list of directories/patterns for which test coverage will be evaluated
25
+ coverage_source_paths = "wwpdb/utils/testing,wwpdb/utils/tests_testing"
26
+ # SiteConfig can only be tested when wwpdb.utils.config available
27
+ coverage_exclude_paths = "wwpdb/__init__.py,wwpdb/utils/testing/SiteConfigSetup.py"
28
+ coverage_cutoff = 65
29
+ #
30
+ ## --------------------------------------------------------------------------
31
+ ## ---------- No project specific setting beyond this point --------------
32
+ # Updated: 3-Jul-2019 jdw Cleanup
33
+ # 8-Jul-2019 jdw Disable flake8 plugin (pydocstyle compat issue)
34
+ # 12-Jul-2019 jdw Add placeholders for up to four test paths
35
+ # 13-Jul-2019 jdw Add coverage exclusion
36
+ # 21-Nov-2019 jdw py27->py39 update black version
37
+ ##
38
+ [tox]
39
+ # The complete list of supported test environments to setup and invoke
40
+ envlist = format_pep8-{py39}, lint_pylint-{py39}, format_black-{py39}, {py39}, test_coverage-{py39}, mypy-{py39}
41
+ #
42
+ minversion = 3.4.0
43
+ skip_missing_interpreters = true
44
+ skipsdist = false
45
+
46
+ [testenv]
47
+ passenv = CONFIG_SUPPORT_TOKEN_ENV
48
+ allowlist_externals = echo
49
+ deps =
50
+ commands =
51
+ echo "Starting default tests in testenv"
52
+ basepython = py313: python3.13
53
+ py312: python3.12
54
+ py311: python3.11
55
+ py310: python3.10
56
+ py39: python3.9
57
+
58
+ [testenv:py3{9,10,11,12,13}]
59
+ description = 'Run unit tests (unittest runner) using {envpython}'
60
+ platform=
61
+ macos: darwin
62
+ linux: linux
63
+ skip_install = false
64
+ recreate = true
65
+ #alwayscopy=true
66
+ usedevelop=true
67
+ deps = -r requirements.txt
68
+ commands =
69
+ echo "Starting {envname}"
70
+ {envpython} -V
71
+ {envpython} -m unittest discover -v --start-directory {[local_settings]test_path_1} --pattern "{[local_settings]test_pattern}"
72
+ {envpython} -m unittest discover -v --start-directory {[local_settings]test_path_2} --pattern "{[local_settings]test_pattern}"
73
+ {envpython} -m unittest discover -v --start-directory {[local_settings]test_path_3} --pattern "{[local_settings]test_pattern}"
74
+ {envpython} -m unittest discover -v --start-directory {[local_settings]test_path_4} --pattern "{[local_settings]test_pattern}"
75
+ echo "Completed {envname}"
76
+
77
+
78
+ [testenv:format_pep8-py3{8,9,10,11,12}]
79
+ description = 'Run selected PEP8 compliance checks (flake8)'
80
+ platform=
81
+ macos: darwin
82
+ linux: linux
83
+ deps =
84
+ flake8
85
+ # This plugin is no longer compatible with latest pydocstyles -
86
+ # flake8-docstrings>=0.2.7
87
+ flake8-import-order>=0.9
88
+ -r requirements.txt
89
+ commands =
90
+ # Exceptions: D for docstrings, I for imports order and formatting, E302 is slice spacing - W503 multiline spacing incompatible with black
91
+ flake8 --max-line-length=185 --ignore=D,I,E203,W503 {[local_settings]source_paths}
92
+
93
+ #
94
+ [testenv:lint_pylint-py3{9,10,11,12,13}]
95
+ description = 'Run linting compliance checks (pylint)'
96
+ platform=
97
+ macos: darwin
98
+ linux: linux
99
+
100
+ deps =
101
+ pylint
102
+ -r requirements.txt
103
+ commands =
104
+ echo "Starting {envname}"
105
+ pylint --disable=R,C --reports=n {[local_settings]source_paths}
106
+ echo "Completed {envname}"
107
+
108
+ #
109
+ [testenv:mypy-py3{8,9,10,11,12,13}]
110
+ description = 'Run typing compliance checks (mypy)'
111
+ platform=
112
+ macos: darwin
113
+ linux: linux
114
+
115
+ deps =
116
+ mypy
117
+ -r requirements.txt
118
+ commands =
119
+ echo "Starting {envname}"
120
+ mypy --strict -p {[local_settings]mypy_path}
121
+ echo "Completed {envname}"
122
+
123
+
124
+ [testenv:format_black-py3{9,10,11,12,13}]
125
+ description = 'Run format compliance checks (black)'
126
+ platform=
127
+ macos: darwin
128
+ linux: linux
129
+ deps =
130
+ black>=19.10b0
131
+ -r requirements.txt
132
+ # isort>=4.3.20
133
+ commands =
134
+ echo "Starting {envname}"
135
+ black --check --line-length 180 {[local_settings]source_paths}
136
+ # isort -rc rcsb/utils --check-only
137
+ echo "Completed {envname}"
138
+
139
+ #
140
+ [testenv:test_coverage-py3{9,10,11,12,13}]
141
+ description = 'Run test coverage analysis'
142
+ platform=
143
+ macos: darwin
144
+ linux: linux
145
+ skip_install = false
146
+ recreate = true
147
+ #alwayscopy=true
148
+ usedevelop=true
149
+ deps =
150
+ coverage
151
+ -r requirements.txt
152
+
153
+ commands =
154
+ echo "Starting {envname}"
155
+ coverage erase
156
+ coverage run --parallel-mode --omit="{[local_settings]coverage_exclude_paths}" --source="{[local_settings]coverage_source_paths}" -m unittest discover -v --start-directory {[local_settings]test_path_1} --pattern "{[local_settings]test_pattern}"
157
+ coverage run --parallel-mode --omit="{[local_settings]coverage_exclude_paths}" --source="{[local_settings]coverage_source_paths}" -m unittest discover -v --start-directory {[local_settings]test_path_2} --pattern "{[local_settings]test_pattern}"
158
+ coverage run --parallel-mode --omit="{[local_settings]coverage_exclude_paths}" --source="{[local_settings]coverage_source_paths}" -m unittest discover -v --start-directory {[local_settings]test_path_3} --pattern "{[local_settings]test_pattern}"
159
+ coverage run --parallel-mode --omit="{[local_settings]coverage_exclude_paths}" --source="{[local_settings]coverage_source_paths}" -m unittest discover -v --start-directory {[local_settings]test_path_4} --pattern "{[local_settings]test_pattern}"
160
+ echo " ------- Consolidating {envname} data ----------"
161
+ coverage combine
162
+ echo " ------- Building {envname} reports ----------"
163
+ coverage report --fail-under={[local_settings]coverage_cutoff}
164
+ - coverage xml
165
+ echo "Completed {envname}"
@@ -0,0 +1,5 @@
1
+ # py-onedep_mock-data
2
+ Mock data and configuration setup for testing OneDep system
3
+
4
+ This should contain only public data. When internal data items are
5
+ used, they should be sanitized.