edq-utils 0.2.5__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 (112) hide show
  1. edq_utils-0.2.5/.github/workflows/main.yml +162 -0
  2. edq_utils-0.2.5/.gitignore +33 -0
  3. edq_utils-0.2.5/.mypy.ini +12 -0
  4. edq_utils-0.2.5/.pylintrc +660 -0
  5. edq_utils-0.2.5/LICENSE +21 -0
  6. edq_utils-0.2.5/PKG-INFO +164 -0
  7. edq_utils-0.2.5/README.md +116 -0
  8. edq_utils-0.2.5/edq/__init__.py +5 -0
  9. edq_utils-0.2.5/edq/cli/__init__.py +0 -0
  10. edq_utils-0.2.5/edq/cli/__main__.py +17 -0
  11. edq_utils-0.2.5/edq/cli/config/__init__.py +3 -0
  12. edq_utils-0.2.5/edq/cli/config/__main__.py +15 -0
  13. edq_utils-0.2.5/edq/cli/config/list.py +69 -0
  14. edq_utils-0.2.5/edq/cli/http/__init__.py +3 -0
  15. edq_utils-0.2.5/edq/cli/http/__main__.py +15 -0
  16. edq_utils-0.2.5/edq/cli/http/exchange-server.py +71 -0
  17. edq_utils-0.2.5/edq/cli/http/send-exchange.py +45 -0
  18. edq_utils-0.2.5/edq/cli/http/verify-exchanges.py +38 -0
  19. edq_utils-0.2.5/edq/cli/testing/__init__.py +3 -0
  20. edq_utils-0.2.5/edq/cli/testing/__main__.py +15 -0
  21. edq_utils-0.2.5/edq/cli/testing/cli-test.py +49 -0
  22. edq_utils-0.2.5/edq/cli/version.py +28 -0
  23. edq_utils-0.2.5/edq/core/__init__.py +0 -0
  24. edq_utils-0.2.5/edq/core/argparser.py +137 -0
  25. edq_utils-0.2.5/edq/core/argparser_test.py +124 -0
  26. edq_utils-0.2.5/edq/core/config.py +268 -0
  27. edq_utils-0.2.5/edq/core/config_test.py +1038 -0
  28. edq_utils-0.2.5/edq/core/log.py +101 -0
  29. edq_utils-0.2.5/edq/core/version.py +6 -0
  30. edq_utils-0.2.5/edq/procedure/__init__.py +0 -0
  31. edq_utils-0.2.5/edq/procedure/verify_exchanges.py +85 -0
  32. edq_utils-0.2.5/edq/py.typed +0 -0
  33. edq_utils-0.2.5/edq/testing/__init__.py +3 -0
  34. edq_utils-0.2.5/edq/testing/asserts.py +65 -0
  35. edq_utils-0.2.5/edq/testing/cli.py +360 -0
  36. edq_utils-0.2.5/edq/testing/cli_test.py +15 -0
  37. edq_utils-0.2.5/edq/testing/httpserver.py +584 -0
  38. edq_utils-0.2.5/edq/testing/httpserver_test.py +424 -0
  39. edq_utils-0.2.5/edq/testing/run.py +142 -0
  40. edq_utils-0.2.5/edq/testing/serverrunner.py +284 -0
  41. edq_utils-0.2.5/edq/testing/testdata/cli/data/configs/empty/edq-config.json +1 -0
  42. edq_utils-0.2.5/edq/testing/testdata/cli/data/configs/simple-1/edq-config.json +4 -0
  43. edq_utils-0.2.5/edq/testing/testdata/cli/data/configs/simple-2/edq-config.json +3 -0
  44. edq_utils-0.2.5/edq/testing/testdata/cli/data/configs/value-number/edq-config.json +3 -0
  45. edq_utils-0.2.5/edq/testing/testdata/cli/tests/config/list/config_list_base.txt +16 -0
  46. edq_utils-0.2.5/edq/testing/testdata/cli/tests/config/list/config_list_config_value_number.txt +10 -0
  47. edq_utils-0.2.5/edq/testing/testdata/cli/tests/config/list/config_list_ignore_config.txt +14 -0
  48. edq_utils-0.2.5/edq/testing/testdata/cli/tests/config/list/config_list_no_config.txt +8 -0
  49. edq_utils-0.2.5/edq/testing/testdata/cli/tests/config/list/config_list_show_origin.txt +13 -0
  50. edq_utils-0.2.5/edq/testing/testdata/cli/tests/config/list/config_list_skip_header.txt +10 -0
  51. edq_utils-0.2.5/edq/testing/testdata/cli/tests/help_base.txt +9 -0
  52. edq_utils-0.2.5/edq/testing/testdata/cli/tests/platform_skip.txt +5 -0
  53. edq_utils-0.2.5/edq/testing/testdata/cli/tests/version_base.txt +6 -0
  54. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple.httpex.json +5 -0
  55. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_anchor.httpex.json +5 -0
  56. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_file.httpex.json +10 -0
  57. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_file_binary.httpex.json +10 -0
  58. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_file_get_params.httpex.json +14 -0
  59. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_file_multiple.httpex.json +13 -0
  60. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_file_name.httpex.json +11 -0
  61. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_file_post_multiple.httpex.json +13 -0
  62. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_file_post_params.httpex.json +14 -0
  63. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_headers.httpex.json +8 -0
  64. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_jsonresponse_dict.httpex.json +7 -0
  65. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_jsonresponse_list.httpex.json +9 -0
  66. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_params.httpex.json +9 -0
  67. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_post.httpex.json +5 -0
  68. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_post_params.httpex.json +9 -0
  69. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_post_urlparams.httpex.json +5 -0
  70. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/simple_urlparams.httpex.json +5 -0
  71. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/specialcase_listparams_explicit.httpex.json +8 -0
  72. edq_utils-0.2.5/edq/testing/testdata/http/exchanges/specialcase_listparams_url.httpex.json +5 -0
  73. edq_utils-0.2.5/edq/testing/testdata/http/files/a.txt +1 -0
  74. edq_utils-0.2.5/edq/testing/testdata/http/files/tiny.png +0 -0
  75. edq_utils-0.2.5/edq/testing/unittest.py +88 -0
  76. edq_utils-0.2.5/edq/util/__init__.py +3 -0
  77. edq_utils-0.2.5/edq/util/cli.py +151 -0
  78. edq_utils-0.2.5/edq/util/dirent.py +346 -0
  79. edq_utils-0.2.5/edq/util/dirent_test.py +1004 -0
  80. edq_utils-0.2.5/edq/util/encoding.py +18 -0
  81. edq_utils-0.2.5/edq/util/hash.py +41 -0
  82. edq_utils-0.2.5/edq/util/hash_test.py +89 -0
  83. edq_utils-0.2.5/edq/util/json.py +180 -0
  84. edq_utils-0.2.5/edq/util/json_test.py +228 -0
  85. edq_utils-0.2.5/edq/util/net.py +1047 -0
  86. edq_utils-0.2.5/edq/util/parse.py +33 -0
  87. edq_utils-0.2.5/edq/util/pyimport.py +94 -0
  88. edq_utils-0.2.5/edq/util/pyimport_test.py +119 -0
  89. edq_utils-0.2.5/edq/util/reflection.py +32 -0
  90. edq_utils-0.2.5/edq/util/time.py +75 -0
  91. edq_utils-0.2.5/edq/util/time_test.py +107 -0
  92. edq_utils-0.2.5/edq_utils.egg-info/PKG-INFO +164 -0
  93. edq_utils-0.2.5/edq_utils.egg-info/SOURCES.txt +110 -0
  94. edq_utils-0.2.5/edq_utils.egg-info/dependency_links.txt +1 -0
  95. edq_utils-0.2.5/edq_utils.egg-info/requires.txt +11 -0
  96. edq_utils-0.2.5/edq_utils.egg-info/top_level.txt +1 -0
  97. edq_utils-0.2.5/pyproject.toml +53 -0
  98. edq_utils-0.2.5/requirements-dev.txt +5 -0
  99. edq_utils-0.2.5/requirements.txt +4 -0
  100. edq_utils-0.2.5/scripts/build_site.sh +113 -0
  101. edq_utils-0.2.5/scripts/check_all.sh +50 -0
  102. edq_utils-0.2.5/scripts/check_lint.sh +23 -0
  103. edq_utils-0.2.5/scripts/check_python_version.sh +23 -0
  104. edq_utils-0.2.5/scripts/check_strict_types.sh +23 -0
  105. edq_utils-0.2.5/scripts/check_types.sh +23 -0
  106. edq_utils-0.2.5/scripts/gen_docs.sh +30 -0
  107. edq_utils-0.2.5/scripts/run_tests.sh +18 -0
  108. edq_utils-0.2.5/scripts/template/html/css/style.css +20 -0
  109. edq_utils-0.2.5/scripts/template/html/favicon.ico +0 -0
  110. edq_utils-0.2.5/scripts/template/html/images/favicon.png +0 -0
  111. edq_utils-0.2.5/scripts/template/html/index.html +32 -0
  112. edq_utils-0.2.5/setup.cfg +4 -0
@@ -0,0 +1,162 @@
1
+ name: Main
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ test:
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
13
+ os: ['ubuntu-22.04', 'ubuntu-24.04', 'macos-14', 'macos-15', 'windows-2022', 'windows-2025']
14
+
15
+ runs-on: ${{ matrix.os }}
16
+
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v5
23
+ env:
24
+ PIP_DISABLE_PIP_VERSION_CHECK: 1
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Cache Python Dependencies
29
+ uses: actions/cache@v4
30
+ with:
31
+ path: ${{ env.pythonLocation }}
32
+ key: ${{ runner.os }}-os:${{ matrix.os }}-python:${{ matrix.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('pyproject.toml') }}
33
+
34
+ - name: Install Dependencies
35
+ shell: bash
36
+ run: pip3 install -r requirements.txt -r requirements-dev.txt
37
+
38
+ - name: Check Python Version Compatibility
39
+ shell: bash
40
+ run: scripts/check_python_version.sh
41
+
42
+ - name: Check Types
43
+ shell: bash
44
+ run: ./scripts/check_types.sh
45
+
46
+ - name: Check Lint
47
+ shell: bash
48
+ run: ./scripts/check_lint.sh
49
+
50
+ - name: Run Tests
51
+ shell: bash
52
+ run: ./scripts/run_tests.sh
53
+
54
+ docs:
55
+ needs: test
56
+ if: ${{ github.event_name == 'push' && github.repository_owner == 'edulinq' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
57
+
58
+ permissions:
59
+ contents: read
60
+ pages: write
61
+ id-token: write
62
+
63
+ environment:
64
+ name: github-pages
65
+ url: ${{ steps.deployment.outputs.page_url }}
66
+
67
+ strategy:
68
+ matrix:
69
+ python-version: ['3.11']
70
+ os: ['ubuntu-24.04']
71
+
72
+ runs-on: ${{ matrix.os }}
73
+
74
+ steps:
75
+ - name: Checkout
76
+ uses: actions/checkout@v4
77
+ with:
78
+ fetch-depth: 0
79
+ fetch-tags: true
80
+
81
+ - name: Set up Python ${{ matrix.python-version }}
82
+ uses: actions/setup-python@v5
83
+ with:
84
+ python-version: ${{ matrix.python-version }}
85
+
86
+ - name: Cache Python Dependencies
87
+ uses: actions/cache@v4
88
+ with:
89
+ path: ${{ env.pythonLocation }}
90
+ key: ${{ runner.os }}-os:${{ matrix.os }}-python:${{ matrix.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
91
+
92
+ - name: Install Dependencies
93
+ shell: bash
94
+ run: pip install -r requirements.txt -r requirements-dev.txt
95
+
96
+ - name: Setup Pages
97
+ uses: actions/configure-pages@v5
98
+
99
+ - name: Build Site
100
+ shell: bash
101
+ run: |
102
+ git checkout main
103
+ ./scripts/build_site.sh
104
+
105
+ - name: Upload Artifact
106
+ uses: actions/upload-pages-artifact@v3
107
+ with:
108
+ path: 'build/site'
109
+
110
+ - name: Deploy to GitHub Pages
111
+ id: deployment
112
+ uses: actions/deploy-pages@v4
113
+
114
+ deploy:
115
+ # Run after test and docs, but allow docs to have been skipped (since we will only test deploy then).
116
+ needs: [test, docs]
117
+ if: |
118
+ (always() && !cancelled())
119
+ && (
120
+ (needs.test.result == 'success')
121
+ && ((needs.docs.result == 'success') || (needs.docs.result == 'skipped'))
122
+ )
123
+
124
+ strategy:
125
+ matrix:
126
+ python-version: ['3.11']
127
+ os: ['ubuntu-24.04']
128
+
129
+ runs-on: ${{ matrix.os }}
130
+
131
+ steps:
132
+ - name: Checkout
133
+ uses: actions/checkout@v4
134
+
135
+ - name: Set Up Python ${{ matrix.python-version }}
136
+ uses: actions/setup-python@v5
137
+ env:
138
+ PIP_DISABLE_PIP_VERSION_CHECK: 1
139
+ with:
140
+ python-version: ${{ matrix.python-version }}
141
+
142
+ - name: Cache Python Dependencies
143
+ uses: actions/cache@v4
144
+ with:
145
+ path: ${{ env.pythonLocation }}
146
+ key: ${{ runner.os }}-os:${{ matrix.os }}-python:${{ matrix.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('pyproject.toml') }}
147
+
148
+ - name: Install Python Dependencies
149
+ shell: bash
150
+ run: pip3 install -r requirements.txt -r requirements-dev.txt
151
+
152
+ - name: Generate Documentation
153
+ shell: bash
154
+ run: ./scripts/gen_docs.sh
155
+
156
+ - name: Deploy
157
+ uses: casperdcl/deploy-pypi@10cf4cd83fc885003a8d4f37f93a5a0f0fc2d2f4 # v2.4.1
158
+ with:
159
+ build: --sdist --wheel --outdir dist .
160
+ # Only upload if a tag is pushed (otherwise just build & check).
161
+ upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}
162
+ password: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,33 @@
1
+ # Editor Files
2
+ .DS_Store
3
+ *.swp
4
+
5
+ # Language Dirents
6
+ .ipynb_checkpoints
7
+ node_modules/
8
+ venv/
9
+ *.pyc
10
+ __pycache__/
11
+
12
+ # Common Temp Dirents
13
+ old/
14
+ temp/
15
+ out*/
16
+ /test*
17
+ test/
18
+ /test*.*
19
+
20
+ # Build
21
+ /bin/
22
+ /build/
23
+ /dist/
24
+ *.egg-info
25
+ /html/
26
+ /.mypy_*/
27
+
28
+ # Project-Specific
29
+ *.gif
30
+ *.gz
31
+ /._site/
32
+ *.zip
33
+ *.xcf
@@ -0,0 +1,12 @@
1
+ [mypy]
2
+
3
+ exclude = _test\.py$
4
+
5
+ strict = false
6
+ disable_error_code = type-arg
7
+
8
+ [mypy-requests.*]
9
+ ignore_missing_imports = True
10
+
11
+ [mypy-requests_toolbelt.*]
12
+ ignore_missing_imports = True