diffstep 1.1.2__tar.gz → 1.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {diffstep-1.1.2 → diffstep-1.1.3}/CHANGELOG.txt +13 -1
  2. {diffstep-1.1.2/diffstep.egg-info → diffstep-1.1.3}/PKG-INFO +1 -1
  3. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/__init__.py +2 -1
  4. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/pipeline.py +25 -0
  5. {diffstep-1.1.2 → diffstep-1.1.3/diffstep.egg-info}/PKG-INFO +1 -1
  6. {diffstep-1.1.2 → diffstep-1.1.3}/pyproject.toml +1 -1
  7. {diffstep-1.1.2 → diffstep-1.1.3}/setup.py +1 -1
  8. {diffstep-1.1.2 → diffstep-1.1.3}/LICENSE.txt +0 -0
  9. {diffstep-1.1.2 → diffstep-1.1.3}/MANIFEST.in +0 -0
  10. {diffstep-1.1.2 → diffstep-1.1.3}/README.md +0 -0
  11. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/core/__init__.py +0 -0
  12. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/core/nodes.py +0 -0
  13. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/core/normalise.py +0 -0
  14. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/core/parser.py +0 -0
  15. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/core/tokeniser.py +0 -0
  16. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/differentiation/__init__.py +0 -0
  17. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/differentiation/derivative.py +0 -0
  18. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/printer/__init__.py +0 -0
  19. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/printer/to_string.py +0 -0
  20. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/simplify/__init__.py +0 -0
  21. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep/simplify/simplify.py +0 -0
  22. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep.egg-info/SOURCES.txt +0 -0
  23. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep.egg-info/dependency_links.txt +0 -0
  24. {diffstep-1.1.2 → diffstep-1.1.3}/diffstep.egg-info/top_level.txt +0 -0
  25. {diffstep-1.1.2 → diffstep-1.1.3}/setup.cfg +0 -0
@@ -25,7 +25,7 @@
25
25
  ### Bugfix
26
26
  - Fixed bug where you could not import diffstep from terminal
27
27
 
28
- ## [1.2.0] - 2026-03-13
28
+ ## [1.1.2] - 2026-03-13
29
29
 
30
30
  ### Added
31
31
  - Layered API design to support both beginner and advanced users
@@ -40,3 +40,15 @@
40
40
  ### Developer
41
41
  - Refactored internal pipeline to support multiple public entry points
42
42
 
43
+ ## [1.1.3] - 2026-03-17
44
+
45
+ ### Added
46
+ - New `gradient(expression, x_value)` function to evaluate the derivative at a specific x-value
47
+ - New `normalise_expression(expression)` helper for expression normalization
48
+ - New `tokenise_expression(expression)` helper for expression tokenization
49
+ - New `parse_expression(expression)` helper for parsing expressions into AST form
50
+ - New `derived_ast(expression)` helper to return the derivative AST before simplification
51
+
52
+ ### Changed
53
+ - Expanded pipeline-level API to support step-by-step differentiation workflows
54
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diffstep
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: A symbolic differentiation library.
5
5
  Home-page: https://campus.cs.le.ac.uk/gitlab/ug_project/25-26/aoe8
6
6
  Author: Ayo
@@ -1,5 +1,6 @@
1
1
  from .pipeline import DiffStep, diffstep
2
- from .pipeline import differentiate
2
+ from .pipeline import differentiate, gradient, normalise_expression
3
+ # from .pipeline import tokenise_expression, parse_expression, derived_ast
3
4
 
4
5
  __all__ = ["DiffStep", "diffstep"]
5
6
  # This file shows what can be called when you import diffstep. It also allows you to import from diffstep without having to specify the submodule, e.g. from diffstep import DiffStep instead of from diffstep.pipeline import DiffStep.
@@ -1,4 +1,5 @@
1
1
  import warnings
2
+ import sympy as sp
2
3
 
3
4
  from diffstep.core.normalise import validate_and_normalise as normalise
4
5
  from diffstep.core.tokeniser import tokenize
@@ -30,3 +31,27 @@ def diffstep(expression: str):
30
31
 
31
32
  def differentiate(expression: str):
32
33
  return diffstep(expression)
34
+
35
+ def gradient(expression: str, x_value: float):
36
+ x = sp.symbols('x')
37
+ derivative = diffstep(expression)
38
+ gradient_value = derivative.subs(x, x_value)
39
+ return gradient_value
40
+
41
+ def normalise_expression(expression: str):
42
+ return normalise(expression)
43
+
44
+ def tokenise_expression(expression: str):
45
+ normalised_expression = normalise(expression)
46
+ return tokenize(normalised_expression)
47
+
48
+ def parse_expression(expression: str):
49
+ normalised_expression = normalise(expression)
50
+ tokens = tokenize(normalised_expression)
51
+ return parse(tokens)
52
+
53
+ def derived_ast(expression: str):
54
+ normalised_expression = normalise(expression)
55
+ tokens = tokenize(normalised_expression)
56
+ ast = parse(tokens)
57
+ return _differentiate(ast)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diffstep
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: A symbolic differentiation library.
5
5
  Home-page: https://campus.cs.le.ac.uk/gitlab/ug_project/25-26/aoe8
6
6
  Author: Ayo
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "diffstep"
7
- version = "1.1.2"
7
+ version = "1.1.3"
8
8
  description = "A symbolic differentiation library."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -11,7 +11,7 @@ classifiers = [
11
11
 
12
12
  setup (
13
13
  name='diffstep',
14
- version='1.1.1',
14
+ version='1.1.3',
15
15
  description="This is a library for Algorithmic Differentiation.",
16
16
  long_description=open('README.md').read(),
17
17
  long_description_content_type='text/markdown',
File without changes
File without changes
File without changes
File without changes