Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/SOF-7476 update: rewrite Standata to new specs #11

Merged
merged 25 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
07e620e
wip: coarse idea
VsevolodX Oct 24, 2024
f190484
chore: remove old files
VsevolodX Oct 25, 2024
0ee5bd2
update: restructure standata
VsevolodX Oct 25, 2024
f81dbb4
update: fix tests
VsevolodX Oct 25, 2024
d935691
chore: sync approach with the rest
VsevolodX Oct 25, 2024
def3c9f
update: adjust build script
VsevolodX Oct 25, 2024
7183e4c
update: remove erroneous
VsevolodX Oct 25, 2024
864a7cc
update: progress in rewriting
VsevolodX Oct 25, 2024
784ba8c
update: fix 1 test
VsevolodX Oct 25, 2024
abfdb20
update: fix inits
VsevolodX Oct 25, 2024
e7913bc
update: make work
VsevolodX Oct 25, 2024
15c8523
update: move init to base
VsevolodX Oct 25, 2024
6b14e15
update: make tests pass
VsevolodX Oct 25, 2024
81a8bef
chore: cleanup
VsevolodX Oct 25, 2024
f1d7123
update: fix get be categories one shot claude
VsevolodX Oct 26, 2024
b9be5fd
update: do not lint data
VsevolodX Oct 26, 2024
cd739a0
chore: updates for local dev
VsevolodX Oct 26, 2024
2126a55
update: remove need for initialization
VsevolodX Oct 26, 2024
7ae619a
chore: adjust tsts
VsevolodX Oct 26, 2024
09ccdf9
chore: address PR comments
VsevolodX Oct 28, 2024
582e9df
update: adjust types in standata builder + docstrings
VsevolodX Oct 28, 2024
14c6f27
chore: place tests from materials standata in one file
VsevolodX Oct 28, 2024
7e39ebc
update: generate tests for standata builder and cli with claude
VsevolodX Oct 28, 2024
7c196bd
update: restructure standata tests
VsevolodX Oct 29, 2024
da74d72
update: remove duplication using conftest
VsevolodX Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ __pycache__/
# Distribution / packaging
.Python
build/
!src/py/mat3ra/standata/build
develop-eggs/
dist/
downloads/
Expand Down
8 changes: 4 additions & 4 deletions build_runtime_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,25 @@ buildAsset({

buildAsset({
assetPath: "./materials/categories.yml",
targetPath: "./src/py/mat3ra/standata/materials.py",
targetPath: "./src/py/mat3ra/standata/data/materials.py",
contentGenerator: (content) =>
`import json\n\nmaterials_data = json.loads(r'''${JSON.stringify(content)}''')\n`,
});
buildAsset({
assetPath: "./properties/categories.yml",
targetPath: "./src/py/mat3ra/standata/properties.py",
targetPath: "./src/py/mat3ra/standata/data/properties.py",
contentGenerator: (content) =>
`import json\n\nproperties_data = json.loads(r'''${JSON.stringify(content)}''')\n`,
});
buildAsset({
assetPath: "./applications/categories.yml",
targetPath: "./src/py/mat3ra/standata/applications.py",
targetPath: "./src/py/mat3ra/standata/data/applications.py",
contentGenerator: (content) =>
`import json\n\napplications_data = json.loads(r'''${JSON.stringify(content)}''')\n`,
});
buildAsset({
assetPath: "./workflows/categories.yml",
targetPath: "./src/py/mat3ra/standata/workflows.py",
targetPath: "./src/py/mat3ra/standata/data/workflows.py",
contentGenerator: (content) =>
`import json\n\nworkflows_data = json.loads(r'''${JSON.stringify(content)}''')\n`,
});
32 changes: 26 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,31 @@ dependencies = [
"pyyaml",
"pandas",
"typer",
"pydantic",
]

[project.optional-dependencies]
dev = ["pre-commit", "black", "ruff", "isort", "mypy", "pip-tools", "express-py"]
tests = ["pytest", "pytest-cov", "pytest-mock"]
dev = [
"pre-commit",
"black",
"ruff",
"isort",
"mypy",
"pip-tools",
"express-py"
]
tests = [
"coverage[toml]>=5.3",
"pytest",
"pytest-cov",
# B/c of https://github.com/binary-husky/gpt_academic/issues/1237
"gradio",
"pydantic",
]
all = [
"mat3ra-standata[tests]",
"mat3ra-standata[dev]",
]

# Entrypoint scripts can be defined here, see examples below.
[project.scripts]
Expand Down Expand Up @@ -60,10 +80,10 @@ extend-exclude = '''
# Exclude a variety of commonly ignored directories.
extend-exclude = [
"src/js",
"src/py/mat3ra/standata/materials.py",
"src/py/mat3ra/standata/workflows.py",
"src/py/mat3ra/standata/applications.py",
"src/py/mat3ra/standata/properties.py",
"src/py/mat3ra/standata/data/materials.py",
"src/py/mat3ra/standata/data/workflows.py",
"src/py/mat3ra/standata/data/applications.py",
"src/py/mat3ra/standata/data/properties.py",
"tests/js",
]
line-length = 120
Expand Down
1 change: 0 additions & 1 deletion src/py/mat3ra/standata/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from .base import Standata
Loading
Loading