Skip to content

Commit c544b6d

Browse files
Merge pull request #2454 from abillscmu/main
cherry picking to eliminate Julia
2 parents 823aab0 + f4b9cf1 commit c544b6d

File tree

19 files changed

+6
-2046
lines changed

19 files changed

+6
-2046
lines changed

.github/workflows/test_on_push.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ jobs:
5555
with:
5656
python-version: ${{ matrix.python-version }}
5757

58-
- name: Set up Julia
59-
if: matrix.os != 'windows-latest'
60-
uses: julia-actions/setup-julia@v1
61-
with:
62-
version: 1.7
63-
6458
- name: Install Linux system dependencies
6559
if: matrix.os == 'ubuntu-latest'
6660
run: |
@@ -92,10 +86,6 @@ jobs:
9286
if: matrix.os == 'ubuntu-latest'
9387
run: tox -e pybamm-requires
9488

95-
- name: Install Julia
96-
if: matrix.os != 'windows-latest'
97-
run: tox -e julia
98-
9989
- name: Run unit tests for GNU/Linux with Python 3.8
10090
if: matrix.os == 'ubuntu-latest' && matrix.python-version != 3.9
10191
run: python -m tox -e unit

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ test.json
112112
# tox
113113
.tox/
114114

115-
# julia
116-
Manifest.toml
117-
118115
# vcpkg
119116
vcpkg_installed/
120117

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# [Unreleased](https://github.com/pybamm-team/PyBaMM/)
22

3+
# [v22.10.post1](https://github.com/pybamm-team/PyBaMM/tree/v22.10.post1) - 2022-10-31
4+
5+
- Removed all julia generation code ([#2453](https://github.com/pybamm-team/PyBaMM/pull/2453)). Julia code will be hosted at [PyBaMM.jl](https://github.com/tinosulzer/PyBaMM.jl) from now on.
6+
37
# [v22.10](https://github.com/pybamm-team/PyBaMM/tree/v22.10) - 2022-10-31
48

59
## Features

docs/source/util.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Utility functions
2222

2323
.. autofunction:: pybamm.get_parameters_filepath
2424

25-
.. autofunction:: pybamm.have_julia
26-
2725
.. autofunction:: pybamm.have_jax
2826

2927
.. autofunction:: pybamm.is_jax_compatible

pybamm/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
have_jax,
5050
install_jax,
5151
is_jax_compatible,
52-
have_julia,
5352
get_git_commit_info,
5453
)
5554
from .logger import logger, set_logging_level
@@ -96,10 +95,6 @@
9695
from .expression_tree.operations.jacobian import Jacobian
9796
from .expression_tree.operations.convert_to_casadi import CasadiConverter
9897
from .expression_tree.operations.unpack_symbols import SymbolUnpacker
99-
from .expression_tree.operations.evaluate_julia import (
100-
get_julia_function,
101-
get_julia_mtk_model,
102-
)
10398

10499
#
105100
# Model classes

pybamm/expression_tree/functions.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,6 @@ def _sympy_operator(self, child):
201201
"""Apply appropriate SymPy operators."""
202202
return child
203203

204-
@property
205-
def julia_name(self):
206-
"Return the name of the equivalent Julia function, for generating Julia code"
207-
raise NotImplementedError(
208-
"No julia name defined for function {}".format(self.function)
209-
)
210-
211204
def to_equation(self):
212205
"""Convert the node and its subtree into a SymPy equation."""
213206
if self.print_name is not None:
@@ -256,14 +249,6 @@ def _function_new_copy(self, children):
256249
"""See :meth:`pybamm.Function._function_new_copy()`"""
257250
return pybamm.simplify_if_constant(self.__class__(*children))
258251

259-
@property
260-
def julia_name(self):
261-
"""See :meth:`pybamm.Function.julia_name`"""
262-
# By default, the julia name for a specific function is the class name
263-
# in lowercase
264-
# Some functions may overwrite this
265-
return self.__class__.__name__.lower()
266-
267252
def _sympy_operator(self, child):
268253
"""Apply appropriate SymPy operators."""
269254
class_name = self.__class__.__name__.lower()
@@ -281,11 +266,6 @@ def _function_diff(self, children, idx):
281266
"""See :meth:`pybamm.Symbol._function_diff()`."""
282267
return 1 / sqrt(children[0] ** 2 + 1)
283268

284-
@property
285-
def julia_name(self):
286-
"""See :meth:`pybamm.Function.julia_name`"""
287-
return "asinh"
288-
289269
def _sympy_operator(self, child):
290270
"""Override :meth:`pybamm.Function._sympy_operator`"""
291271
return sympy.asinh(child)
@@ -306,11 +286,6 @@ def _function_diff(self, children, idx):
306286
"""See :meth:`pybamm.Function._function_diff()`."""
307287
return 1 / (children[0] ** 2 + 1)
308288

309-
@property
310-
def julia_name(self):
311-
"""See :meth:`pybamm.Function.julia_name`"""
312-
return "atan"
313-
314289
def _sympy_operator(self, child):
315290
"""Override :meth:`pybamm.Function._sympy_operator`"""
316291
return sympy.atan(child)
@@ -426,11 +401,6 @@ class Max(SpecificFunction):
426401
def __init__(self, child):
427402
super().__init__(np.max, child)
428403

429-
@property
430-
def julia_name(self):
431-
"""See :meth:`pybamm.Function.julia_name`"""
432-
return "maximum"
433-
434404
def _evaluate_for_shape(self):
435405
"""See :meth:`pybamm.Symbol.evaluate_for_shape_using_domain()`"""
436406
# Max will always return a scalar
@@ -451,11 +421,6 @@ class Min(SpecificFunction):
451421
def __init__(self, child):
452422
super().__init__(np.min, child)
453423

454-
@property
455-
def julia_name(self):
456-
"""See :meth:`pybamm.Function.julia_name`"""
457-
return "minimum"
458-
459424
def _evaluate_for_shape(self):
460425
"""See :meth:`pybamm.Symbol.evaluate_for_shape_using_domain()`"""
461426
# Min will always return a scalar

0 commit comments

Comments
 (0)