edq-utils 0.0.8__tar.gz → 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.
Potentially problematic release.
This version of edq-utils might be problematic. Click here for more details.
- {edq_utils-0.0.8 → edq_utils-0.1.1}/.github/workflows/main.yml +69 -2
- {edq_utils-0.0.8 → edq_utils-0.1.1}/PKG-INFO +8 -1
- {edq_utils-0.0.8 → edq_utils-0.1.1}/README.md +6 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/__init__.py +1 -1
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/net.py +7 -2
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq_utils.egg-info/PKG-INFO +8 -1
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq_utils.egg-info/SOURCES.txt +6 -1
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq_utils.egg-info/requires.txt +1 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/requirements.txt +1 -0
- edq_utils-0.1.1/scripts/build_site.sh +113 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/scripts/gen_docs.sh +1 -1
- edq_utils-0.1.1/scripts/template/html/css/style.css +20 -0
- edq_utils-0.1.1/scripts/template/html/favicon.ico +0 -0
- edq_utils-0.1.1/scripts/template/html/images/favicon.png +0 -0
- edq_utils-0.1.1/scripts/template/html/index.html +32 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/.gitignore +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/.mypy.ini +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/.pylintrc +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/LICENSE +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/__init__.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/config/__init__.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/config/list.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/http/__init__.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/http/exchange-server.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/http/send-exchange.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/http/verify-exchanges.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/testing/__init__.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/testing/cli-test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/cli/version.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/core/__init__.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/core/argparser.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/core/argparser_test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/core/config.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/core/config_test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/core/log.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/core/version.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/procedure/__init__.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/procedure/verify_exchanges.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/py.typed +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/__init__.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/asserts.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/cli.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/cli_test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/httpserver.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/httpserver_test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/run.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/data/configs/empty/edq-config.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/data/configs/simple-1/edq-config.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/data/configs/simple-2/edq-config.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/data/configs/value-number/edq-config.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/config/list/config_list_base.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/config/list/config_list_config_value_number.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/config/list/config_list_ignore_config.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/config/list/config_list_no_config.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/config/list/config_list_show_origin.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/config/list/config_list_skip_header.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/platform_skip.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/version_base.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_anchor.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file_binary.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file_get_params.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file_multiple.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file_name.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file_post_multiple.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file_post_params.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_headers.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_jsonresponse_dict.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_jsonresponse_list.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_params.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_post.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_post_params.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_post_urlparams.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_urlparams.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/specialcase_listparams_explicit.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/specialcase_listparams_url.httpex.json +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/files/a.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/files/tiny.png +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/unittest.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/__init__.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/dirent.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/dirent_test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/json.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/json_test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/pyimport.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/pyimport_test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/reflection.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/time.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq/util/time_test.py +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq_utils.egg-info/dependency_links.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/edq_utils.egg-info/top_level.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/pyproject.toml +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/requirements-dev.txt +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/scripts/check_all.sh +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/scripts/check_lint.sh +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/scripts/check_python_version.sh +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/scripts/check_strict_types.sh +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/scripts/check_types.sh +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/scripts/run_tests.sh +0 -0
- {edq_utils-0.0.8 → edq_utils-0.1.1}/setup.cfg +0 -0
|
@@ -51,13 +51,80 @@ jobs:
|
|
|
51
51
|
shell: bash
|
|
52
52
|
run: ./scripts/run_tests.sh
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
docs:
|
|
55
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
|
+
)
|
|
56
123
|
|
|
57
124
|
strategy:
|
|
58
125
|
matrix:
|
|
59
126
|
python-version: ['3.11']
|
|
60
|
-
os: ['ubuntu-
|
|
127
|
+
os: ['ubuntu-24.04']
|
|
61
128
|
|
|
62
129
|
runs-on: ${{ matrix.os }}
|
|
63
130
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: edq-utils
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Common utilities used by EduLinq Python projects.
|
|
5
5
|
Author-email: Eriq Augustine <eriq@edulinq.org>
|
|
6
6
|
License: MIT License
|
|
@@ -35,6 +35,7 @@ Requires-Python: >=3.8
|
|
|
35
35
|
Description-Content-Type: text/markdown
|
|
36
36
|
License-File: LICENSE
|
|
37
37
|
Requires-Dist: json5>=0.9.14
|
|
38
|
+
Requires-Dist: platformdirs
|
|
38
39
|
Requires-Dist: requests
|
|
39
40
|
Requires-Dist: requests-toolbelt
|
|
40
41
|
Provides-Extra: dev
|
|
@@ -49,6 +50,12 @@ Dynamic: license-file
|
|
|
49
50
|
|
|
50
51
|
Common utilities used by EduLinq Python projects.
|
|
51
52
|
|
|
53
|
+
Links:
|
|
54
|
+
- [API Reference](https://edulinq.github.io/python-utils)
|
|
55
|
+
- [Installation / Requirements](#installation--requirements)
|
|
56
|
+
- [Configuration System](#configuration-system)
|
|
57
|
+
- [Configuration Sources](#configuration-sources)
|
|
58
|
+
|
|
52
59
|
## Installation / Requirements
|
|
53
60
|
|
|
54
61
|
This project requires [Python](https://www.python.org/) >= 3.8.
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Common utilities used by EduLinq Python projects.
|
|
4
4
|
|
|
5
|
+
Links:
|
|
6
|
+
- [API Reference](https://edulinq.github.io/python-utils)
|
|
7
|
+
- [Installation / Requirements](#installation--requirements)
|
|
8
|
+
- [Configuration System](#configuration-system)
|
|
9
|
+
- [Configuration Sources](#configuration-sources)
|
|
10
|
+
|
|
5
11
|
## Installation / Requirements
|
|
6
12
|
|
|
7
13
|
This project requires [Python](https://www.python.org/) >= 3.8.
|
|
@@ -666,6 +666,7 @@ def make_request(method: str, url: str,
|
|
|
666
666
|
params_to_skip: typing.Union[typing.List[str], None] = None,
|
|
667
667
|
http_exchange_extension: str = DEFAULT_HTTP_EXCHANGE_EXTENSION,
|
|
668
668
|
add_http_prefix: bool = True,
|
|
669
|
+
additional_requests_options: typing.Union[typing.Dict[str, typing.Any], None] = None,
|
|
669
670
|
**kwargs: typing.Any) -> typing.Tuple[requests.Response, str]:
|
|
670
671
|
"""
|
|
671
672
|
Make an HTTP request and return the response object and text body.
|
|
@@ -686,6 +687,9 @@ def make_request(method: str, url: str,
|
|
|
686
687
|
if (files is None):
|
|
687
688
|
files = []
|
|
688
689
|
|
|
690
|
+
if (additional_requests_options is None):
|
|
691
|
+
additional_requests_options = {}
|
|
692
|
+
|
|
689
693
|
# Add in the anchor as a header (since it is not traditionally sent in an HTTP request).
|
|
690
694
|
if (send_anchor_header):
|
|
691
695
|
headers = headers.copy()
|
|
@@ -693,11 +697,12 @@ def make_request(method: str, url: str,
|
|
|
693
697
|
parts = urllib.parse.urlparse(url)
|
|
694
698
|
headers[ANCHOR_HEADER_KEY] = parts.fragment.lstrip('#')
|
|
695
699
|
|
|
696
|
-
options =
|
|
700
|
+
options = additional_requests_options.copy()
|
|
701
|
+
options.update({
|
|
697
702
|
'headers': headers,
|
|
698
703
|
'files': files,
|
|
699
704
|
'timeout': timeout_secs,
|
|
700
|
-
}
|
|
705
|
+
})
|
|
701
706
|
|
|
702
707
|
if (method == 'GET'):
|
|
703
708
|
options['params'] = data
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: edq-utils
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Common utilities used by EduLinq Python projects.
|
|
5
5
|
Author-email: Eriq Augustine <eriq@edulinq.org>
|
|
6
6
|
License: MIT License
|
|
@@ -35,6 +35,7 @@ Requires-Python: >=3.8
|
|
|
35
35
|
Description-Content-Type: text/markdown
|
|
36
36
|
License-File: LICENSE
|
|
37
37
|
Requires-Dist: json5>=0.9.14
|
|
38
|
+
Requires-Dist: platformdirs
|
|
38
39
|
Requires-Dist: requests
|
|
39
40
|
Requires-Dist: requests-toolbelt
|
|
40
41
|
Provides-Extra: dev
|
|
@@ -49,6 +50,12 @@ Dynamic: license-file
|
|
|
49
50
|
|
|
50
51
|
Common utilities used by EduLinq Python projects.
|
|
51
52
|
|
|
53
|
+
Links:
|
|
54
|
+
- [API Reference](https://edulinq.github.io/python-utils)
|
|
55
|
+
- [Installation / Requirements](#installation--requirements)
|
|
56
|
+
- [Configuration System](#configuration-system)
|
|
57
|
+
- [Configuration Sources](#configuration-sources)
|
|
58
|
+
|
|
52
59
|
## Installation / Requirements
|
|
53
60
|
|
|
54
61
|
This project requires [Python](https://www.python.org/) >= 3.8.
|
|
@@ -85,10 +85,15 @@ edq_utils.egg-info/SOURCES.txt
|
|
|
85
85
|
edq_utils.egg-info/dependency_links.txt
|
|
86
86
|
edq_utils.egg-info/requires.txt
|
|
87
87
|
edq_utils.egg-info/top_level.txt
|
|
88
|
+
scripts/build_site.sh
|
|
88
89
|
scripts/check_all.sh
|
|
89
90
|
scripts/check_lint.sh
|
|
90
91
|
scripts/check_python_version.sh
|
|
91
92
|
scripts/check_strict_types.sh
|
|
92
93
|
scripts/check_types.sh
|
|
93
94
|
scripts/gen_docs.sh
|
|
94
|
-
scripts/run_tests.sh
|
|
95
|
+
scripts/run_tests.sh
|
|
96
|
+
scripts/template/html/favicon.ico
|
|
97
|
+
scripts/template/html/index.html
|
|
98
|
+
scripts/template/html/css/style.css
|
|
99
|
+
scripts/template/html/images/favicon.png
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Create a full website including all documentation ready to be deployed.
|
|
4
|
+
# This script should only be done from a clean repo on the main branch.
|
|
5
|
+
# Documentation will be generated from the main branch (latest) as well as each version tag.
|
|
6
|
+
|
|
7
|
+
readonly THIS_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd | xargs realpath)"
|
|
8
|
+
readonly ROOT_DIR="${THIS_DIR}/.."
|
|
9
|
+
readonly TEMPLATE_HTML_DIR="${THIS_DIR}/template/html"
|
|
10
|
+
readonly BUILD_DIR="${ROOT_DIR}/build"
|
|
11
|
+
readonly DOCS_BUILD_DIR="${BUILD_DIR}/html"
|
|
12
|
+
readonly SITE_BUILD_DIR="${BUILD_DIR}/site"
|
|
13
|
+
readonly DOCS_DIRNAME='docs'
|
|
14
|
+
readonly DOCS_OUT_DIR="${SITE_BUILD_DIR}/${DOCS_DIRNAME}"
|
|
15
|
+
readonly GEN_DOCS_SCRIPT="${THIS_DIR}/gen_docs.sh"
|
|
16
|
+
|
|
17
|
+
readonly MAIN_BRANCH="main"
|
|
18
|
+
|
|
19
|
+
readonly REPO='edulinq/python-utils'
|
|
20
|
+
readonly REPO_DISPLAY_NAME='EduLinq Python Utils'
|
|
21
|
+
readonly REPO_MAIN_PACKAGE_NAME='edq'
|
|
22
|
+
|
|
23
|
+
readonly INDEX_TITLE_LOCATION='<header class="pdoc">'
|
|
24
|
+
readonly MODULE_TITLE_LOCATION='<section class="module-info">'
|
|
25
|
+
|
|
26
|
+
readonly API_DOC_MARKER='<!-- API-DOC-MARKER -->'
|
|
27
|
+
|
|
28
|
+
# Don't generate any docs for this version or earlier.
|
|
29
|
+
# Because of this specific tag, we can just do a lexicographic comparison.
|
|
30
|
+
readonly ONLY_AFTER_TAG='v0.1.0'
|
|
31
|
+
|
|
32
|
+
function check_git() {
|
|
33
|
+
if [ ! -z "$(git status --porcelain)" ] ; then
|
|
34
|
+
echo "ERROR: Repository is not clean."
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
if [ $(git branch --show-current) != 'main' ] ; then
|
|
39
|
+
echo "ERROR: Repository is not on the main branch."
|
|
40
|
+
exit 2
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
return 0
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function gen_docs() {
|
|
47
|
+
local label=$1
|
|
48
|
+
local reference=$2
|
|
49
|
+
local dirname=$3
|
|
50
|
+
|
|
51
|
+
echo "Generating docs for '${label}'."
|
|
52
|
+
|
|
53
|
+
rm -rf "${DOCS_BUILD_DIR}"
|
|
54
|
+
${GEN_DOCS_SCRIPT} "${DOCS_BUILD_DIR}"
|
|
55
|
+
|
|
56
|
+
# Add in the label to the landing pages.
|
|
57
|
+
local git_link="https://github.com/${REPO}/tree/${reference}"
|
|
58
|
+
|
|
59
|
+
local index_title="<h1 style='flex-grow: 1'>${REPO_DISPLAY_NAME} API Reference: <a href='${git_link}'>${label}</a></h1>"
|
|
60
|
+
sed -i "s#${INDEX_TITLE_LOCATION}#${INDEX_TITLE_LOCATION}${index_title}#" "${DOCS_BUILD_DIR}/index.html"
|
|
61
|
+
|
|
62
|
+
local module_title="<h1>${REPO_DISPLAY_NAME} API Reference: <a href='${git_link}'>${label}</a></h1>"
|
|
63
|
+
sed -i "s#${MODULE_TITLE_LOCATION}#${MODULE_TITLE_LOCATION}${module_title}#" "${DOCS_BUILD_DIR}/${REPO_MAIN_PACKAGE_NAME}.html"
|
|
64
|
+
|
|
65
|
+
# Moved the compiled documentation to the main site.
|
|
66
|
+
mkdir -p "${DOCS_OUT_DIR}"
|
|
67
|
+
mv "${DOCS_BUILD_DIR}" "${DOCS_OUT_DIR}/${dirname}"
|
|
68
|
+
|
|
69
|
+
# Add this documentation to the main index page.
|
|
70
|
+
local index_li="<li><a href='${DOCS_DIRNAME}/${dirname}/index.html'>${label}</a></li>"
|
|
71
|
+
sed -i "s#${API_DOC_MARKER}#${index_li}${API_DOC_MARKER}#" "${SITE_BUILD_DIR}/index.html"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function main() {
|
|
75
|
+
if [[ $# -ne 0 ]]; then
|
|
76
|
+
echo "USAGE: $0"
|
|
77
|
+
exit 1
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
set -e
|
|
81
|
+
trap exit SIGINT
|
|
82
|
+
|
|
83
|
+
cd "${ROOT_DIR}"
|
|
84
|
+
|
|
85
|
+
# Remove any existing output.
|
|
86
|
+
rm -rf "${SITE_BUILD_DIR}"
|
|
87
|
+
mkdir -p "${SITE_BUILD_DIR}"
|
|
88
|
+
cp -r "${TEMPLATE_HTML_DIR}"/* "${SITE_BUILD_DIR}"/
|
|
89
|
+
|
|
90
|
+
# Ensure that the repo looks good.
|
|
91
|
+
check_git
|
|
92
|
+
|
|
93
|
+
# Generate the latest documentation.
|
|
94
|
+
local git_hash=$(git rev-parse --short HEAD)
|
|
95
|
+
gen_docs "latest (${git_hash})" "${git_hash}" 'latest'
|
|
96
|
+
|
|
97
|
+
# Generate docs for each tagged version.
|
|
98
|
+
for tag in $(git tag -l | grep -P '^v\d+\.\d+\.\d+' | sort -r --version-sort) ; do
|
|
99
|
+
if [[ ! "${tag}" > "${ONLY_AFTER_TAG}" ]] ; then
|
|
100
|
+
continue
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
git checkout --quiet "${tag}"
|
|
104
|
+
gen_docs "${tag}" "${tag}" "${tag}"
|
|
105
|
+
done
|
|
106
|
+
|
|
107
|
+
# Move back to main.
|
|
108
|
+
git checkout --quiet main
|
|
109
|
+
|
|
110
|
+
return 0
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && main "$@"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
ul {
|
|
2
|
+
margin: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
h1, p {
|
|
6
|
+
margin: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.page {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
flex-wrap: nowrap;
|
|
15
|
+
justify-content: flex-start;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 2em;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset='utf-8'/>
|
|
5
|
+
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
|
6
|
+
|
|
7
|
+
<title>EduLinq Python Utils</title>
|
|
8
|
+
|
|
9
|
+
<link rel="icon" href="images/favicon.png">
|
|
10
|
+
|
|
11
|
+
<link rel='stylesheet' type='text/css' href='css/style.css'>
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div class='page'>
|
|
15
|
+
<h1>EduLinq Python Utils</h1>
|
|
16
|
+
|
|
17
|
+
<div class='overview'>
|
|
18
|
+
<p>Common Python utilities used by EduLinq.</p>
|
|
19
|
+
<p>You can find the main repository at <a href='https://github.com/edulinq/python-utils'>github.com/edulinq/python-utils</a>.</p>
|
|
20
|
+
<p>Below you can find API references for various different version.</p>
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class='docs'>
|
|
25
|
+
<span>Versions:</span>
|
|
26
|
+
<ul>
|
|
27
|
+
<!-- API-DOC-MARKER -->
|
|
28
|
+
</ul>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</body>
|
|
32
|
+
</html>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/data/configs/empty/edq-config.json
RENAMED
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/data/configs/simple-1/edq-config.json
RENAMED
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/data/configs/simple-2/edq-config.json
RENAMED
|
File without changes
|
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/cli/tests/config/list/config_list_base.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_anchor.httpex.json
RENAMED
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file.httpex.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_file_name.httpex.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_headers.httpex.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_params.httpex.json
RENAMED
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_post.httpex.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{edq_utils-0.0.8 → edq_utils-0.1.1}/edq/testing/testdata/http/exchanges/simple_urlparams.httpex.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|