sslabdata 3.0.0__py3-none-any.whl
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.
- sslabdata/__init__.py +40 -0
- sslabdata/assembler.py +452 -0
- sslabdata/cli.py +274 -0
- sslabdata/config.py +443 -0
- sslabdata/diagnostics.py +159 -0
- sslabdata/exporters.py +86 -0
- sslabdata/loaders.py +298 -0
- sslabdata/models.py +342 -0
- sslabdata/parsers/__init__.py +0 -0
- sslabdata/parsers/bibtex.py +1132 -0
- sslabdata/parsers/latex.py +215 -0
- sslabdata/resolver.py +517 -0
- sslabdata/schema/__init__.py +0 -0
- sslabdata/schema/v5/output.schema.json +458 -0
- sslabdata-3.0.0.dist-info/METADATA +409 -0
- sslabdata-3.0.0.dist-info/RECORD +20 -0
- sslabdata-3.0.0.dist-info/WHEEL +5 -0
- sslabdata-3.0.0.dist-info/entry_points.txt +2 -0
- sslabdata-3.0.0.dist-info/licenses/LICENSE +21 -0
- sslabdata-3.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sslabdata
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Renderer-agnostic academic lab data assembler: BibTeX + YAML → structured data
|
|
5
|
+
Author: Siddhartha Srinivasa
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/siddhss5/sslabdata
|
|
8
|
+
Project-URL: Repository, https://github.com/siddhss5/sslabdata
|
|
9
|
+
Project-URL: Documentation, https://github.com/siddhss5/sslabdata/blob/main/SPEC.md
|
|
10
|
+
Project-URL: Issues, https://github.com/siddhss5/sslabdata/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/siddhss5/sslabdata/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: bibtex,bibliography,publications,academic,research,lab,yaml,json-schema
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Classifier: Topic :: Text Processing :: Markup :: LaTeX
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: pybtex~=0.26
|
|
29
|
+
Requires-Dist: pylatexenc~=2.11
|
|
30
|
+
Requires-Dist: pyyaml
|
|
31
|
+
Provides-Extra: test
|
|
32
|
+
Requires-Dist: pytest; extra == "test"
|
|
33
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
34
|
+
Requires-Dist: jsonschema>=4; extra == "test"
|
|
35
|
+
Requires-Dist: setuptools>=77; extra == "test"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# sslabdata
|
|
39
|
+
|
|
40
|
+
sslabdata compiles BibTeX and a little YAML into one schema-specified document —
|
|
41
|
+
works, people, projects and the links between them — that any website, CV or
|
|
42
|
+
script can read.
|
|
43
|
+
|
|
44
|
+
Most academics already keep good BibTeX. What they do not have is that
|
|
45
|
+
bibliography as *data*: authors linked to the people in the group, papers
|
|
46
|
+
linked to the projects they belong to, names normalised, LaTeX resolved to
|
|
47
|
+
plain Unicode text. sslabdata does that one job and writes the result to a
|
|
48
|
+
single YAML or JSON file, specified by a published JSON Schema you can check
|
|
49
|
+
it against.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
sslabdata --config lab.yaml --output lab.yml
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- [`SPEC.md`](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md) — the normative contract: what the strings are, what
|
|
56
|
+
order the lists are in, which fields are derived, when the version changes.
|
|
57
|
+
- [`CHANGELOG.md`](https://github.com/siddhss5/sslabdata/blob/main/CHANGELOG.md) — what changed at each release, and what it
|
|
58
|
+
replaced.
|
|
59
|
+
- [`schema/v5/output.schema.json`](https://github.com/siddhss5/sslabdata/blob/main/schema/v5/output.schema.json) — the
|
|
60
|
+
document's JSON Schema. Published versions are immutable and live at their
|
|
61
|
+
own paths; [`schema/v3/`](https://github.com/siddhss5/sslabdata/blob/main/schema/v3/output.schema.json) and
|
|
62
|
+
[`schema/v4/`](https://github.com/siddhss5/sslabdata/blob/main/schema/v4/output.schema.json) are still there.
|
|
63
|
+
- [`tests/COVERAGE.md`](https://github.com/siddhss5/sslabdata/blob/main/tests/COVERAGE.md) — every input case sslabdata
|
|
64
|
+
supports, and every case it does not, with the fixture and test for each.
|
|
65
|
+
|
|
66
|
+
## What sslabdata is not
|
|
67
|
+
|
|
68
|
+
**sslabdata is not a CMS and not a site generator.** It does not build a
|
|
69
|
+
website, own your pages or manage your content. News, openings, teaching
|
|
70
|
+
pages, press and galleries are prose with no shared structure to compile, and
|
|
71
|
+
they belong in your site repository. [`SPEC.md` §8](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#8-the-entity-boundary-and-the-evidence-for-it) gives the
|
|
72
|
+
evidence for that boundary and the destination for each content type it
|
|
73
|
+
leaves out.
|
|
74
|
+
|
|
75
|
+
sslabdata emits data. Rendering it is your renderer's job.
|
|
76
|
+
|
|
77
|
+
## Install
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install sslabdata
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
To work on sslabdata itself, install from a clone instead:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
git clone https://github.com/siddhss5/sslabdata.git
|
|
87
|
+
cd sslabdata
|
|
88
|
+
pip install -e ".[test]"
|
|
89
|
+
pytest
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The `test` extra installs `pytest` and `jsonschema`, which the tests need.
|
|
93
|
+
|
|
94
|
+
## Write `lab.yaml`
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
lab:
|
|
98
|
+
name: "My Lab"
|
|
99
|
+
description: "What our lab does"
|
|
100
|
+
university: "University Name"
|
|
101
|
+
website: "https://mylab.example.org"
|
|
102
|
+
|
|
103
|
+
bib_dir: "data/bib"
|
|
104
|
+
bib_files:
|
|
105
|
+
- name: "journal.bib"
|
|
106
|
+
category: "Journal Papers"
|
|
107
|
+
- name: "conference.bib"
|
|
108
|
+
category: "Conference Papers"
|
|
109
|
+
|
|
110
|
+
pdf_base_url: "https://mylab.example.org/pdfs"
|
|
111
|
+
people_file: "data/people.yaml" # optional
|
|
112
|
+
projects_file: "data/projects.yaml" # optional
|
|
113
|
+
collaborators_file: "data/collaborators.yaml" # optional
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Each `bib_files` entry's `name` is a name under `bib_dir`: it is emitted as
|
|
117
|
+
the work's `source.file`, so it may be neither absolute nor leave `bib_dir`,
|
|
118
|
+
and sslabdata rejects such a name rather than rewriting it
|
|
119
|
+
([`SPEC.md` §5](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#5-input-versus-derived)).
|
|
120
|
+
|
|
121
|
+
Paths are relative to the directory you run `sslabdata` from.
|
|
122
|
+
[`examples/demo/lab.yaml`](https://github.com/siddhss5/sslabdata/blob/main/examples/demo/lab.yaml) is a complete example,
|
|
123
|
+
built from the fictional Example Lab in [`examples/demo/`](https://github.com/siddhss5/sslabdata/tree/main/examples/demo/).
|
|
124
|
+
|
|
125
|
+
Then compile it:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
sslabdata --config lab.yaml --validate # report counts and problems
|
|
129
|
+
sslabdata --config lab.yaml --unresolved # list unmatched author names
|
|
130
|
+
sslabdata --config lab.yaml --output lab.yml # write the document
|
|
131
|
+
sslabdata --config lab.yaml --format json --output lab.json
|
|
132
|
+
sslabdata --config lab.yaml --validate --strict # fail on every problem
|
|
133
|
+
sslabdata --config lab.yaml --validate --format json # problems as JSON
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`--validate` exits `0` when it finds no errors and `1` when it does, or when
|
|
137
|
+
the run fails outright. An author who matched nobody is reported but is not an
|
|
138
|
+
error; most are external collaborators. It checks the configuration, the
|
|
139
|
+
people and projects files and every entry, not the output against the JSON
|
|
140
|
+
Schema. Every problem is reported under a stable code.
|
|
141
|
+
|
|
142
|
+
`--strict` turns every coded problem into an error, except those about
|
|
143
|
+
authors who matched no lab member and redefined `@string` macros; an error
|
|
144
|
+
exits `1` and an export then writes nothing. With `--validate` or
|
|
145
|
+
`--unresolved`, `--format json` prints the problems as one JSON array on
|
|
146
|
+
standard output. [`SPEC.md` §1](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#1-contract-hierarchy) owns the flags,
|
|
147
|
+
exit codes, streams and precedence when you pass more than one mode, the
|
|
148
|
+
[diagnostic codes](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#diagnostic-codes) with their classes, and the
|
|
149
|
+
[JSON shape](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#diagnostics-as-json).
|
|
150
|
+
|
|
151
|
+
## Inputs
|
|
152
|
+
|
|
153
|
+
### BibTeX (required)
|
|
154
|
+
|
|
155
|
+
Standard `.bib` files. These are the fields sslabdata interprets. A field not
|
|
156
|
+
listed here is carried through in `bibtex` but is not interpreted and affects
|
|
157
|
+
nothing else:
|
|
158
|
+
|
|
159
|
+
| Field | Becomes |
|
|
160
|
+
|-------|---------|
|
|
161
|
+
| `title` | `title`, LaTeX converted to plain Unicode text; `$...$` math kept as TeX |
|
|
162
|
+
| `author` | `authors`, one authorship per name, each with its `position`, a readable `name`, its `given` / `von` / `family` / `suffix` parts (or `literal` for a brace-protected name), `equal_contribution`, a `resolution` record, and exactly one of `person_id` and `collaborator_key` |
|
|
163
|
+
| `editor` | `editors`, read by the same machinery. Editing a volume is not an authorship: editors are in nobody's `work_ids` and produce no collaborator |
|
|
164
|
+
| `year` | `year`, and the sort order of the works list. `null`, with a diagnostic, when the entry has none |
|
|
165
|
+
| `journal` / `booktitle` / `school` / `institution` | `venue`, as `{kind, name}` — the one place sslabdata normalises across entry types. `null` when the entry names no container |
|
|
166
|
+
| `volume`, `number`, `pages`, `series`, `edition`, `publisher`, `address`, `organization`, `chapter`, `month`, `howpublished`, `type` | Properties of the work, under BibTeX's own names and with BibTeX's own meanings |
|
|
167
|
+
| `doi`, `isbn`, `issn`, `eprint` + `archivePrefix` (or `eprinttype`) | `identifiers`, an open map from scheme to a list of identifiers, plus the links built from them. An `eprint`'s scheme is the repository `archivePrefix` or `eprinttype` named, lower-cased, so that field needs no property of its own — and an `eprint` in a repository other than arXiv gets no arXiv link |
|
|
168
|
+
| `abstract` | `abstract` |
|
|
169
|
+
| `note` | `note` |
|
|
170
|
+
| `url` | A link of kind `video` when its host is YouTube or Vimeo (or a subdomain of either), otherwise of kind `url` |
|
|
171
|
+
| `video` | A link of kind `video`, whatever its host, so `url` can hold the work's website |
|
|
172
|
+
| `pdf` | The work's one link of kind `pdf`. An entry without it gets `pdf_base_url` plus its citation key, when `pdf_base_url` is set |
|
|
173
|
+
| `project` | `project_ids` (see below) |
|
|
174
|
+
| `crossref` | **An error**: the field is rejected, not resolved, and the run fails. Write the fields out on the entry itself |
|
|
175
|
+
|
|
176
|
+
The entry is also re-serialized into a `bibtex` field, so fields sslabdata does
|
|
177
|
+
not interpret are still carried. It is a re-serialization, not a copy
|
|
178
|
+
([`SPEC.md` §5](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#5-input-versus-derived)).
|
|
179
|
+
|
|
180
|
+
### The `project` tag
|
|
181
|
+
|
|
182
|
+
sslabdata adds one custom BibTeX field, `project`, to link a paper to a research
|
|
183
|
+
project:
|
|
184
|
+
|
|
185
|
+
```bibtex
|
|
186
|
+
@inproceedings{cote2024pantry,
|
|
187
|
+
title = {Where Does This Go? Object Placement in Unfamiliar Kitchens},
|
|
188
|
+
author = {C{\^o}t{\'e}, Carol and Davis, Dave and Adams, Alice},
|
|
189
|
+
booktitle = {Proceedings of the Conference on Robot Learning Systems},
|
|
190
|
+
year = {2024},
|
|
191
|
+
eprint = {2406.99812},
|
|
192
|
+
archivePrefix = {arXiv},
|
|
193
|
+
project = {homebot}
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Several projects go in one field, comma-separated:
|
|
198
|
+
`project = {homebot, sharedcontrol}`. Each project in the document then
|
|
199
|
+
back-links the works tagged with it, and the people who wrote them.
|
|
200
|
+
|
|
201
|
+
### People (optional, `data/people.yaml`)
|
|
202
|
+
|
|
203
|
+
A list of lab members and alumni. `aliases` tells sslabdata how to match BibTeX
|
|
204
|
+
author names to people:
|
|
205
|
+
|
|
206
|
+
```yaml
|
|
207
|
+
- id: "bbrown"
|
|
208
|
+
name: "Bob Brown"
|
|
209
|
+
aliases: ["B. Brown"]
|
|
210
|
+
role: "phd_student"
|
|
211
|
+
status: "current"
|
|
212
|
+
website: "https://example.org/people/bbrown"
|
|
213
|
+
co_advisor: "Peggy Park"
|
|
214
|
+
start_year: 2021
|
|
215
|
+
|
|
216
|
+
- id: "iingram"
|
|
217
|
+
name: "Ivan Ingram"
|
|
218
|
+
aliases: ["I. Ingram"]
|
|
219
|
+
role: "phd_student"
|
|
220
|
+
status: "alumni"
|
|
221
|
+
start_year: 2016
|
|
222
|
+
end_year: 2022
|
|
223
|
+
degree: "PhD"
|
|
224
|
+
thesis_title: "Learning Grasp Affordances from Play"
|
|
225
|
+
current_position: "Research Scientist, Example Robotics Inc."
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
`id` and `name` are required. `role` is any non-empty string, so any lab's
|
|
229
|
+
roles fit; `status` is `current` (the default) or `alumni`.
|
|
230
|
+
|
|
231
|
+
### External co-authors (optional, `data/collaborators.yaml`)
|
|
232
|
+
|
|
233
|
+
A list of co-authors outside the lab whose spellings you want grouped
|
|
234
|
+
together. It only decides which authorships share one `collaborators`
|
|
235
|
+
entry; it never makes anyone a lab member and never produces a `person_id`:
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
- name: "Priya Patel"
|
|
239
|
+
aliases: ["P. Patel"]
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
`Patel, Priya` and `Patel, P.` are then one collaborator, with
|
|
243
|
+
`grouped_by: declared`. A different `Patel, Pradeep` is not joined, because
|
|
244
|
+
nothing declares him. A name or alias that a lab member already declares is
|
|
245
|
+
reported under `RESOLVE-COLLABORATOR-ALIAS-IS-MEMBER` and left to the member.
|
|
246
|
+
|
|
247
|
+
### Projects (optional, `data/projects.yaml`)
|
|
248
|
+
|
|
249
|
+
```yaml
|
|
250
|
+
- id: "homebot"
|
|
251
|
+
title: "Household Manipulation"
|
|
252
|
+
description: "Robots that tidy up, fetch things and put them away in real homes."
|
|
253
|
+
website: "https://example.org/projects/homebot"
|
|
254
|
+
image: "images/projects/homebot.jpg"
|
|
255
|
+
status: "active"
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
`id` and `title` are required; `status` is `active` (the default) or
|
|
259
|
+
`completed`. `image` is a URL or a site path, the same kind of value as a
|
|
260
|
+
person's `photo`, and is `null` when absent. It is carried as plain text:
|
|
261
|
+
deciding which URLs are safe to render is the renderer's job.
|
|
262
|
+
|
|
263
|
+
## How author matching works
|
|
264
|
+
|
|
265
|
+
sslabdata matches the structured parts of each BibTeX author name (given, von,
|
|
266
|
+
family, suffix) to lab members: first on the full name against each person's
|
|
267
|
+
`name` and any alias written in full, then, only when the name is itself
|
|
268
|
+
abbreviated, on a declared alias. Nothing is guessed. A name that fits more
|
|
269
|
+
than one person gets no `person_id` and is reported under
|
|
270
|
+
`RESOLVE-AMBIGUOUS-NAME`; a near miss is never linked and is reported under
|
|
271
|
+
`RESOLVE-SUGGESTION` with the ids it might be. Both are warnings, so
|
|
272
|
+
`--validate` lists them and still exits `0`. To resolve one, add the spelling
|
|
273
|
+
to that person's `aliases`. [`SPEC.md`](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#how-a-name-is-matched) gives
|
|
274
|
+
the normalisation and the order the match decides in.
|
|
275
|
+
|
|
276
|
+
A name that matches nobody keeps `person_id: null` and its authorship
|
|
277
|
+
references a `collaborators` entry instead, by `collaborator_key`.
|
|
278
|
+
`sslabdata --config lab.yaml --unresolved` lists those names so you can add
|
|
279
|
+
aliases — or, if you have configured no `people_file`, tells you resolution
|
|
280
|
+
was never attempted.
|
|
281
|
+
|
|
282
|
+
`collaborators` is a grouping over unresolved authorships, not a list of
|
|
283
|
+
humans, and its `key` is a lookup key, not an identity. The grouping can be
|
|
284
|
+
wrong in both directions, so sslabdata reports a key that spans more than one
|
|
285
|
+
spelling and an initials-only key that could be any of several fuller ones,
|
|
286
|
+
and `collaborators_file` lets you join spellings yourself. What the grouping
|
|
287
|
+
does and does not promise is in
|
|
288
|
+
[`SPEC.md` §5](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#5-input-versus-derived).
|
|
289
|
+
|
|
290
|
+
## Reading the document
|
|
291
|
+
|
|
292
|
+
The output is one YAML or JSON file. Strings in it that are meant for display
|
|
293
|
+
are plain Unicode text: not HTML, not Markdown, not escaped. They are
|
|
294
|
+
untrusted, and a title really may contain `<`, `&`, `"` or `*`, so **escape
|
|
295
|
+
them when you render them**. Math is the one markup exception and stays
|
|
296
|
+
delimited by `$…$`. `bibtex`, identifiers and URLs are not display text.
|
|
297
|
+
|
|
298
|
+
sslabdata enforces that rule only where it converts LaTeX from BibTeX. Strings
|
|
299
|
+
you supply directly in YAML, and everything under `lab`, are copied through as
|
|
300
|
+
written and never checked, so keeping them plain is on you.
|
|
301
|
+
[`SPEC.md` §2](https://github.com/siddhss5/sslabdata/blob/main/SPEC.md#2-the-text-rule) draws the line precisely.
|
|
302
|
+
|
|
303
|
+
Validate a document against the schema with any JSON Schema tool. sslabdata
|
|
304
|
+
does not do this for you, and does not depend on a validator — `jsonschema`
|
|
305
|
+
is a test-only dependency, so install it first. The installed package carries
|
|
306
|
+
the current schema:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
pip install jsonschema
|
|
310
|
+
python -c "
|
|
311
|
+
import json, yaml, jsonschema
|
|
312
|
+
from importlib.resources import files
|
|
313
|
+
schema = json.loads(files('sslabdata.schema').joinpath('v5/output.schema.json').read_text())
|
|
314
|
+
jsonschema.Draft202012Validator(schema).validate(yaml.safe_load(open('lab.yml')))
|
|
315
|
+
print('valid')
|
|
316
|
+
"
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## Python API
|
|
320
|
+
|
|
321
|
+
The CLI is the reference compiler. The Python API is a convenience wrapper
|
|
322
|
+
over the same pipeline:
|
|
323
|
+
|
|
324
|
+
```python
|
|
325
|
+
from sslabdata import LabDataConfig, assemble, export_to_yaml
|
|
326
|
+
|
|
327
|
+
config = LabDataConfig.from_yaml("lab.yaml")
|
|
328
|
+
data = assemble(config)
|
|
329
|
+
|
|
330
|
+
export_to_yaml(data, "lab.yml")
|
|
331
|
+
|
|
332
|
+
for work in data.works:
|
|
333
|
+
authors = ", ".join(a.name for a in work.authors)
|
|
334
|
+
print(f"{work.title} ({authors})")
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Public: the names exported from `sslabdata/__init__.py`. Everything else —
|
|
338
|
+
`sslabdata.parsers`, `sslabdata.loaders`, `sslabdata.resolver` — is private and may
|
|
339
|
+
change without a version bump.
|
|
340
|
+
|
|
341
|
+
## The demo renderer
|
|
342
|
+
|
|
343
|
+
[sslabdata-site](https://github.com/siddhss5/sslabdata-site) renders the Example
|
|
344
|
+
Lab document as a website ([what it looks like](https://siddhss5.github.io/sslabdata-site/)).
|
|
345
|
+
It is an **optional downstream consumer**, not part of sslabdata and not part of
|
|
346
|
+
what sslabdata promises; it installs sslabdata from a pinned tag or commit and keeps its own
|
|
347
|
+
copy of the demo. sslabdata ignores a `site:` section in `lab.yaml`, so a
|
|
348
|
+
renderer can keep its own settings there.
|
|
349
|
+
|
|
350
|
+
### Before a release (maintainers)
|
|
351
|
+
|
|
352
|
+
These steps are run from a clone: `tools/` is not in the published package.
|
|
353
|
+
Before publishing a sslabdata release, build sslabdata-site against the candidate:
|
|
354
|
+
run its **Release gate** workflow with the candidate's git ref as
|
|
355
|
+
`sslabdata_ref`. It builds without deploying, and keeps the renderer's toolchain
|
|
356
|
+
out of this repository's CI.
|
|
357
|
+
|
|
358
|
+
Also run the smoke check over real, messy bibliographies. It compiles each
|
|
359
|
+
`.bib` file under a directory on its own. It must report no crashes and no
|
|
360
|
+
uncoded lines. Review any LaTeX remnants it lists. A local TeX Live installation
|
|
361
|
+
has a directory of such files. Nothing is fetched, and nothing from it is
|
|
362
|
+
committed. It is not in CI because it needs TeX:
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
uv run python tools/smoke.py /usr/local/texlive/2025/texmf-dist/bibtex/bib
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Releasing (maintainers)
|
|
369
|
+
|
|
370
|
+
Releases are published by `.github/workflows/release.yml` through PyPI
|
|
371
|
+
Trusted Publishing; no token is stored anywhere. The version is written in
|
|
372
|
+
`pyproject.toml` and in `sslabdata/__init__.py`, and every tag must equal it.
|
|
373
|
+
|
|
374
|
+
1. **Rehearse on TestPyPI.** Set both versions to a release candidate, such
|
|
375
|
+
as `3.0.0rc1`, merge that, then tag the merge commit and push the tag:
|
|
376
|
+
`git tag v3.0.0rc1 && git push origin v3.0.0rc1`. The workflow builds and
|
|
377
|
+
checks the distributions, runs the full test suite, publishes those exact
|
|
378
|
+
files to TestPyPI, and installs `sslabdata==3.0.0rc1` back from it. A
|
|
379
|
+
failed rehearsal is repeated as `rc2`, since an index accepts each
|
|
380
|
+
version once.
|
|
381
|
+
2. **Release.** Set both versions to `3.0.0`, date the CHANGELOG heading,
|
|
382
|
+
merge, and push the tag `v3.0.0`. The PyPI job waits in the `release`
|
|
383
|
+
environment for a reviewer's approval, then publishes the files the run
|
|
384
|
+
checked and creates the GitHub Release with them.
|
|
385
|
+
3. **Approve** from the Actions page, or from the command line:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
RUN=$(gh run list -R siddhss5/sslabdata --workflow release.yml --event push \
|
|
389
|
+
--limit 1 --json databaseId -q '.[0].databaseId')
|
|
390
|
+
gh api repos/siddhss5/sslabdata/actions/runs/$RUN/pending_deployments \
|
|
391
|
+
-q '.[] | "\(.environment.name) \(.environment.id)"' # what waits
|
|
392
|
+
gh api -X POST repos/siddhss5/sslabdata/actions/runs/$RUN/pending_deployments \
|
|
393
|
+
-F 'environment_ids[]=<id>' -f state=approved -f comment='Release'
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
A manual run of the workflow only builds and checks, unless its
|
|
397
|
+
`publish_testpypi` box is ticked.
|
|
398
|
+
|
|
399
|
+
## Dependencies
|
|
400
|
+
|
|
401
|
+
- **pybtex** — BibTeX parsing
|
|
402
|
+
- **pylatexenc** — LaTeX to Unicode text
|
|
403
|
+
- **pyyaml** — YAML I/O
|
|
404
|
+
|
|
405
|
+
No network calls. All processing is local and offline.
|
|
406
|
+
|
|
407
|
+
## License
|
|
408
|
+
|
|
409
|
+
MIT License. Copyright (c) 2024 Personal Robotics Laboratory, University of Washington.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
sslabdata/__init__.py,sha256=o4Hx7zZk47Kved7lc4nBPLWyE4kQkbSRnipZ9IiQTaI,1044
|
|
2
|
+
sslabdata/assembler.py,sha256=uaL0Bs59gmanQzDfJ_y5UPjAj2EwPNS1nEtlDGOMnLA,18885
|
|
3
|
+
sslabdata/cli.py,sha256=ZSg6aRxPdaezvxPEq6Cgm7aOAdAPRMP9LxTdU9wTqFg,9787
|
|
4
|
+
sslabdata/config.py,sha256=fooBGauY01pTJUod11dkwedtm6uRf_M3PKjMVlQcYkQ,18424
|
|
5
|
+
sslabdata/diagnostics.py,sha256=3LKKK68x5If18_A92sXbPbHbF5hAN7twLhek67keep0,5618
|
|
6
|
+
sslabdata/exporters.py,sha256=rxO1Bdc3500xsAhyumUJmXzmJlmWqxd154tJPi0Vx80,2769
|
|
7
|
+
sslabdata/loaders.py,sha256=BcO2sxjVSMRZeyfAwUYODkGEHHNQYuFDw2OV1HnrS_g,13026
|
|
8
|
+
sslabdata/models.py,sha256=e182TLALdGU-4W1DMrTCND7z6qmmTWtva7qKQmFjBFM,11286
|
|
9
|
+
sslabdata/resolver.py,sha256=yH-EXy2TRzj_iuf0BsC1L8pF9eRpxZVyKK_Wdc15LOs,20472
|
|
10
|
+
sslabdata/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
sslabdata/parsers/bibtex.py,sha256=Oq7V-Q8m0C2UeGer4IRAcoLXpe6FitBQ85N9OKfvsE8,48154
|
|
12
|
+
sslabdata/parsers/latex.py,sha256=E8vEqMzlA8KutRj6UWFb1Y6Wp688bWsmBGgIvIMt-Ik,9059
|
|
13
|
+
sslabdata/schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
sslabdata/schema/v5/output.schema.json,sha256=FIwzA7nbj8hCf41_P0o-u0QkKUHCOrglcn8boeu-b7I,21470
|
|
15
|
+
sslabdata-3.0.0.dist-info/licenses/LICENSE,sha256=5ENLFabcKrRpPVaQBAO13RJo_wGfsTwV_h-NnrEtRhI,1111
|
|
16
|
+
sslabdata-3.0.0.dist-info/METADATA,sha256=KTW628WtenFuFeHJ65x6UVnxfhqsEqhpCiW9ed0UFTI,18600
|
|
17
|
+
sslabdata-3.0.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
18
|
+
sslabdata-3.0.0.dist-info/entry_points.txt,sha256=qZjVLHSU8Jy91qz5l_hfPMQA7OjrSaE5DQQM1Tqx8ns,49
|
|
19
|
+
sslabdata-3.0.0.dist-info/top_level.txt,sha256=ZlzmDE8BqcwP08dd9wMK-U9YK4yFkLZfrXqqTIbyZLg,10
|
|
20
|
+
sslabdata-3.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Personal Robotics Laboratory, University of Washington
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sslabdata
|