Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into black-gh-action
Browse files Browse the repository at this point in the history
  • Loading branch information
sezelt committed Aug 29, 2023
2 parents dd1fe21 + be44354 commit 8824352
Show file tree
Hide file tree
Showing 137 changed files with 14,629 additions and 12,743 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/check_install_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Install Checker Dev
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:

test-python-os-versions:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} on ${{ matrix.architecture }}
continue-on-error: ${{ matrix.allow_failure }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
allow_failure: [false]
runs-on: [ubuntu-latest]
architecture: [x86_64]
python-version: ["3.10", "3.11",]
# Currently no public runners available for this but this or arm64 should work next time
# include:
# - python-version: "3.10"
# architecture: [aarch64]
# runs-on: macos-latest
# allow_failure: true
steps:
- uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install repo
run: |
python -m pip install .
- name: Check installation
run: |
python -c "import py4DSTEM; print(py4DSTEM.__version__)"
# - name: Check machine arch
# run: |
# python -c "import platform; print(platform.machine())"
45 changes: 45 additions & 0 deletions .github/workflows/check_install_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Install Checker Main
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:

test-python-os-versions:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} on ${{ matrix.architecture }}
continue-on-error: ${{ matrix.allow_failure }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
allow_failure: [false]
runs-on: [ubuntu-latest, windows-latest, macos-latest]
architecture: [x86_64]
python-version: ["3.10", "3.11",]
include:
- python-version: "3.12.0-beta.4"
runs-on: ubuntu-latest
allow_failure: true
# Currently no public runners available for this but this or arm64 should work next time
# include:
# - python-version: "3.10"
# architecture: [aarch64]
# runs-on: macos-latest
# allow_failure: true
steps:
- uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install repo
run: |
python -m pip install .
- name: Check installation
run: |
python -c "import py4DSTEM; print(py4DSTEM.__version__)"
- name: Check machine arch
run: |
python -c "import platform; print(platform.machine())"
45 changes: 45 additions & 0 deletions .github/workflows/check_install_quick.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Install Checker Quick
on:
push:
branches-ignore:
- main
- dev
pull_request:
branches-ignore:
- main
- dev
jobs:

test-python-os-versions:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} on ${{ matrix.architecture }}
continue-on-error: ${{ matrix.allow_failure }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
allow_failure: [false]
runs-on: [ubuntu-latest]
architecture: [x86_64]
python-version: ["3.10"]
# Currently no public runners available for this but this or arm64 should work next time
# include:
# - python-version: "3.10"
# architecture: [aarch64]
# runs-on: macos-latest
# allow_failure: true
steps:
- uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install repo
run: |
python -m pip install .
- name: Check installation
run: |
python -c "import py4DSTEM; print(py4DSTEM.__version__)"
# - name: Check machine arch
# run: |
# python -c "import platform; print(platform.machine())"
21 changes: 6 additions & 15 deletions py4DSTEM/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
Custom,
print_h5_tree,
)

_emd_hook = True

# structure
from py4DSTEM import io
from py4DSTEM.io import import_file,read,save

from py4DSTEM.io import import_file, read, save


### basic data classes
Expand All @@ -35,12 +35,7 @@
)

# datacube
from py4DSTEM.datacube import (
DataCube,
VirtualImage,
VirtualDiffraction
)

from py4DSTEM.datacube import DataCube, VirtualImage, VirtualDiffraction


### visualization
Expand Down Expand Up @@ -70,25 +65,21 @@
)




### more submodules
# TODO

from py4DSTEM import preprocess
from py4DSTEM import process



### utilities

# config
from py4DSTEM.utils.configuration_checker import check_config

# TODO - config .toml

# testing
from os.path import dirname,join
_TESTPATH = join(dirname(__file__), "../test/unit_test_data")


from os.path import dirname, join

_TESTPATH = join(dirname(__file__), "../test/unit_test_data")
4 changes: 2 additions & 2 deletions py4DSTEM/braggvectors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
from py4DSTEM.braggvectors.braggvector_methods import BraggVectorMap
from py4DSTEM.braggvectors.diskdetection import *
from py4DSTEM.braggvectors.probe import *
#from .diskdetection_aiml import *
#from .diskdetection_parallel_new import *

# from .diskdetection_aiml import *
# from .diskdetection_parallel_new import *
Loading

0 comments on commit 8824352

Please sign in to comment.