Skip to content

Commit

Permalink
Split ml deps into new option (#852)
Browse files Browse the repository at this point in the history
* Split ml deps into new option

* Fix matcalc option

* Linting

* Fix pre-commit

* Bump pymatgen

* Linting
  • Loading branch information
munrojm committed Oct 12, 2023
1 parent 4f2d9a0 commit e363e07
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
rev: v0.0.261
hooks:
- id: ruff
args: [--fix, --ignore, "D,E501,E741", --exclude, "__init__.py,emmet-cli,*_resources.py"]
args: [--fix, --ignore, "D,E501,E741,E402", --exclude, "__init__.py,emmet-cli,*_resources.py"]

- repo: https://github.com/psf/black
rev: 23.3.0
Expand Down
4 changes: 3 additions & 1 deletion emmet-api/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import time

start = time.perf_counter()
import logging

logging.getLogger("uvicorn.access").handlers = []
from asgi_logger import AccessLoggerMiddleware

Expand All @@ -25,7 +27,7 @@
app = api.app
app.add_middleware(
AccessLoggerMiddleware,
format='%(h)s %(t)s %(m)s %(U)s?%(q)s %(H)s %(s)s %(b)s "%(f)s" "%(a)s" %(D)s %(p)s %({x-consumer-id}i)s'
format='%(h)s %(t)s %(m)s %(U)s?%(q)s %(H)s %(s)s %(b)s "%(f)s" "%(a)s" %(D)s %(p)s %({x-consumer-id}i)s',
)
delta = time.perf_counter() - start
logger.warning(f"Startup took {delta:.1f}s")
1 change: 1 addition & 0 deletions emmet-builders/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
packages=find_namespace_packages(include=["emmet.*"]),
install_requires=[
"emmet-core[all]",
"emmet-core[ml]",
"maggma>=0.57.0",
"matminer>=0.7.3",
],
Expand Down
7 changes: 3 additions & 4 deletions emmet-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
include_package_data=True,
install_requires=[
"pymatgen>=2023.10.4",
"pymatgen>=2023.10.11",
"monty>=2023.9.25",
"pydantic>=2.0",
"pydantic-settings>=2.0",
Expand All @@ -24,14 +24,13 @@
],
extras_require={
"all": [
"matcalc",
"seekpath>=2.0.1",
"robocrys>=0.2.8",
"pymatgen-analysis-diffusion>=2023.8.15",
"pymatgen-analysis-alloys>=0.0.3",
"matcalc",
"chgnet",
"matgl",
],
"ml": ["chgnet", "matgl"],
"test": [
"pre-commit",
"pytest",
Expand Down

0 comments on commit e363e07

Please sign in to comment.