Skip to content

Commit

Permalink
Update monty version setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Jul 29, 2024
1 parent e76b9fb commit e63e57d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## 2024.7.29
- Fix line ending in reverse_readfile/readline in Windows (@DanielYang59)
- Add missing functools.wraps decorator to deprecated decorator and handle dataclass properly (@DanielYang59)
- Add pint Quantity support to JSON (@rkingsbury)

## 2024.7.12
- Make cached_class decorated classes picklable (@janosh)
- deprecated decorator allow replacement as string (@DanielYang59)
Expand Down
9 changes: 8 additions & 1 deletion src/monty/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@

from __future__ import annotations

from importlib.metadata import PackageNotFoundError, version

__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2014, The Materials Virtual Lab"
__version__ = "2024.7.12"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__date__ = "Oct 12 2020"

try:
__version__ = version("pymatgen")
except PackageNotFoundError: # pragma: no cover
# package is not installed
pass
8 changes: 0 additions & 8 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ def commit(ctx: Context) -> None:

@task
def set_ver(ctx: Context) -> None:
with open("monty/__init__.py", encoding="utf-8") as f:
contents = f.read()
contents = re.sub(
r"__version__ = .*\n", '__version__ = "%s"\n' % NEW_VER, contents
)

with open("monty/__init__.py", "w", encoding="utf-8") as f:
f.write(contents)

with open("pyproject.toml", encoding="utf-8") as f:
contents = f.read()
Expand Down

0 comments on commit e63e57d

Please sign in to comment.