Skip to content

Commit 9a48340

Browse files
authored
Merge pull request #3 from mbuze/release-v0.2.0
Release v0.2.0
2 parents 9568042 + 5df8b5a commit 9a48340

61 files changed

Lines changed: 7509 additions & 1048221 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
env:
17+
KEOPS_VERBOSE: "0"
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
cache: pip
24+
- name: Install CPU-only PyTorch
25+
run: pip install torch --index-url https://download.pytorch.org/whl/cpu
26+
- name: Install remaining dependencies
27+
run: |
28+
grep -v '^torch' requirements.txt > /tmp/req-notorch.txt
29+
pip install -r /tmp/req-notorch.txt && pip install -e .
30+
- name: Lint
31+
run: ruff check .
32+
- name: Run tests
33+
run: pytest

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ notebooks/extensions
1010
**/__pycache__/
1111

1212
.tmp.*
13+
14+
.vscode/
15+
16+
.pytest_cache/
17+
.ruff_cache/
18+
19+
notebooks/tutorials/outputs/

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.9.0
4+
hooks:
5+
- id: ruff # lint (with --fix)
6+
args: [--fix]
7+
- id: ruff-format # format

PyAPD/__init__.py

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,48 @@
1-
from .geometry_utils import *
2-
#from .plotting_utils import *
3-
from .override_optimality_condition import *
4-
#from .pixel_method import *
5-
#from .esdot_method import *
6-
#from .sinkhorn import *
7-
from .ebsd_utils import *
8-
from .apds import *
9-
from .log_res import *
10-
from .log_res_utils import *
11-
12-
13-
# __all__ = ["geometry_utils",
14-
# "plotting_utils",
15-
# "pixel_method",
16-
# "esdot_method"]
17-
1+
from . import (
2+
override_optimality_condition as override_optimality_condition, # side-effect: patches torchmin
3+
)
4+
from .apds import apd_system as apd_system
5+
from .ebsd_utils import load_setup_from_EBSD_data_2D as load_setup_from_EBSD_data_2D
6+
from .geometry_utils import (
7+
convert_axes_and_angle_to_matrix_2D as convert_axes_and_angle_to_matrix_2D,
8+
)
9+
from .geometry_utils import (
10+
initial_guess_heuristic as initial_guess_heuristic,
11+
)
12+
from .geometry_utils import (
13+
sample_normalised_spd_matrices as sample_normalised_spd_matrices,
14+
)
15+
from .geometry_utils import (
16+
sample_seeds_with_exclusion as sample_seeds_with_exclusion,
17+
)
18+
from .geometry_utils import (
19+
sample_spd_matrices_perturbed_from_identity as sample_spd_matrices_perturbed_from_identity,
20+
)
21+
from .geometry_utils import (
22+
specify_volumes as specify_volumes,
23+
)
24+
from .log_res import min_diagram_system as min_diagram_system
25+
from .log_res_utils import (
26+
assemble_design_matrix as assemble_design_matrix,
27+
)
28+
from .log_res_utils import (
29+
calculate_moments_from_data as calculate_moments_from_data,
30+
)
31+
from .log_res_utils import (
32+
convert_from_lr_to_phys as convert_from_lr_to_phys,
33+
)
34+
from .log_res_utils import (
35+
convert_from_phys_to_lr as convert_from_phys_to_lr,
36+
)
37+
from .log_res_utils import (
38+
convert_theta_between_bases as convert_theta_between_bases,
39+
)
40+
from .log_res_utils import (
41+
gridify_Y_I as gridify_Y_I,
42+
)
43+
from .log_res_utils import (
44+
physical_heuristic_guess as physical_heuristic_guess,
45+
)
46+
from .log_res_utils import (
47+
reorder_variables as reorder_variables,
48+
)

0 commit comments

Comments
 (0)