Skip to content

Commit

Permalink
Add basic structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
janosg committed May 2, 2024
1 parent 5574283 commit 547669b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
63 changes: 63 additions & 0 deletions docs/source/development/eep-02-typing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
(eeppytrees)=

# EEP-01: Static typing

```{eval-rst}
+------------+------------------------------------------------------------------+
| Author | `Janos Gabler <https://github.com/janosg>`_ |
+------------+------------------------------------------------------------------+
| Status | Draft |
+------------+------------------------------------------------------------------+
| Type | Standards Track |
+------------+------------------------------------------------------------------+
| Created | 2024-05-02 |
+------------+------------------------------------------------------------------+
| Resolution | |
+------------+------------------------------------------------------------------+
```

## Abstract

This enhancement proposal explains how we want to adopt static typing in estimagic. The
overarching goals of the proposal are the folloing:

- More robust code due to static type checking
- Better readability of code due to type hints
- Better discoverability and autocomplete for users of estimagic

Achieving these goals requires more than adding type hints. Estimagic is currently
mostly [stringly typed](https://wiki.c2.com/?StringlyTyped) and full of dictionaries
with a fixed set of required keys (e.g.
[constraints](https://estimagic.readthedocs.io/en/latest/how_to_guides/optimization/how_to_specify_constraints.html),
[option dictionaries](https://estimagic.readthedocs.io/en/latest/how_to_guides/optimization/how_to_specify_algorithm_and_algo_options.html),
etc.).

This enhancement proposal outlines how we can accomodate the changes needed to reap the
benefits of static typing without breaking users' code.

## Motivation and ressources

## Changes in public functions

### Constraints

### Option dictionaries

### Algorithm selection

### Benchmark problems and results

### Least-squares and likelihood problems

## Internal changes

### Internal algorithm interface

## Changes in documentation

- No type hints in docstrings anymore
- Only show new recommended ways of doing things, not deprecated ones

## Breaking changes

## Deprecations
1 change: 1 addition & 0 deletions docs/source/development/eeps.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ maxdepth: 1
---
eep-00-governance-model.md
eep-01-pytrees.md
eep-02-typing.md
```

0 comments on commit 547669b

Please sign in to comment.