Skip to content

Commit

Permalink
Merge pull request #11 from Exabyte-io/feature/SOF-7476
Browse files Browse the repository at this point in the history
Feature/SOF-7476 update: rewrite Standata to new specs
  • Loading branch information
VsevolodX authored Oct 29, 2024
2 parents 1686c3d + da74d72 commit 32c6518
Show file tree
Hide file tree
Showing 21 changed files with 503 additions and 187 deletions.
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

0 comments on commit 32c6518

Please sign in to comment.