open-paleo 0.4.7__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.
- open_paleo-0.4.7/.gitignore +30 -0
- open_paleo-0.4.7/LICENSE +41 -0
- open_paleo-0.4.7/PKG-INFO +71 -0
- open_paleo-0.4.7/README.md +49 -0
- open_paleo-0.4.7/pyproject.toml +41 -0
- open_paleo-0.4.7/src/open_paleo/__init__.py +746 -0
- open_paleo-0.4.7/src/open_paleo/py.typed +0 -0
- open_paleo-0.4.7/src/open_paleo/schema.json +397 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# NodeJS
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Project-specific
|
|
5
|
+
dist/
|
|
6
|
+
staging/
|
|
7
|
+
|
|
8
|
+
# Local working plans — kept out of the repo.
|
|
9
|
+
.claude/plans/
|
|
10
|
+
|
|
11
|
+
# Every generated report, cache, queue and intermediate is written under
|
|
12
|
+
# scratch/, and NOTHING there is ever committed: missing-fields reports,
|
|
13
|
+
# extraction prompts, audit slices, paper-watch digests, DOI audits, triage
|
|
14
|
+
# checklists. All of it is regenerable from the data plus the corpus. If
|
|
15
|
+
# something under scratch/ turns out to be worth keeping, it belongs in a GitHub
|
|
16
|
+
# issue, not in the repo.
|
|
17
|
+
scratch/
|
|
18
|
+
|
|
19
|
+
# Paper-watch incremental state — persisted between CI runs via actions/cache,
|
|
20
|
+
# never committed (and written locally by a dry run with --write-state).
|
|
21
|
+
.github/paper-watch/
|
|
22
|
+
|
|
23
|
+
# Local environment / secrets (e.g. OPENALEX_API_KEY for paper-watch).
|
|
24
|
+
# Loaded by `npm run paper-watch` via node --env-file-if-exists; never committed.
|
|
25
|
+
# CI supplies the same vars from workflow secrets, so no .env exists there.
|
|
26
|
+
.env
|
|
27
|
+
.env.*
|
|
28
|
+
|
|
29
|
+
# MacOS
|
|
30
|
+
.DS_Store
|
open_paleo-0.4.7/LICENSE
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Creative Commons Attribution 4.0 International
|
|
2
|
+
|
|
3
|
+
Copyright (c) Open Paleo contributors
|
|
4
|
+
|
|
5
|
+
This work is licensed under the Creative Commons Attribution 4.0
|
|
6
|
+
International License. To view a copy of this license, visit
|
|
7
|
+
https://creativecommons.org/licenses/by/4.0/ or send a letter to
|
|
8
|
+
Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
|
9
|
+
|
|
10
|
+
You are free to:
|
|
11
|
+
|
|
12
|
+
Share - copy and redistribute the material in any medium or format
|
|
13
|
+
for any purpose, even commercially.
|
|
14
|
+
|
|
15
|
+
Adapt - remix, transform, and build upon the material for any
|
|
16
|
+
purpose, even commercially.
|
|
17
|
+
|
|
18
|
+
Under the following terms:
|
|
19
|
+
|
|
20
|
+
Attribution - You must give appropriate credit, provide a link to
|
|
21
|
+
the license, and indicate if changes were made. You may do so in
|
|
22
|
+
any reasonable manner, but not in any way that suggests the
|
|
23
|
+
licensor endorses you or your use.
|
|
24
|
+
|
|
25
|
+
No additional restrictions - You may not apply legal terms or
|
|
26
|
+
technological measures that legally restrict others from doing
|
|
27
|
+
anything the license permits.
|
|
28
|
+
|
|
29
|
+
Notices:
|
|
30
|
+
|
|
31
|
+
You do not have to comply with the license for elements of the
|
|
32
|
+
material in the public domain or where your use is permitted by
|
|
33
|
+
an applicable exception or limitation.
|
|
34
|
+
|
|
35
|
+
No warranties are given. The license may not give you all of the
|
|
36
|
+
permissions necessary for your intended use. For example, other
|
|
37
|
+
rights such as publicity, privacy, or moral rights may limit how
|
|
38
|
+
you use the material.
|
|
39
|
+
|
|
40
|
+
For the full legal code, see:
|
|
41
|
+
https://creativecommons.org/licenses/by/4.0/legalcode
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: open-paleo
|
|
3
|
+
Version: 0.4.7
|
|
4
|
+
Summary: Pydantic models and JSON Schema for the Open Paleo dataset
|
|
5
|
+
Project-URL: Homepage, https://github.com/open-paleo/data
|
|
6
|
+
Project-URL: Repository, https://github.com/open-paleo/data
|
|
7
|
+
Project-URL: Issues, https://github.com/open-paleo/data/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/open-paleo/data/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Open Paleo contributors
|
|
10
|
+
License-Expression: CC-BY-4.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: dataset,dinosaurs,json-schema,paleontology,phylogeny,pydantic
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Framework :: Pydantic :: 2
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Requires-Dist: pydantic<3,>=2.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# open-paleo
|
|
24
|
+
|
|
25
|
+
Pydantic v2 models and the JSON Schema for the built [Open Paleo](https://github.com/open-paleo/data) dataset (`open-paleo.json` / `open-paleo.yml`).
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install open-paleo
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Only pre-1.0 versions are published so far. Until 1.0.0 the output format can change in incompatible ways between minor versions (see [Versioning](#versioning)), so pin to one minor line: `open-paleo~=0.4.7` accepts 0.4.7 and later 0.4 releases, but not 0.5.
|
|
34
|
+
|
|
35
|
+
## Models
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from pathlib import Path
|
|
39
|
+
|
|
40
|
+
from open_paleo import OpenPaleoDataset
|
|
41
|
+
|
|
42
|
+
dataset = OpenPaleoDataset.model_validate_json(Path("open-paleo.json").read_bytes())
|
|
43
|
+
|
|
44
|
+
for name, genus in dataset.genera.items():
|
|
45
|
+
print(name, genus.parent)
|
|
46
|
+
|
|
47
|
+
tyrannosaurus = dataset.genera["Tyrannosaurus"]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`OpenPaleoDataset` is the whole file. `genera`, `clades` and `stratigraphy` are dictionaries keyed by name. Every object in the file has a model of its own (`Genus`, `Species`, `Clade`, `Reference`, `StratigraphicUnit`, …). The models are generated from the JSON Schema with [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator). The recursive `tree` is typed as a nested dictionary; its full recursive structure is in the schema.
|
|
51
|
+
|
|
52
|
+
## JSON Schema
|
|
53
|
+
|
|
54
|
+
The package also carries the JSON Schema (draft 2020-12) the models are generated from:
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
import json
|
|
58
|
+
from importlib.resources import files
|
|
59
|
+
|
|
60
|
+
schema = json.loads(files("open_paleo").joinpath("schema.json").read_text(encoding="utf-8"))
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Versioning
|
|
64
|
+
|
|
65
|
+
The package version is the dataset's output schema version, `_metadata.schema_version` in `open-paleo.json`. Install the version that matches the dataset you read. A data release that leaves the output format unchanged publishes no new package version.
|
|
66
|
+
|
|
67
|
+
The rules for when the schema version changes are in [docs/VERSIONING.md](https://github.com/open-paleo/data/blob/main/docs/VERSIONING.md), and each change is listed in the [CHANGELOG](https://github.com/open-paleo/data/blob/main/CHANGELOG.md).
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), like the dataset. Credit "Open Paleo contributors".
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# open-paleo
|
|
2
|
+
|
|
3
|
+
Pydantic v2 models and the JSON Schema for the built [Open Paleo](https://github.com/open-paleo/data) dataset (`open-paleo.json` / `open-paleo.yml`).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install open-paleo
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Only pre-1.0 versions are published so far. Until 1.0.0 the output format can change in incompatible ways between minor versions (see [Versioning](#versioning)), so pin to one minor line: `open-paleo~=0.4.7` accepts 0.4.7 and later 0.4 releases, but not 0.5.
|
|
12
|
+
|
|
13
|
+
## Models
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
|
|
18
|
+
from open_paleo import OpenPaleoDataset
|
|
19
|
+
|
|
20
|
+
dataset = OpenPaleoDataset.model_validate_json(Path("open-paleo.json").read_bytes())
|
|
21
|
+
|
|
22
|
+
for name, genus in dataset.genera.items():
|
|
23
|
+
print(name, genus.parent)
|
|
24
|
+
|
|
25
|
+
tyrannosaurus = dataset.genera["Tyrannosaurus"]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`OpenPaleoDataset` is the whole file. `genera`, `clades` and `stratigraphy` are dictionaries keyed by name. Every object in the file has a model of its own (`Genus`, `Species`, `Clade`, `Reference`, `StratigraphicUnit`, …). The models are generated from the JSON Schema with [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator). The recursive `tree` is typed as a nested dictionary; its full recursive structure is in the schema.
|
|
29
|
+
|
|
30
|
+
## JSON Schema
|
|
31
|
+
|
|
32
|
+
The package also carries the JSON Schema (draft 2020-12) the models are generated from:
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
import json
|
|
36
|
+
from importlib.resources import files
|
|
37
|
+
|
|
38
|
+
schema = json.loads(files("open_paleo").joinpath("schema.json").read_text(encoding="utf-8"))
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Versioning
|
|
42
|
+
|
|
43
|
+
The package version is the dataset's output schema version, `_metadata.schema_version` in `open-paleo.json`. Install the version that matches the dataset you read. A data release that leaves the output format unchanged publishes no new package version.
|
|
44
|
+
|
|
45
|
+
The rules for when the schema version changes are in [docs/VERSIONING.md](https://github.com/open-paleo/data/blob/main/docs/VERSIONING.md), and each change is listed in the [CHANGELOG](https://github.com/open-paleo/data/blob/main/CHANGELOG.md).
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), like the dataset. Credit "Open Paleo contributors".
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling==1.33.0"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "open-paleo"
|
|
7
|
+
# Placeholder: the staging script sets the version from schema_version.
|
|
8
|
+
version = "0.4.7"
|
|
9
|
+
description = "Pydantic models and JSON Schema for the Open Paleo dataset"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = "CC-BY-4.0"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Open Paleo contributors" }]
|
|
14
|
+
requires-python = ">=3.9"
|
|
15
|
+
# A range, not an exact pin: a library pinning pydantic would conflict with
|
|
16
|
+
# every project that installs it. 2.10 is the first release that does not warn
|
|
17
|
+
# about the model_plate_id field.
|
|
18
|
+
dependencies = ["pydantic>=2.10,<3"]
|
|
19
|
+
keywords = ["paleontology", "dinosaurs", "phylogeny", "dataset", "json-schema", "pydantic"]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 3 - Alpha",
|
|
22
|
+
"Framework :: Pydantic :: 2",
|
|
23
|
+
"Intended Audience :: Science/Research",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
26
|
+
"Typing :: Typed",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/open-paleo/data"
|
|
31
|
+
Repository = "https://github.com/open-paleo/data"
|
|
32
|
+
Issues = "https://github.com/open-paleo/data/issues"
|
|
33
|
+
Changelog = "https://github.com/open-paleo/data/blob/main/CHANGELOG.md"
|
|
34
|
+
|
|
35
|
+
# The package is staged under scratch/, which the repository's .gitignore
|
|
36
|
+
# excludes; without ignore-vcs, hatchling would leave every file out.
|
|
37
|
+
[tool.hatch.build]
|
|
38
|
+
ignore-vcs = true
|
|
39
|
+
|
|
40
|
+
[tool.hatch.build.targets.wheel]
|
|
41
|
+
packages = ["src/open_paleo"]
|