auto-reference-generator 1.3.7__tar.gz → 1.3.8__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.
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/.github/workflows/build-portable.yml +97 -13
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/.github/workflows/codeql.yml +5 -4
- auto_reference_generator-1.3.8/.github/workflows/pypi-publish.yml +154 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/.github/workflows/python-tests.yml +7 -3
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/.gitignore +2 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/PKG-INFO +18 -8
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/README.md +17 -7
- auto_reference_generator-1.3.8/auto_reference_generator/__init__.py +30 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator/cli.py +18 -33
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator/hash.py +27 -5
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator/options/options.properties +5 -0
- auto_reference_generator-1.3.7/auto_reference_generator/reference_generator.py → auto_reference_generator-1.3.8/auto_reference_generator/referenceGen.py +60 -38
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator.egg-info/PKG-INFO +18 -8
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator.egg-info/SOURCES.txt +2 -1
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/installer/install.cmd +2 -25
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/installer/uninstall.cmd +2 -25
- auto_reference_generator-1.3.8/optional-requirements.txt +2 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/pyproject.toml +1 -1
- auto_reference_generator-1.3.8/requirements.txt +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/tests/test_hash.py +19 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/tests/test_reference_generator.py +4 -5
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/tests/test_reference_generator_integration.py +1 -1
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/tests/test_reference_loop_and_keywords.py +1 -1
- auto_reference_generator-1.3.7/.github/workflows/pypi-publish.yml +0 -67
- auto_reference_generator-1.3.7/auto_reference_generator/__init__.py +0 -15
- auto_reference_generator-1.3.7/requirements.txt +0 -27
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/.pre-commit-config.yaml +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/LICENSE.md +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/assets/AccessionPreview.png +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/assets/HashPreview.png +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/assets/ReferencesPreview.png +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/assets/SpreadGen.png +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/assets/SpreadPreview.png +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/assets/metaFolder.png +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/assets/sample_from_dict.json +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator/common.py +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator.egg-info/dependency_links.txt +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator.egg-info/entry_points.txt +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator.egg-info/requires.txt +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/auto_reference_generator.egg-info/top_level.txt +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/installer/README.txt +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/installer/auto_ref.cmd +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/pytest.ini +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/samples/auto_reference_generator_AutoRef.xlsx +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/samples/auto_reference_generator_AutoRef_from_json.xlsx +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/samples/sample_json_dict.json +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/setup.cfg +0 -0
- {auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/tests/test_common.py +0 -0
|
@@ -3,21 +3,93 @@ name: Build Portable Executables with Nuitka
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
tags:
|
|
6
|
-
- '
|
|
7
|
-
|
|
6
|
+
- '*'
|
|
7
|
+
paths-ignore:
|
|
8
|
+
- 'README.md'
|
|
9
|
+
- 'docs/**'
|
|
10
|
+
- 'assets/**'
|
|
11
|
+
- '.github/**'
|
|
12
|
+
pull_request:
|
|
13
|
+
branches:
|
|
14
|
+
- dev
|
|
15
|
+
- master
|
|
16
|
+
paths-ignore:
|
|
17
|
+
- 'README.md'
|
|
18
|
+
- 'docs/**'
|
|
19
|
+
- 'assets/**'
|
|
20
|
+
- '.github/**'
|
|
8
21
|
|
|
9
22
|
permissions:
|
|
10
23
|
contents: write
|
|
11
24
|
|
|
12
25
|
jobs:
|
|
26
|
+
verify-tag-branch-rule:
|
|
27
|
+
name: Verify Tag Branch Rule
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
outputs:
|
|
30
|
+
should_build: ${{ steps.check-rule.outputs.should_build }}
|
|
31
|
+
publish_release: ${{ steps.check-rule.outputs.publish_release }}
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v6
|
|
34
|
+
with:
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
- name: Validate tag against branch rule
|
|
37
|
+
id: check-rule
|
|
38
|
+
run: |
|
|
39
|
+
event_name="${{ github.event_name }}"
|
|
40
|
+
tag_name="${{ github.ref_name }}"
|
|
41
|
+
|
|
42
|
+
if [ "$event_name" = "pull_request" ]; then
|
|
43
|
+
echo "should_build=true" >> "$GITHUB_OUTPUT"
|
|
44
|
+
echo "publish_release=false" >> "$GITHUB_OUTPUT"
|
|
45
|
+
echo "Allowed: pull request build only (no release)."
|
|
46
|
+
exit 0
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
git fetch origin master --depth=1
|
|
50
|
+
git fetch origin dev --depth=1
|
|
51
|
+
|
|
52
|
+
on_master=false
|
|
53
|
+
on_dev=false
|
|
54
|
+
|
|
55
|
+
if git merge-base --is-ancestor "$GITHUB_SHA" "origin/master"; then
|
|
56
|
+
on_master=true
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
if git merge-base --is-ancestor "$GITHUB_SHA" "origin/dev"; then
|
|
60
|
+
on_dev=true
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
if [[ "$tag_name" == v* ]] && [[ "$on_master" == true ]]; then
|
|
64
|
+
echo "should_build=true" >> "$GITHUB_OUTPUT"
|
|
65
|
+
echo "publish_release=true" >> "$GITHUB_OUTPUT"
|
|
66
|
+
echo "Allowed: v* tag on master (release build)."
|
|
67
|
+
exit 0
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
if [[ "$on_dev" == true ]]; then
|
|
71
|
+
echo "should_build=true" >> "$GITHUB_OUTPUT"
|
|
72
|
+
echo "publish_release=false" >> "$GITHUB_OUTPUT"
|
|
73
|
+
echo "Allowed: any tag on dev (artifact only)."
|
|
74
|
+
exit 0
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
echo "should_build=false" >> "$GITHUB_OUTPUT"
|
|
78
|
+
echo "publish_release=false" >> "$GITHUB_OUTPUT"
|
|
79
|
+
echo "Blocked: event does not meet PR or tag branch rules."
|
|
80
|
+
|
|
13
81
|
build-windows:
|
|
14
82
|
name: Build Windows Portable
|
|
15
83
|
runs-on: windows-latest
|
|
84
|
+
needs: verify-tag-branch-rule
|
|
85
|
+
if: needs.verify-tag-branch-rule.outputs.should_build == 'true'
|
|
16
86
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
87
|
+
- uses: actions/checkout@v6
|
|
88
|
+
with:
|
|
89
|
+
persist-credentials: false
|
|
18
90
|
|
|
19
91
|
- name: Set up Python
|
|
20
|
-
uses: actions/setup-python@
|
|
92
|
+
uses: actions/setup-python@v6
|
|
21
93
|
with:
|
|
22
94
|
python-version: '3.11'
|
|
23
95
|
|
|
@@ -58,7 +130,6 @@ jobs:
|
|
|
58
130
|
--clang `
|
|
59
131
|
auto_reference_generator/cli.py
|
|
60
132
|
|
|
61
|
-
|
|
62
133
|
- name: Create Windows package
|
|
63
134
|
run: |
|
|
64
135
|
$version = "${{ github.ref_name }}" -replace "^v", ""
|
|
@@ -87,6 +158,7 @@ jobs:
|
|
|
87
158
|
path: auto_ref_windows_*.zip
|
|
88
159
|
|
|
89
160
|
- name: Upload to release
|
|
161
|
+
if: needs.verify-tag-branch-rule.outputs.publish_release == 'true'
|
|
90
162
|
uses: softprops/action-gh-release@v1
|
|
91
163
|
with:
|
|
92
164
|
draft: true
|
|
@@ -97,11 +169,15 @@ jobs:
|
|
|
97
169
|
build-linux:
|
|
98
170
|
name: Build Linux Portable
|
|
99
171
|
runs-on: ubuntu-latest
|
|
172
|
+
needs: verify-tag-branch-rule
|
|
173
|
+
if: needs.verify-tag-branch-rule.outputs.should_build == 'true'
|
|
100
174
|
steps:
|
|
101
|
-
- uses: actions/checkout@
|
|
175
|
+
- uses: actions/checkout@v6
|
|
176
|
+
with:
|
|
177
|
+
persist-credentials: false
|
|
102
178
|
|
|
103
179
|
- name: Set up Python
|
|
104
|
-
uses: actions/setup-python@
|
|
180
|
+
uses: actions/setup-python@v6
|
|
105
181
|
with:
|
|
106
182
|
python-version: '3.11'
|
|
107
183
|
|
|
@@ -152,6 +228,7 @@ jobs:
|
|
|
152
228
|
path: auto_ref_linux_*.tar.gz
|
|
153
229
|
|
|
154
230
|
- name: Upload to release
|
|
231
|
+
if: needs.verify-tag-branch-rule.outputs.publish_release == 'true'
|
|
155
232
|
uses: softprops/action-gh-release@v1
|
|
156
233
|
with:
|
|
157
234
|
draft: true
|
|
@@ -162,11 +239,15 @@ jobs:
|
|
|
162
239
|
build-macos:
|
|
163
240
|
name: Build macOS Portable
|
|
164
241
|
runs-on: macos-latest
|
|
242
|
+
needs: verify-tag-branch-rule
|
|
243
|
+
if: needs.verify-tag-branch-rule.outputs.should_build == 'true'
|
|
165
244
|
steps:
|
|
166
|
-
- uses: actions/checkout@
|
|
245
|
+
- uses: actions/checkout@v6
|
|
246
|
+
with:
|
|
247
|
+
persist-credentials: false
|
|
167
248
|
|
|
168
249
|
- name: Set up Python
|
|
169
|
-
uses: actions/setup-python@
|
|
250
|
+
uses: actions/setup-python@v6
|
|
170
251
|
with:
|
|
171
252
|
python-version: '3.11'
|
|
172
253
|
|
|
@@ -207,12 +288,13 @@ jobs:
|
|
|
207
288
|
tar -czf "auto_ref_macos_${version}.tar.gz" -C build auto_ref
|
|
208
289
|
|
|
209
290
|
- name: Upload macOS artifact
|
|
210
|
-
uses: actions/upload-artifact@
|
|
291
|
+
uses: actions/upload-artifact@v5
|
|
211
292
|
with:
|
|
212
293
|
name: auto_ref-macos
|
|
213
294
|
path: auto_ref_macos_*.tar.gz
|
|
214
295
|
|
|
215
296
|
- name: Upload to release
|
|
297
|
+
if: needs.verify-tag-branch-rule.outputs.publish_release == 'true'
|
|
216
298
|
uses: softprops/action-gh-release@v1
|
|
217
299
|
with:
|
|
218
300
|
draft: true
|
|
@@ -223,10 +305,12 @@ jobs:
|
|
|
223
305
|
create-release-notes:
|
|
224
306
|
name: Create Release Notes
|
|
225
307
|
runs-on: ubuntu-latest
|
|
226
|
-
needs: [build-windows, build-linux, build-macos]
|
|
227
|
-
if:
|
|
308
|
+
needs: [verify-tag-branch-rule, build-windows, build-linux, build-macos]
|
|
309
|
+
if: needs.verify-tag-branch-rule.outputs.publish_release == 'true'
|
|
228
310
|
steps:
|
|
229
|
-
- uses: actions/checkout@
|
|
311
|
+
- uses: actions/checkout@v6
|
|
312
|
+
with:
|
|
313
|
+
persist-credentials: false
|
|
230
314
|
|
|
231
315
|
- name: Generate Release Notes
|
|
232
316
|
run: |
|
{auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/.github/workflows/codeql.yml
RENAMED
|
@@ -15,16 +15,17 @@ on:
|
|
|
15
15
|
push:
|
|
16
16
|
tags:
|
|
17
17
|
- 'v*'
|
|
18
|
-
|
|
18
|
+
branches:
|
|
19
|
+
- 'dev'
|
|
19
20
|
paths-ignore:
|
|
20
21
|
- 'README.md'
|
|
21
22
|
- 'docs/**'
|
|
22
23
|
- 'assets/**'
|
|
23
24
|
- '.github/**'
|
|
24
25
|
pull_request:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
branches:
|
|
27
|
+
- master
|
|
28
|
+
- dev
|
|
28
29
|
paths-ignore:
|
|
29
30
|
- 'README.md'
|
|
30
31
|
- 'docs/**'
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
name: Publish Python distribution to PyPI and TestPyPi
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
paths-ignore:
|
|
8
|
+
- 'README.md'
|
|
9
|
+
- 'docs/**'
|
|
10
|
+
- 'assets/**'
|
|
11
|
+
- '.github/**'
|
|
12
|
+
pull_request:
|
|
13
|
+
branches:
|
|
14
|
+
- dev
|
|
15
|
+
- master
|
|
16
|
+
paths-ignore:
|
|
17
|
+
- 'README.md'
|
|
18
|
+
- 'docs/**'
|
|
19
|
+
- 'assets/**'
|
|
20
|
+
- '.github/**'
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
verify-tag-branch-rule:
|
|
24
|
+
name: Verify Tag Branch Rule
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
outputs:
|
|
27
|
+
should_build: ${{ steps.check-rule.outputs.should_build }}
|
|
28
|
+
publish_testpypi: ${{ steps.check-rule.outputs.publish_testpypi }}
|
|
29
|
+
publish_pypi: ${{ steps.check-rule.outputs.publish_pypi }}
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v6
|
|
32
|
+
with:
|
|
33
|
+
fetch-depth: 0
|
|
34
|
+
- name: Validate tag against branch rule
|
|
35
|
+
id: check-rule
|
|
36
|
+
run: |
|
|
37
|
+
event_name="${{ github.event_name }}"
|
|
38
|
+
tag_name="${{ github.ref_name }}"
|
|
39
|
+
|
|
40
|
+
if [ "$event_name" = "pull_request" ]; then
|
|
41
|
+
echo "should_build=true" >> "$GITHUB_OUTPUT"
|
|
42
|
+
echo "publish_testpypi=false" >> "$GITHUB_OUTPUT"
|
|
43
|
+
echo "publish_pypi=false" >> "$GITHUB_OUTPUT"
|
|
44
|
+
echo "Allowed: pull request build only (no publish)."
|
|
45
|
+
exit 0
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
git fetch origin master --depth=1
|
|
49
|
+
git fetch origin dev --depth=1
|
|
50
|
+
|
|
51
|
+
on_master=false
|
|
52
|
+
on_dev=false
|
|
53
|
+
|
|
54
|
+
if git merge-base --is-ancestor "$GITHUB_SHA" "origin/master"; then
|
|
55
|
+
on_master=true
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
if git merge-base --is-ancestor "$GITHUB_SHA" "origin/dev"; then
|
|
59
|
+
on_dev=true
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
if [[ "$tag_name" == v* ]] && [[ "$on_master" == true ]]; then
|
|
63
|
+
echo "should_build=true" >> "$GITHUB_OUTPUT"
|
|
64
|
+
echo "publish_testpypi=false" >> "$GITHUB_OUTPUT"
|
|
65
|
+
echo "publish_pypi=true" >> "$GITHUB_OUTPUT"
|
|
66
|
+
echo "Allowed: v* tag on master (PyPI only)."
|
|
67
|
+
exit 0
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
if [[ "$on_dev" == true ]]; then
|
|
71
|
+
echo "should_build=true" >> "$GITHUB_OUTPUT"
|
|
72
|
+
echo "publish_testpypi=true" >> "$GITHUB_OUTPUT"
|
|
73
|
+
echo "publish_pypi=false" >> "$GITHUB_OUTPUT"
|
|
74
|
+
echo "Allowed: any tag on dev (TestPyPI only)."
|
|
75
|
+
exit 0
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
echo "should_build=false" >> "$GITHUB_OUTPUT"
|
|
79
|
+
echo "publish_testpypi=false" >> "$GITHUB_OUTPUT"
|
|
80
|
+
echo "publish_pypi=false" >> "$GITHUB_OUTPUT"
|
|
81
|
+
echo "Blocked: event does not meet PR or tag branch rules."
|
|
82
|
+
|
|
83
|
+
build:
|
|
84
|
+
name: Build distribution
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
needs: verify-tag-branch-rule
|
|
87
|
+
if: needs.verify-tag-branch-rule.outputs.should_build == 'true'
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/checkout@v6
|
|
90
|
+
with:
|
|
91
|
+
persist-credentials: false
|
|
92
|
+
- name: Set up Python
|
|
93
|
+
uses: actions/setup-python@v6
|
|
94
|
+
with:
|
|
95
|
+
python-version: "3.x"
|
|
96
|
+
- name: Install pypa/build
|
|
97
|
+
run: >-
|
|
98
|
+
python3 -m
|
|
99
|
+
pip install
|
|
100
|
+
build
|
|
101
|
+
- name: Build a binary wheel and a source tarball
|
|
102
|
+
run: python3 -m build
|
|
103
|
+
- name: Store the distribution packages
|
|
104
|
+
uses: actions/upload-artifact@v5
|
|
105
|
+
with:
|
|
106
|
+
name: python-package-distributions
|
|
107
|
+
path: dist/
|
|
108
|
+
|
|
109
|
+
publish-to-testpypi:
|
|
110
|
+
name: >-
|
|
111
|
+
Publish Python distribution to TestPyPI
|
|
112
|
+
needs:
|
|
113
|
+
- verify-tag-branch-rule
|
|
114
|
+
- build
|
|
115
|
+
if: needs.verify-tag-branch-rule.outputs.publish_testpypi == 'true'
|
|
116
|
+
runs-on: ubuntu-latest
|
|
117
|
+
environment:
|
|
118
|
+
name: testpypi
|
|
119
|
+
url: https://test.pypi.org/p/auto-reference-generator # Replace <package-name> with your TestPyPI project name
|
|
120
|
+
permissions:
|
|
121
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
122
|
+
steps:
|
|
123
|
+
- name: Download all the dists
|
|
124
|
+
uses: actions/download-artifact@v6
|
|
125
|
+
with:
|
|
126
|
+
name: python-package-distributions
|
|
127
|
+
path: dist/
|
|
128
|
+
- name: Publish distribution to TestPyPI
|
|
129
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
130
|
+
with:
|
|
131
|
+
repository-url: https://test.pypi.org/legacy/
|
|
132
|
+
|
|
133
|
+
publish-to-pypi:
|
|
134
|
+
name: >-
|
|
135
|
+
Publish Python distribution to PyPI
|
|
136
|
+
needs:
|
|
137
|
+
- verify-tag-branch-rule
|
|
138
|
+
- build
|
|
139
|
+
if: needs.verify-tag-branch-rule.outputs.publish_pypi == 'true'
|
|
140
|
+
runs-on: ubuntu-latest
|
|
141
|
+
environment:
|
|
142
|
+
name: pypi
|
|
143
|
+
url: https://pypi.org/p/auto-reference-generator # Replace <package-name> with your PyPI project name
|
|
144
|
+
permissions:
|
|
145
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
146
|
+
|
|
147
|
+
steps:
|
|
148
|
+
- name: Download all the dists
|
|
149
|
+
uses: actions/download-artifact@v6
|
|
150
|
+
with:
|
|
151
|
+
name: python-package-distributions
|
|
152
|
+
path: dist/
|
|
153
|
+
- name: Publish distribution to PyPI
|
|
154
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
{auto_reference_generator-1.3.7 → auto_reference_generator-1.3.8}/.github/workflows/python-tests.yml
RENAMED
|
@@ -4,20 +4,24 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
tags:
|
|
6
6
|
- 'v*'
|
|
7
|
-
|
|
7
|
+
branches:
|
|
8
|
+
- 'dev'
|
|
8
9
|
paths-ignore:
|
|
9
10
|
- 'README.md'
|
|
10
11
|
- 'docs/**'
|
|
11
12
|
- 'assets/**'
|
|
12
13
|
- '.github/**'
|
|
13
14
|
pull_request:
|
|
14
|
-
branches:
|
|
15
|
+
branches:
|
|
16
|
+
- master
|
|
17
|
+
- dev
|
|
15
18
|
paths-ignore:
|
|
16
19
|
- 'README.md'
|
|
17
20
|
- 'docs/**'
|
|
18
21
|
- 'assets/**'
|
|
19
22
|
- '.github/**'
|
|
20
|
-
|
|
23
|
+
workflow_dispatch: {}
|
|
24
|
+
|
|
21
25
|
jobs:
|
|
22
26
|
build:
|
|
23
27
|
runs-on: ubuntu-latest
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: auto_reference_generator
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.8
|
|
4
4
|
Summary: A tool for archivist's to automate the generation of references for digital files
|
|
5
5
|
Author-email: Christopher Prince <c.pj.prince@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -359,12 +359,13 @@ The below covers the full range of options. Use the `-h` option to show this dia
|
|
|
359
359
|
Usage:
|
|
360
360
|
```
|
|
361
361
|
Auto_Reference_Generator [-h] [-v] [-p [PREFIX]] [-s [SUFFIX]]
|
|
362
|
-
[--suffix-option {file,dir,both}] [-acc {file,dir,both}]
|
|
362
|
+
[--suffix-option [{file,dir,both}]] [-acc [{file,dir,both}]]
|
|
363
363
|
[-accp [ACC_PREFIX]] [-l [LEVEL_LIMIT]] [-str [START_REF]]
|
|
364
364
|
[-dlm [DELIMITER]] [--remove-empty] [--disable-empty-export]
|
|
365
|
-
[-hid] [-
|
|
366
|
-
[
|
|
367
|
-
[--
|
|
365
|
+
[-hid] [--sort-by [{folders_first,alphabetical}]]
|
|
366
|
+
[-fx [{MD5,SHA-1,SHA1,SHA-256} ...]]
|
|
367
|
+
[--max-workers [MAX_WORKERS]] [-o [OUTPUT]] [--disable-meta-dir]
|
|
368
|
+
[-skp] [-fmt {xlsx,csv,json,ods,xml,dict}]
|
|
368
369
|
[--options-file [OPTIONS_FILE]]
|
|
369
370
|
[--log-level [{DEBUG,INFO,WARNING,ERROR}]]
|
|
370
371
|
[--log-file [LOG_FILE]] [-key [KEYWORDS ...]]
|
|
@@ -372,6 +373,8 @@ Auto_Reference_Generator [-h] [-v] [-p [PREFIX]] [-s [SUFFIX]]
|
|
|
372
373
|
[-keym [{initialise,firstletters,from_json}]]
|
|
373
374
|
[--keywords-retain-order]
|
|
374
375
|
[--keywords-abbreviation-number [KEYWORDS_ABBREVIATION_NUMBER]]
|
|
376
|
+
[--physical-mode-input [PHYSICAL_MODE_INPUT]]
|
|
377
|
+
[--spreadsheet-to-sort [SPREADSHEET_TO_SORT]]
|
|
375
378
|
[root]
|
|
376
379
|
```
|
|
377
380
|
Auto Reference Generator for Digital Cataloguing
|
|
@@ -387,8 +390,8 @@ Reference Options:
|
|
|
387
390
|
|
|
388
391
|
- `-p [PREFIX]`, `--prefix [PREFIX]`: Set a prefix to append onto generated references
|
|
389
392
|
- `-s [SUFFIX]`, `--suffix [SUFFIX]`: Set a suffix to append onto generated references
|
|
390
|
-
- `--suffix-option {file`, `dir`, `both}`: Set whether to apply the suffix to files, folders or both when generating references
|
|
391
|
-
- `-acc {file`, `dir`, `both}`, `--accession {file`, `dir`, `both}`: Sets the program to create an accession listing - IE a running number of the files.
|
|
393
|
+
- `--suffix-option [{file`, `dir`, `both}]`: Set whether to apply the suffix to files, folders or both when generating references
|
|
394
|
+
- `-acc [{file`, `dir`, `both}]`, `--accession [{file`, `dir`, `both}]`: Sets the program to create an accession listing - IE a running number of the files.
|
|
392
395
|
- `-accp [ACC_PREFIX]`, `--acc-prefix [ACC_PREFIX]`: Sets the Prefix for Accession Mode
|
|
393
396
|
- `-l [LEVEL_LIMIT]`, `--level-limit [LEVEL_LIMIT]`: Set a level limit to generate references to
|
|
394
397
|
- `-str [START_REF]`, `--start-ref [START_REF]`: Set the starting reference number. Won't affect sub-folders/files
|
|
@@ -396,8 +399,9 @@ Reference Options:
|
|
|
396
399
|
- `--remove-empty`: Sets the Program to remove any Empty Directory and Log removals to a text file
|
|
397
400
|
- `--disable-empty-export`: Sets the program to not export a log of removed empty directories, by default will export, this flag disables that
|
|
398
401
|
- `-hid`, `--hidden`: Set to include hidden files/folders in the listing
|
|
399
|
-
- `-fx [{MD5`, `SHA-1`, `SHA1`, `SHA-256}]`, `--fixity [{MD5`, `SHA-1`, `SHA1`, `SHA-256}]`: Set to generate fixities, specify Algorithm to use (default SHA-1)
|
|
400
402
|
- `--sort-by [{folders_first`, `alphabetical}]`: Set the sorting method, 'folders_first' sorts folders first then files alphabetically; 'alphabetically' sorts alphabetically (ignoring folder distinction)
|
|
403
|
+
- `-fx [{MD5`, `SHA-1`, `SHA1`, `SHA-256} ...]`, `--fixity [{MD5`, `SHA-1`, `SHA1`, `SHA-256} ...]`: Set to generate fixities, specify Algorithm to use (default SHA-1)
|
|
404
|
+
- `--max-workers [MAX_WORKERS]`: Set the maximum number of worker threads to use for hash generation when using --fixity (default: 1)
|
|
401
405
|
|
|
402
406
|
Output Options:
|
|
403
407
|
Options for outputting the generated references
|
|
@@ -418,6 +422,12 @@ Keyword Options:
|
|
|
418
422
|
- `-keym [{initialise`, `firstletters`, `from_json}]`, `--keywords-mode [{initialise`, `firstletters`, `from_json}]`: Set to alternate keyword mode: 'initialise' will use initials of words; 'firstletters' will use the first letters of the string; 'from_json' will use a JSON file mapping names to keywords
|
|
419
423
|
- `--keywords-retain-order`: Set when using keywords to continue reference numbering. If not used keywords don't 'count' to reference numbering, e.g. if using initials 'Project Alpha' -> 'PA' then the next folder/file will be '1' not '2'
|
|
420
424
|
- `--keywords-abbreviation-number [KEYWORDS_ABBREVIATION_NUMBER]`: Set to set the number of letters to abbreviate for 'firstletters' mode, does not impact 'initialise' mode.
|
|
425
|
+
|
|
426
|
+
Physical Mode Options:
|
|
427
|
+
Options for using physical mode functionality
|
|
428
|
+
|
|
429
|
+
- `--physical-mode-input [PHYSICAL_MODE_INPUT]`: Set to conduct an Auto Generation of a Specify a path to a Spreadsheet
|
|
430
|
+
- `--spreadsheet-to-sort [SPREADSHEET_TO_SORT]`: Set to a path to a Spreadsheet containing an 'Archive_Reference' Column to sort the spreadsheet according to hierarchy
|
|
421
431
|
<!-- argparse_to_md_end -->
|
|
422
432
|
|
|
423
433
|
## Troubleshooting
|
|
@@ -335,12 +335,13 @@ The below covers the full range of options. Use the `-h` option to show this dia
|
|
|
335
335
|
Usage:
|
|
336
336
|
```
|
|
337
337
|
Auto_Reference_Generator [-h] [-v] [-p [PREFIX]] [-s [SUFFIX]]
|
|
338
|
-
[--suffix-option {file,dir,both}] [-acc {file,dir,both}]
|
|
338
|
+
[--suffix-option [{file,dir,both}]] [-acc [{file,dir,both}]]
|
|
339
339
|
[-accp [ACC_PREFIX]] [-l [LEVEL_LIMIT]] [-str [START_REF]]
|
|
340
340
|
[-dlm [DELIMITER]] [--remove-empty] [--disable-empty-export]
|
|
341
|
-
[-hid] [-
|
|
342
|
-
[
|
|
343
|
-
[--
|
|
341
|
+
[-hid] [--sort-by [{folders_first,alphabetical}]]
|
|
342
|
+
[-fx [{MD5,SHA-1,SHA1,SHA-256} ...]]
|
|
343
|
+
[--max-workers [MAX_WORKERS]] [-o [OUTPUT]] [--disable-meta-dir]
|
|
344
|
+
[-skp] [-fmt {xlsx,csv,json,ods,xml,dict}]
|
|
344
345
|
[--options-file [OPTIONS_FILE]]
|
|
345
346
|
[--log-level [{DEBUG,INFO,WARNING,ERROR}]]
|
|
346
347
|
[--log-file [LOG_FILE]] [-key [KEYWORDS ...]]
|
|
@@ -348,6 +349,8 @@ Auto_Reference_Generator [-h] [-v] [-p [PREFIX]] [-s [SUFFIX]]
|
|
|
348
349
|
[-keym [{initialise,firstletters,from_json}]]
|
|
349
350
|
[--keywords-retain-order]
|
|
350
351
|
[--keywords-abbreviation-number [KEYWORDS_ABBREVIATION_NUMBER]]
|
|
352
|
+
[--physical-mode-input [PHYSICAL_MODE_INPUT]]
|
|
353
|
+
[--spreadsheet-to-sort [SPREADSHEET_TO_SORT]]
|
|
351
354
|
[root]
|
|
352
355
|
```
|
|
353
356
|
Auto Reference Generator for Digital Cataloguing
|
|
@@ -363,8 +366,8 @@ Reference Options:
|
|
|
363
366
|
|
|
364
367
|
- `-p [PREFIX]`, `--prefix [PREFIX]`: Set a prefix to append onto generated references
|
|
365
368
|
- `-s [SUFFIX]`, `--suffix [SUFFIX]`: Set a suffix to append onto generated references
|
|
366
|
-
- `--suffix-option {file`, `dir`, `both}`: Set whether to apply the suffix to files, folders or both when generating references
|
|
367
|
-
- `-acc {file`, `dir`, `both}`, `--accession {file`, `dir`, `both}`: Sets the program to create an accession listing - IE a running number of the files.
|
|
369
|
+
- `--suffix-option [{file`, `dir`, `both}]`: Set whether to apply the suffix to files, folders or both when generating references
|
|
370
|
+
- `-acc [{file`, `dir`, `both}]`, `--accession [{file`, `dir`, `both}]`: Sets the program to create an accession listing - IE a running number of the files.
|
|
368
371
|
- `-accp [ACC_PREFIX]`, `--acc-prefix [ACC_PREFIX]`: Sets the Prefix for Accession Mode
|
|
369
372
|
- `-l [LEVEL_LIMIT]`, `--level-limit [LEVEL_LIMIT]`: Set a level limit to generate references to
|
|
370
373
|
- `-str [START_REF]`, `--start-ref [START_REF]`: Set the starting reference number. Won't affect sub-folders/files
|
|
@@ -372,8 +375,9 @@ Reference Options:
|
|
|
372
375
|
- `--remove-empty`: Sets the Program to remove any Empty Directory and Log removals to a text file
|
|
373
376
|
- `--disable-empty-export`: Sets the program to not export a log of removed empty directories, by default will export, this flag disables that
|
|
374
377
|
- `-hid`, `--hidden`: Set to include hidden files/folders in the listing
|
|
375
|
-
- `-fx [{MD5`, `SHA-1`, `SHA1`, `SHA-256}]`, `--fixity [{MD5`, `SHA-1`, `SHA1`, `SHA-256}]`: Set to generate fixities, specify Algorithm to use (default SHA-1)
|
|
376
378
|
- `--sort-by [{folders_first`, `alphabetical}]`: Set the sorting method, 'folders_first' sorts folders first then files alphabetically; 'alphabetically' sorts alphabetically (ignoring folder distinction)
|
|
379
|
+
- `-fx [{MD5`, `SHA-1`, `SHA1`, `SHA-256} ...]`, `--fixity [{MD5`, `SHA-1`, `SHA1`, `SHA-256} ...]`: Set to generate fixities, specify Algorithm to use (default SHA-1)
|
|
380
|
+
- `--max-workers [MAX_WORKERS]`: Set the maximum number of worker threads to use for hash generation when using --fixity (default: 1)
|
|
377
381
|
|
|
378
382
|
Output Options:
|
|
379
383
|
Options for outputting the generated references
|
|
@@ -394,6 +398,12 @@ Keyword Options:
|
|
|
394
398
|
- `-keym [{initialise`, `firstletters`, `from_json}]`, `--keywords-mode [{initialise`, `firstletters`, `from_json}]`: Set to alternate keyword mode: 'initialise' will use initials of words; 'firstletters' will use the first letters of the string; 'from_json' will use a JSON file mapping names to keywords
|
|
395
399
|
- `--keywords-retain-order`: Set when using keywords to continue reference numbering. If not used keywords don't 'count' to reference numbering, e.g. if using initials 'Project Alpha' -> 'PA' then the next folder/file will be '1' not '2'
|
|
396
400
|
- `--keywords-abbreviation-number [KEYWORDS_ABBREVIATION_NUMBER]`: Set to set the number of letters to abbreviate for 'firstletters' mode, does not impact 'initialise' mode.
|
|
401
|
+
|
|
402
|
+
Physical Mode Options:
|
|
403
|
+
Options for using physical mode functionality
|
|
404
|
+
|
|
405
|
+
- `--physical-mode-input [PHYSICAL_MODE_INPUT]`: Set to conduct an Auto Generation of a Specify a path to a Spreadsheet
|
|
406
|
+
- `--spreadsheet-to-sort [SPREADSHEET_TO_SORT]`: Set to a path to a Spreadsheet containing an 'Archive_Reference' Column to sort the spreadsheet according to hierarchy
|
|
397
407
|
<!-- argparse_to_md_end -->
|
|
398
408
|
|
|
399
409
|
## Troubleshooting
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
auto_classification_generator package definitions
|
|
3
|
+
|
|
4
|
+
Author: Christopher Prince
|
|
5
|
+
license: Apache License 2.0"
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .common import define_output_file, \
|
|
9
|
+
keyword_replace, \
|
|
10
|
+
win_file_split, \
|
|
11
|
+
filter_win_hidden, \
|
|
12
|
+
path_check, \
|
|
13
|
+
running_time, \
|
|
14
|
+
win_256_check, \
|
|
15
|
+
export_csv, \
|
|
16
|
+
export_dict, \
|
|
17
|
+
export_json, \
|
|
18
|
+
export_list_txt, \
|
|
19
|
+
export_ods, \
|
|
20
|
+
export_xl, \
|
|
21
|
+
export_xml, \
|
|
22
|
+
suffix_addition, \
|
|
23
|
+
suffix_subtraction
|
|
24
|
+
from .referenceGen import ReferenceGenerator
|
|
25
|
+
from .cli import run_cli,create_parser
|
|
26
|
+
from importlib import metadata
|
|
27
|
+
|
|
28
|
+
__author__ = "Christopher Prince (c.pj.prince@gmail.com)"
|
|
29
|
+
__license__ = "Apache License Version 2.0"
|
|
30
|
+
__version__ = metadata.version("auto_reference_generator")
|