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

Moving to src layout #4311

Merged
merged 18 commits into from
Aug 8, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
style: pre-commit fixes
pre-commit-ci[bot] committed Aug 5, 2024
commit f81306e43adc53c9cd8953adc7884e39580d2b9f
4 changes: 3 additions & 1 deletion scripts/update_version.py
Original file line number Diff line number Diff line change
@@ -24,7 +24,9 @@ def update_version():
)

# pybamm/version.py
with open(os.path.join(pybamm.root_dir(), "src", "pybamm", "version.py"), "r+") as file:
with open(
os.path.join(pybamm.root_dir(), "src", "pybamm", "version.py"), "r+"
) as file:
output = file.read()
replace_version = re.sub(
'(?<=__version__ = ")(.+)(?=")', release_version, output
4 changes: 3 additions & 1 deletion src/pybamm/citations.py
Original file line number Diff line number Diff line change
@@ -68,7 +68,9 @@ def read_citations(self):
"""
try:
parse_file = import_optional_dependency("pybtex.database", "parse_file")
citations_file = os.path.join(pybamm.root_dir(), "src", "pybamm", "CITATIONS.bib")
citations_file = os.path.join(
pybamm.root_dir(), "src", "pybamm", "CITATIONS.bib"
)
bib_data = parse_file(citations_file, bib_format="bibtex")
for key, entry in bib_data.entries.items():
self._add_citation(key, entry)