Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4578 commits
Select commit Hold shift + click to select a range
9bec82e
adding more options, cleaning up
cophus Jul 10, 2023
601389b
updated Colins code to work with corner-centered probes. will clean u…
gvarnavi Jul 10, 2023
3964551
adding probe aperture constraint, aberration fitting. Only changed si…
gvarnavi Jul 11, 2023
12e0078
a bit of gpu cleaning
smribet Jul 11, 2023
4a31a1f
removing unnecessary self._xp
gvarnavi Jul 11, 2023
88e2212
bugfixes for probe constraints
gvarnavi Jul 11, 2023
cb6d917
probe constraints for mixed-state
gvarnavi Jul 11, 2023
edfebc5
probe constraints for multislice
gvarnavi Jul 11, 2023
5e9b5e6
probe constraints for overlap tomography
gvarnavi Jul 11, 2023
7a87c1f
probe constraints for simultaneous
gvarnavi Jul 11, 2023
8d42f2d
imports, formatting, linting
gvarnavi Jul 12, 2023
3596ad9
commenting out probe renormalizations post-constraints
gvarnavi Jul 12, 2023
f65766f
bragg vectors copy
smribet Jul 13, 2023
ec5f0fc
bug fix
smribet Jul 13, 2023
0490a79
Merge branch 'dev' into strain_refactor
smribet Jul 13, 2023
0239fd9
bin and pad fixes
smribet Jul 13, 2023
594cb93
another bin and pad fix
smribet Jul 14, 2023
ebfc104
Merge pull request #473 from py4dstem/strain_refactor
smribet Jul 14, 2023
809edef
updates
bsavitzky Jul 14, 2023
2035e10
fix
bsavitzky Jul 14, 2023
c62fc79
fit lattice vectors
smribet Jul 14, 2023
d8afab8
small changes
smribet Jul 14, 2023
9026c89
fix calibration for bragg vectors
smribet Jul 14, 2023
0035804
strain!!!
smribet Jul 14, 2023
ef56e31
Merge remote-tracking branch 'origin/dev' into phase_contrast
gvarnavi Jul 14, 2023
840991e
bugfixes
bsavitzky Jul 14, 2023
78419e8
handle merge conflicts with dev
bsavitzky Jul 14, 2023
ce345bd
cleaning up formatting
smribet Jul 14, 2023
f34a2cb
Update defaults for polar fits
cophus Jul 14, 2023
aed90c5
working on strain plotting
smribet Jul 14, 2023
b07ecbc
handle merge conflicts with dev
bsavitzky Jul 14, 2023
c335a0d
Merge pull request #474 from py4dstem/phase_contrast
bsavitzky Jul 14, 2023
14cbbf6
Merge pull request #469 from smribet/mm2023
bsavitzky Jul 14, 2023
186763c
Merge branch 'dev' into mm2023
bsavitzky Jul 14, 2023
ca8f100
autoupdate braggvects calstate
bsavitzky Jul 14, 2023
3e2b2b8
Merge pull request #472 from cophus/mm2023
bsavitzky Jul 14, 2023
943b49d
Merge branch 'mm2023' into dev
bsavitzky Jul 14, 2023
e6ffaa6
Merge pull request #475 from bsavitzky/dev
bsavitzky Jul 14, 2023
ca6e3bd
strain mapping functions
smribet Jul 14, 2023
575e9ac
strain copy
smribet Jul 14, 2023
d5b1632
Merge remote-tracking branch 'origin/dev' into strain_refactor
smribet Jul 14, 2023
51b9e7a
Revert "Merge remote-tracking branch 'origin/dev' into strain_refactor"
smribet Jul 14, 2023
28dbdb5
rotated
smribet Jul 14, 2023
8400998
fix copy method
smribet Jul 14, 2023
cc2ac88
hot fix for fit origin
smribet Jul 14, 2023
e7fccdd
flatfield correction
smribet Jul 14, 2023
c989d12
bugfix for resampled pixel size
sezelt Jul 17, 2023
3260eff
bugfixes
bsavitzky Jul 17, 2023
39d67e4
Merge pull request #476 from smribet/dev
bsavitzky Jul 17, 2023
4906cc2
Merge pull request #455 from smribet/arina_read
bsavitzky Jul 17, 2023
207279b
Merge pull request #477 from sezelt/resample_pixfix
bsavitzky Jul 17, 2023
6e7216b
Revert "bugfix for resampled pixel size"
bsavitzky Jul 17, 2023
82560f4
Merge pull request #478 from py4dstem/revert-477-resample_pixfix
bsavitzky Jul 17, 2023
fa90a71
Merge remote-tracking branch 'cophus/mm2023' into dev
cophus Jul 17, 2023
492551b
hot fix for fit origin
smribet Jul 14, 2023
c6cce29
read_arina start
smribet Jun 15, 2023
40bae7a
bug fixes and including in importfile
smribet Jun 16, 2023
ffa709b
hdf5plugin dependency
smribet Jun 16, 2023
698157e
updates for file parser and dtype
smribet Jun 17, 2023
ab9c75c
read abTEM
smribet Jun 17, 2023
b7a8b87
fix warning statement and doc strings
smribet Jun 17, 2023
76dd821
avoid transpose
smribet Jul 3, 2023
81ebea6
more import fixes, all tests passing
bsavitzky Jul 11, 2023
2af6cb9
adds test_arina unit test
bsavitzky Jul 11, 2023
43f7e01
flatfield correction
smribet Jul 14, 2023
0c3c810
bugfix for resampled pixel size
sezelt Jul 17, 2023
c6d08d2
Revert "bugfix for resampled pixel size"
bsavitzky Jul 17, 2023
50a794d
Merge branch 'dev' into dev
bsavitzky Jul 17, 2023
a92d89c
Merge pull request #479 from bsavitzky/dev
bsavitzky Jul 17, 2023
7be0108
fix
bsavitzky Jul 17, 2023
8e12347
bugfix
bsavitzky Jul 17, 2023
bfdcd17
Merge remote-tracking branch 'origin/dev' into strain_refactor
smribet Jul 17, 2023
2fb5d22
another origin fix
smribet Jul 17, 2023
631d098
Merge pull request #480 from bsavitzky/resample_pixfix_2
bsavitzky Jul 17, 2023
0028dbb
Merge remote-tracking branch 'origin/dev' into strain_refactor
smribet Jul 17, 2023
2d52225
this bug is so confusing
smribet Jul 17, 2023
b04a75f
verbose should be False for braggvectors
smribet Jul 17, 2023
8ddf8d0
flake fix
smribet Jul 17, 2023
18f53e8
bvects.copy bugfix
bsavitzky Jul 17, 2023
951ac31
Merge pull request #482 from bsavitzky/dev
cophus Jul 17, 2023
0406e40
Merge remote-tracking branch 'cophus/dev' into dev
cophus Jul 17, 2023
2224071
Merge remote-tracking branch 'origin/dev' into dev
cophus Jul 17, 2023
27f60a8
bvects.copy bugfix
bsavitzky Jul 17, 2023
f9f2ae4
bvects.copy bugfix
bsavitzky Jul 17, 2023
7534671
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
bsavitzky Jul 17, 2023
8f79596
Update defaults in polar peaks, docstrings
cophus Jul 17, 2023
b7a15d9
bvects autocal fix
bsavitzky Jul 17, 2023
8c8280a
polar datacube instantiation bugfix
bsavitzky Jul 17, 2023
d64b30c
Merge remote-tracking branch 'bsavitzky/dev' into dev
cophus Jul 17, 2023
e946dbc
fixes
bsavitzky Jul 18, 2023
2feba42
Merge pull request #483 from bsavitzky/dev
cophus Jul 18, 2023
41d7002
let Crystal.plot_scattering work w/out all cals
bsavitzky Jul 18, 2023
bc309af
Merge branch 'dev' into crystal_edits
bsavitzky Jul 18, 2023
024e8d1
let Crystal.cal_pix_size work w/out all cals
bsavitzky Jul 18, 2023
2d6deae
Slight updates to polardata
cophus Jul 18, 2023
dc1b250
fix for non-refined peaks in polar peaks
cophus Jul 18, 2023
d1b9de9
Update polar_datacube.py
bsavitzky Jul 18, 2023
0c7dc5b
Merge pull request #485 from bsavitzky/crystal_edits
cophus Jul 18, 2023
a0ee7df
Merge pull request #486 from cophus/dev
bsavitzky Jul 18, 2023
640854c
fix for fit
smribet Jul 18, 2023
04bfcbb
handle merge conflicts
bsavitzky Jul 18, 2023
040c489
updates
bsavitzky Jul 14, 2023
7883c7c
fix
bsavitzky Jul 14, 2023
c6d3cac
fit lattice vectors
smribet Jul 14, 2023
5d33902
small changes
smribet Jul 14, 2023
943c65d
fix calibration for bragg vectors
smribet Jul 14, 2023
cccd8fb
strain!!!
smribet Jul 14, 2023
9b5f987
cleaning up formatting
smribet Jul 14, 2023
dd1024a
working on strain plotting
smribet Jul 14, 2023
2172d07
strain mapping functions
smribet Jul 14, 2023
87eff00
strain copy
smribet Jul 14, 2023
f5e6538
rotated
smribet Jul 14, 2023
7179928
fix copy method
smribet Jul 14, 2023
170f8f4
bugfix
bsavitzky Jul 17, 2023
daa6250
another origin fix
smribet Jul 17, 2023
e0d5b75
flake fix
smribet Jul 17, 2023
a7440df
Merge branch 'strain_refactor_rebase' into strain_refactor, re-syncin…
bsavitzky Jul 18, 2023
6d99ee1
attempt to resolve dev/strain conflicts
bsavitzky Jul 18, 2023
3cbcbee
test for crystal_ACOM
smribet Jul 18, 2023
d89904a
attempt to resolve dev/strain conflicts
bsavitzky Jul 18, 2023
1ff3000
Merge remote-tracking branch 'truth/strain_refactor' into strain_refa…
bsavitzky Jul 18, 2023
526c0c6
ACOM
smribet Jul 18, 2023
825d3fe
Merge remote-tracking branch 'truth/strain_refactor' into strain_refa…
bsavitzky Jul 18, 2023
5e60d1b
polar
smribet Jul 18, 2023
ddfeb6f
multislice
smribet Jul 18, 2023
1ecee4b
datacube
smribet Jul 18, 2023
ae5618d
attempt to resolve dev/strain conflicts
bsavitzky Jul 18, 2023
ed76009
Merge remote-tracking branch 'truth/strain_refactor' into strain_refa…
bsavitzky Jul 18, 2023
7ff5dca
attempt to resolve dev/strain conflicts
bsavitzky Jul 18, 2023
8f685f0
bragg vectors
smribet Jul 18, 2023
8f688d6
bragg vectors methods
smribet Jul 18, 2023
76116e4
Merge pull request #481 from py4dstem/strain_refactor
bsavitzky Jul 18, 2023
4fb0c1f
Slight changes to fitting, plotting
cophus Jul 18, 2023
36b7500
Delete Untitled.ipynb
cophus Jul 18, 2023
8fdb8e8
Merge pull request #488 from cophus/dev
smribet Jul 18, 2023
2b66c6b
adding install checker
alex-rakowski Jul 19, 2023
0b09975
trying to fix the continue on error matrix
alex-rakowski Jul 19, 2023
6fbc5cf
removing comment
alex-rakowski Jul 19, 2023
400d5fb
remving some whitespace
alex-rakowski Jul 19, 2023
6f34e5e
more whitespace checking
alex-rakowski Jul 19, 2023
c79f8d7
adding machine arch print statement
alex-rakowski Jul 19, 2023
75e75fa
changing from os to platform to check platform
alex-rakowski Jul 19, 2023
f119840
changing arm64 to aarch64
alex-rakowski Jul 19, 2023
059db11
removing apple silcon check and adding beta python
alex-rakowski Jul 19, 2023
6b5119f
adding to python version checker
alex-rakowski Jul 19, 2023
1ce3c2d
allowing failure on 3.8 & 3.12
alex-rakowski Jul 19, 2023
a5b4126
trying mutliple include statements
alex-rakowski Jul 19, 2023
edb995a
separating into dev main and quick
alex-rakowski Jul 19, 2023
b5c71b7
adding dev checker
alex-rakowski Jul 19, 2023
34617bb
updating workflow name on dev
alex-rakowski Jul 19, 2023
10c87a9
adding main install checker
alex-rakowski Jul 19, 2023
382ed62
update get_cmap deprecations
bsavitzky Jul 19, 2023
3f2fc3d
Merge pull request #490 from bsavitzky/dev
bsavitzky Jul 19, 2023
73f514e
handle main/dev merge conflict (emdfile versioning)
bsavitzky Jul 19, 2023
f42f77d
Merge remote-tracking branch 'truth/dev' into dev
bsavitzky Jul 19, 2023
bcbb20e
Merge pull request #491 from bsavitzky/dev
bsavitzky Jul 19, 2023
598d69a
Update version.py to 0.14.3
bsavitzky Jul 19, 2023
faa8f7e
Merge pull request #492 from py4dstem/dev
bsavitzky Jul 19, 2023
36ab434
Merge remote-tracking branch 'py4dstem/dev' into whole_pattern_fitting
cophus Jul 28, 2023
01eafb2
Visualization tweaks
cophus Jul 28, 2023
bee676c
Updating viz to have white/black text
cophus Jul 28, 2023
ec6d578
Updates
cophus Jul 28, 2023
c475730
Parallel fitting working
cophus Jul 28, 2023
40812b4
Cleaning up
cophus Jul 28, 2023
229eb46
minor cleanup
cophus Jul 29, 2023
62bed3e
Removing old polar peaks
cophus Jul 29, 2023
1719b76
the option to show fft and a few stylistic changes
smribet Jul 30, 2023
18b9d70
remove extraneous lines
smribet Jul 30, 2023
780e6f8
Adding mpire to requirements
cophus Jul 30, 2023
9e3169a
Removing polar peaks py file
cophus Jul 30, 2023
545bd19
fix doc strings for read
smribet Jul 31, 2023
2c94eb4
auto formatting
smribet Aug 1, 2023
db47ec2
Adding get_strained_crystal method
cophus Aug 2, 2023
6ed6119
Adding better strain method
cophus Aug 2, 2023
0fbc42c
Attempting to add strain to the bloch wave calcs
cophus Aug 2, 2023
93fe2cd
Commenting out strain in the dynamical diff SF function for now
cophus Aug 2, 2023
e29c323
Making strain simpler
cophus Aug 2, 2023
a2adcb8
simplifying code
cophus Aug 3, 2023
0e6f2bf
Fixing the convention for strain
cophus Aug 3, 2023
1883460
add .copy()
smribet Aug 3, 2023
f1cfcb6
Updating Crystal.__init__ to accept 3x3 cells
cophus Aug 3, 2023
a8b2e87
Adding Alex's docstring suggestion
cophus Aug 3, 2023
664e7cc
removing white space from bloch
alex-rakowski Aug 3, 2023
cdeb745
format and remove crystal copy
sezelt Aug 3, 2023
0d9d45a
Merge pull request #495 from cophus/dev
sezelt Aug 3, 2023
7ffab43
updating some docstrings
alex-rakowski Aug 3, 2023
a74430c
moving pymatgen check outside of calculate lattice
alex-rakowski Aug 3, 2023
646ae90
Merge branch 'wpf_model_link' into whole_pattern_fitting
sezelt Aug 6, 2023
edd53c3
building out parameter sharing infra
sezelt Aug 6, 2023
c80f668
add model type flags and format
sezelt Aug 6, 2023
a54cb13
starting moire model
sezelt Aug 6, 2023
1dfb0f2
add linking function
sezelt Aug 6, 2023
94a9398
new offset assignment logic
sezelt Aug 6, 2023
ddc176b
fix for scalebar combine images
smribet Aug 7, 2023
de99360
remove global special case in gaussian bkgd
sezelt Aug 8, 2023
c40e8ac
remove global special case from gaussian ring
sezelt Aug 8, 2023
e31014a
fully convert synthetic disk model and squash bugs
sezelt Aug 9, 2023
aab7958
link multiple models at the same time and fix plots
sezelt Aug 9, 2023
bad96b8
changes to distributed WPF
sezelt Aug 9, 2023
4ac9ccb
linter fixes
sezelt Aug 9, 2023
34c7457
fix how fit data is stored, improve distributed
sezelt Aug 10, 2023
26c42ee
initialization of moire object built out
sezelt Aug 10, 2023
0e5b7ae
moire generates pattern but derivatives are not complete
sezelt Aug 11, 2023
36022dc
Fix for the mask in real space
cophus Aug 13, 2023
535f302
Typo
cophus Aug 13, 2023
dc75699
fixes for moire, derivative now working
sezelt Aug 14, 2023
8418167
allow each moire disk to have separate intensity
sezelt Aug 14, 2023
89e8ab3
remove fit gamma scaling
sezelt Aug 14, 2023
c6549f2
add docstrings all around
sezelt Aug 14, 2023
0766665
update the weird lattice models to maybe work with new architecture
sezelt Aug 14, 2023
a1de05b
linter fixes
sezelt Aug 14, 2023
efd5527
another linter fix
sezelt Aug 14, 2023
6c6ebfa
improvements to moire
sezelt Aug 15, 2023
2625220
hot fix for passing gdrive ID
alex-rakowski Aug 17, 2023
c599658
typo
alex-rakowski Aug 17, 2023
6421449
adding flexible URL parser
alex-rakowski Aug 17, 2023
5232f9a
typos
alex-rakowski Aug 17, 2023
1c48402
whitespace removal, and typos
alex-rakowski Aug 17, 2023
ce932d7
small updates
smribet Aug 18, 2023
ac0aeaf
wpf imports
smribet Aug 18, 2023
66d053d
fix for moire cell generation
sezelt Aug 18, 2023
51bd015
Merge pull request #493 from cophus/whole_pattern_fitting
sezelt Aug 18, 2023
5cf235a
Merge remote-tracking branch 'origin/dev' into show
smribet Aug 19, 2023
8a4ed74
reformat
smribet Aug 19, 2023
c929a35
show fft and combine images
smribet Aug 19, 2023
a5077a6
Merge pull request #496 from py4dstem/Strained_crystal_docstrings
sezelt Aug 19, 2023
7cc088d
Merge pull request #497 from py4dstem/gdrive_hotfix
sezelt Aug 19, 2023
a3a5708
Merge pull request #494 from smribet/show
sezelt Aug 19, 2023
01ae7ca
formatting
smribet Aug 19, 2023
5393d3e
add github action to enforce black style
sezelt Aug 23, 2023
3ea00bd
give github actions better names
sezelt Aug 23, 2023
1c73c5a
bugfix, listwrite
bsavitzky Aug 23, 2023
e537d20
merge conflicts
bsavitzky Aug 23, 2023
655442e
bugfix
bsavitzky Aug 24, 2023
7cd9e18
Merge pull request #503 from bsavitzky/listwrite_patch
sezelt Aug 25, 2023
69185e7
Merge branch 'py4dstem:dev' into ci-cd
alex-rakowski Aug 29, 2023
e9cb65a
nudging python version
alex-rakowski Aug 29, 2023
87f808d
Updating gdown version to latest
alex-rakowski Aug 29, 2023
aa1d42c
Merge pull request #506 from alex-rakowski/gdown_nudge
sezelt Aug 29, 2023
92ef459
removing 3.9 check
alex-rakowski Aug 29, 2023
d37c519
removing 3.9 check
alex-rakowski Aug 29, 2023
b4e1fe1
Merge pull request #505 from py4dstem/python_version
sezelt Aug 29, 2023
58d36d5
Merge pull request #489 from alex-rakowski/ci-cd
sezelt Aug 29, 2023
02eeab1
Merge pull request #499 from smribet/black_format
bsavitzky Aug 29, 2023
bcbd6eb
Merge remote-tracking branch 'upstream/dev' into black-gh-action
sezelt Aug 29, 2023
7aa64a4
format with black 23.7.0
sezelt Aug 29, 2023
e400add
Merge pull request #502 from sezelt/black-gh-action
sezelt Aug 29, 2023
e741164
patch CUDA/ipp/dask braggvects assign bug
bsavitzky Sep 4, 2023
7423f93
adds new fn call and docstring
bsavitzky Sep 4, 2023
348d4cc
update
bsavitzky Sep 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is,

**To Reproduce**
Steps to reproduce the behavior, please be as general as possible, and ideally recreate a minimal reproducible example:

**Expected behavior**
A clear and concise description of what you expected to happen.


**py4DSTEM version**
It can be accessed by running `py4DSTEM.__version__`
**Python version**
It can be accessed using `sys.version`
**Operating system**
Windows, Mac (Intel or ARM), Linux (Distro)

**GPU**
If GPU related please provide:
- CUDA driver - It can be accessed by: `nvidia-smi`
- Cupy Version - It can be accessed by `cupy.__version__`

**Screenshots**
If applicable, could you add screenshots to help explain your problem?


**Additional context**
Please feel free to add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
2 changes: 2 additions & 0 deletions .github/linters/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
select: "F402,F404,F812,F823,F831,F821,F822,E112,E113,E901,E902,E999"
21 changes: 21 additions & 0 deletions .github/scripts/update_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""
Script to update the patch version number of the py4DSTEM package.
Author: Tara Mishra (Quantumstud)
"""

version_file_path = "py4DSTEM/version.py"

with open(version_file_path, "r") as f:
lines = f.readlines()

line_split = lines[0].split(".")
patch_number = line_split[2].split("'")[0]

# Increment patch number
patch_number = str(int(patch_number) + 1) + "'"


new_line = line_split[0] + "." + line_split[1] + "." + patch_number

with open(version_file_path, "w") as f:
f.write(new_line)
14 changes: 14 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check code style

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
40 changes: 40 additions & 0 deletions .github/workflows/build-flake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Check module can be imported

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test that the module imports
run: |
pip install .
python -c "import py4DSTEM; print(py4DSTEM.__version__)"
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())"
25 changes: 25 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check for errors with flake8

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]

jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_FLAKE8: true
DEFAULT_BRANCH: "dev"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81 changes: 81 additions & 0 deletions .github/workflows/pypi_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Action to check the version of the package and upload it to PyPI
# if the version is higher than the one on PyPI
# Author: @quantumstud
name: PyPI Upload

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
update_version:
runs-on: ubuntu-latest
name: Check if version.py is changed and update if the version.py is not changed
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_ACTION_VERSION_UPDATE }}
- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v32
with:
files: |
py4DSTEM/version.py
- name: Running if py4DSTEM/version.py file is not changed
if: steps.changed-files-specific.outputs.any_changed == 'false'
run: |
echo "Version file not changed, running script to change the version file."
#git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
python .github/scripts/update_version.py
git config --global user.email "ben.savitzky@gmail.com"
git config --global user.name "bsavitzky"
git commit -a -m "Auto-update version number (GH Action)"
git push origin main
sync_with_dev:
needs: update_version
runs-on: ubuntu-latest
name: Sync main with dev
steps:
- name: Sync main with dev
uses: actions/checkout@v3
with:
ref: dev
fetch-depth: 0
token: ${{ secrets.GH_ACTION_VERSION_UPDATE }}
- run: |
# set strategy to default merge
git config pull.rebase false
git config --global user.email "ben.savitzky@gmail.com"
git config --global user.name "bsavitzky"
git pull origin main --commit --no-edit
git push origin dev
deploy:
needs: sync_with_dev
runs-on: ubuntu-latest
name: Deploy to PyPI
steps:
- uses: actions/checkout@v3
with:
ref: dev
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}


Loading