Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove linter action redundancies #563

Draft
wants to merge 4,937 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4937 commits
Select commit Hold shift + click to select a range
4ea1773
Adding docstrings and more description
cophus Oct 4, 2023
de7f036
Black formatting
cophus Oct 4, 2023
971fd4a
move progress update step
sezelt Oct 5, 2023
b13c4c8
Merge pull request #3 from cophus/moire
sezelt Oct 5, 2023
a2c11f1
adding "sphinx_rtd_theme" to conf.py
alex-rakowski Oct 6, 2023
ebf504e
adding sphinx_rtd_theme to setup.py
alex-rakowski Oct 6, 2023
8e0a343
black style conf.py
alex-rakowski Oct 6, 2023
ed1aaa8
adding sphinx_rtd_theme to docs requirements.txt
alex-rakowski Oct 6, 2023
3c5c291
removing sphinx_rtd_theme from setup.py
alex-rakowski Oct 6, 2023
7e8a87c
Merge pull request #531 from py4dstem/docs
sezelt Oct 6, 2023
90591b2
Merge pull request #525 from cophus/grain_clustering
sezelt Oct 6, 2023
5db1146
preprocessing dtype bug
smribet Oct 8, 2023
9b9f04a
update CUDA source file location in setup.py
sezelt Oct 9, 2023
ba8e4cc
update cupy import try statements
sezelt Oct 9, 2023
c5e6ff0
adding tilt to propagators
smribet Oct 10, 2023
7cc0801
single slice crop patterns
smribet Oct 12, 2023
cc9b0d7
Fixing merge conflicts
cophus Oct 12, 2023
bd9c2c1
Formatting
cophus Oct 12, 2023
0605b39
tv_denoise typo
gvarnavi Oct 13, 2023
3d66ddc
revisting casting inconsistencies
gvarnavi Oct 13, 2023
e1c630b
Merge branch 'py4dstem:dev' into dev
alex-rakowski Oct 13, 2023
f50eeb0
Merge remote-tracking branch 'origin/phase_contrast' into phase_contrast
smribet Oct 14, 2023
b5da11f
crop pattern option for all classes
smribet Oct 14, 2023
6fa99d1
fix for gpu
smribet Oct 14, 2023
f59b122
cleaned up parallax descan
gvarnavi Oct 16, 2023
605bbfa
added support for float upsampling
gvarnavi Oct 16, 2023
db44c90
making descan correction the default
gvarnavi Oct 16, 2023
81098e9
Merge remote-tracking branch 'origin/phase_contrast' into phase_contrast
smribet Oct 16, 2023
7595332
Merge remote-tracking branch 'origin/phase_contrast' into phase_contrast
smribet Oct 16, 2023
5482298
removing redundant if statement
gvarnavi Oct 16, 2023
33befbb
Merge pull request #532 from sezelt/cudakern_relocate
bsavitzky Oct 16, 2023
e5551f0
Merge pull request #533 from sezelt/cp-import
bsavitzky Oct 16, 2023
f5afba8
removed separate ctf corrections and other subpixel improvements
gvarnavi Oct 16, 2023
0158662
Merge remote-tracking branch 'origin/dev' into strain_take_2
smribet Oct 16, 2023
f8d0c63
bug fix for calibrated strain
smribet Oct 16, 2023
79a3b15
removes unused imports
bsavitzky Oct 16, 2023
567900b
removes unused method args
bsavitzky Oct 16, 2023
008c9f6
fixes scattering_vector bug
bsavitzky Oct 16, 2023
860a45c
added read-write functionality to parralax
gvarnavi Oct 16, 2023
7862cad
adds documentation
bsavitzky Oct 16, 2023
0cc7e09
fixes variance normalization bug
bsavitzky Oct 16, 2023
ce58c29
corrects calculate_statistics return behavior
bsavitzky Oct 16, 2023
9849592
adds documentation
bsavitzky Oct 16, 2023
e36c5bc
adds documentation
bsavitzky Oct 16, 2023
55bead0
adds documentation
bsavitzky Oct 16, 2023
2c1202e
simplifies + removes unneeded computation
bsavitzky Oct 16, 2023
49db711
adds documentation
bsavitzky Oct 16, 2023
e118a69
'dens'->'density'
bsavitzky Oct 16, 2023
ae20c78
makes damping origin fluctuations default behaavior
bsavitzky Oct 16, 2023
377ff37
stores S(k),f(k),other intermediate vals
bsavitzky Oct 16, 2023
7cf0cea
Apply suggestions from code review
sezelt Oct 16, 2023
aff987d
format with black
sezelt Oct 16, 2023
a203a2d
Merge remote-tracking branch 'origin/dev' into moire
sezelt Oct 16, 2023
8b485c0
clean up moire
sezelt Oct 16, 2023
c4ba71b
Fix for plotting bug
cophus Oct 16, 2023
6322ce2
restructures return and plotting behavior more flexibly
bsavitzky Oct 16, 2023
eae159a
Merge pull request #535 from cophus/dev
bsavitzky Oct 16, 2023
51705d3
Merge remote-tracking branch 'origin/dev' into strain_take_2
smribet Oct 16, 2023
2a57c11
Starting on CTF fitting
cophus Oct 16, 2023
4f5da88
autoformats
bsavitzky Oct 16, 2023
933e34d
Adding more parts of parallax CTF fitting
cophus Oct 17, 2023
d96551e
added chroma_boost for show_complex
gvarnavi Oct 17, 2023
651f4f8
adds placeholder for citations
bsavitzky Oct 17, 2023
1e45c19
Working on CTF
cophus Oct 17, 2023
254dc30
It works!
cophus Oct 17, 2023
0c38b45
Updating outputs
cophus Oct 17, 2023
8f790d0
Adding outputs, plotting
cophus Oct 17, 2023
a0e78f2
Merge pull request #536 from cophus/phase_contrast
gvarnavi Oct 18, 2023
2a7a662
finally works
gvarnavi Oct 19, 2023
169df56
some support for aberration correct
gvarnavi Oct 19, 2023
d2a0bdb
small bug fixes
gvarnavi Oct 19, 2023
7467bb7
cleaned up parallax
gvarnavi Oct 20, 2023
74ec5b5
ptycho new aberration formalism
gvarnavi Oct 20, 2023
f670d0d
adding chroma_boost defaults
gvarnavi Oct 20, 2023
874fa3c
formatted, linted, isorted
gvarnavi Oct 20, 2023
c16105e
fixed some manual conflicts
gvarnavi Oct 20, 2023
f894823
fixing radial order accounting
gvarnavi Oct 20, 2023
9653925
make lint happy I hope!
smribet Oct 20, 2023
61c21f3
fix extent for ms depth sectioning
smribet Oct 21, 2023
288b9d5
small fixes
smribet Oct 21, 2023
31c3f6c
fix for ptycho aberration fit
smribet Oct 21, 2023
ff2a6b2
black format
smribet Oct 21, 2023
ff5a7d9
fixed ptycho fitting, added transpose flag in parallax
gvarnavi Oct 22, 2023
bd9158a
versions emdfile
bsavitzky Oct 22, 2023
73c14e0
Merge pull request #541 from bsavitzky/array_repr_bugfix
bsavitzky Oct 22, 2023
bf8b026
added force_transpose option for other two aberration fit methods
gvarnavi Oct 22, 2023
1d0438b
read-write device bugfix
gvarnavi Oct 22, 2023
bf6ee23
Merge pull request #539 from py4dstem/phase_contrast
smribet Oct 22, 2023
da57802
Merge pull request #514 from sezelt/moire
sezelt Oct 22, 2023
f2e65fc
bugfix to update_version.py
bsavitzky Oct 23, 2023
dc20c8f
Manually update version.py
bsavitzky Oct 23, 2023
958813e
Merge pull request #542 from py4dstem/dev
bsavitzky Oct 23, 2023
b4a0c17
Merge branch 'dev' into strain_take_2
bsavitzky Oct 23, 2023
d8a1c91
bugfix
bsavitzky Oct 23, 2023
60de60d
rms import *
bsavitzky Oct 23, 2023
0a0d9b9
bugfixes to strainmapping
bsavitzky Oct 23, 2023
7b992fb
strain map updates
bsavitzky Oct 23, 2023
d171760
add pyright to gitignore
sezelt Oct 23, 2023
97e6ea7
autoformats
bsavitzky Oct 23, 2023
37f107e
Merge pull request #543 from sezelt/dev
bsavitzky Oct 23, 2023
9fa9726
autoformats
bsavitzky Oct 23, 2023
bef8d3a
rms deprecated latticevectors module
bsavitzky Oct 23, 2023
36b48cc
rms deprecated latticevectors module
bsavitzky Oct 23, 2023
fa5c49a
Merge pull request #500 from cophus/polardata
bsavitzky Oct 23, 2023
4cc671d
Merge pull request #522 from smribet/strain_take_2
bsavitzky Oct 23, 2023
230032d
versions to 0.14.6
bsavitzky Oct 23, 2023
c998212
Merge pull request #544 from py4dstem/dev
bsavitzky Oct 23, 2023
deccb3e
change default figsize
bsavitzky Oct 24, 2023
ac0b656
versions to 0.14.7
bsavitzky Oct 24, 2023
0b2d9fc
Merge pull request #545 from py4dstem/dev
bsavitzky Oct 24, 2023
72653d4
ellipse display bugfix
bsavitzky Oct 24, 2023
d4d7d6b
versions to 0.14.8
bsavitzky Oct 24, 2023
334cbd2
autoformats
bsavitzky Oct 24, 2023
fcb3bcb
silly parallax bug
gvarnavi Oct 24, 2023
cf7b922
some helpful deets
smribet Oct 25, 2023
0f55926
adds QR_rotation vis method
bsavitzky Oct 26, 2023
b82e505
adds QR_rot in rad and degrees in Calibration
bsavitzky Oct 26, 2023
3b62bba
adds QR_rot in rad and degrees in Calibration
bsavitzky Oct 26, 2023
fe46cad
middle focus for multislice
smribet Oct 26, 2023
3e53b17
Fixing scale bar being plotted as slightly too long
cophus Oct 27, 2023
14cbab1
Add option to skip calculating correlation array in crystal.orientati…
cophus Oct 27, 2023
a4890f7
Black formatting
cophus Oct 27, 2023
4df79d5
adding assert statement
alex-rakowski Oct 27, 2023
c7540b1
black
alex-rakowski Oct 27, 2023
d9de182
re-introducing probe intensity normalizations into constraints
gvarnavi Oct 27, 2023
9295032
Merge branch 'phase_contrast' of github.com:py4dstem/py4DSTEM into ph…
gvarnavi Oct 27, 2023
c2a9b61
origin plotting and strain legend updates
bsavitzky Oct 28, 2023
81217fa
updates
bsavitzky Oct 28, 2023
5856edb
bug in depth plotting
smribet Oct 30, 2023
5b780b4
changing assert to warning
alex-rakowski Oct 30, 2023
f964d4b
black
alex-rakowski Oct 30, 2023
610a4e6
adds show_reference_directions
bsavitzky Oct 30, 2023
e2155a4
change Warning to ValueError
sezelt Oct 30, 2023
451f268
minor dpc bugfixes
gvarnavi Oct 30, 2023
accab18
parallax DF limit bug, cropped property
gvarnavi Oct 30, 2023
d9146f1
complex grid scalebar bug
gvarnavi Oct 30, 2023
ddb4429
updates
bsavitzky Oct 31, 2023
26fb99b
updates
bsavitzky Oct 31, 2023
ff897ab
Merge pull request #547 from cophus/dev
alex-rakowski Oct 31, 2023
c4b7482
Merge remote-tracking branch 'origin/dev' into phase_contrast
smribet Oct 31, 2023
8d99cc6
updates
bsavitzky Nov 1, 2023
246f7e9
Merge remote-tracking branch 'truth/dev' into morestrain
bsavitzky Nov 1, 2023
4afcedd
autoformats
bsavitzky Nov 1, 2023
89306db
bugfix
bsavitzky Nov 1, 2023
88de378
autoformats
bsavitzky Nov 1, 2023
5e8bb67
adding self_consistency_errors property. not implemented for 3D yet
gvarnavi Nov 1, 2023
f92f627
add robustness back to fit_origin
sezelt Nov 1, 2023
9d46c85
Merge remote-tracking branch 'origin/dev' into dev
sezelt Nov 1, 2023
2b6c6e7
add fit function option back
sezelt Nov 1, 2023
aac3a8c
Merge pull request #552 from sezelt/robust-fix
bsavitzky Nov 1, 2023
dc4d5cf
Merge remote-tracking branch 'origin/dev' into phase_contrast
smribet Nov 1, 2023
ac2d04a
real space mask for positions to ignore
smribet Nov 1, 2023
2bae946
amplitudes update for real space mask
smribet Nov 1, 2023
5f6aef1
Thnks fr th Mmr(s)
smribet Nov 1, 2023
1de5369
one more bug
smribet Nov 1, 2023
33d1c49
black format
smribet Nov 1, 2023
454bf56
colorbars for fit origin
smribet Nov 2, 2023
5de6c43
I've been plotting to update this function
smribet Nov 2, 2023
6920c5b
correct propagation of arguments
smribet Nov 2, 2023
21d0fc2
one more bug fix
smribet Nov 2, 2023
f51e68b
fft hanning window
smribet Nov 3, 2023
7c6708a
mostly formatting changes
smribet Nov 3, 2023
ea5bb36
small bug fixes
smribet Nov 3, 2023
e54aab4
ctf transpose bugfix - tested mostly for stig
gvarnavi Nov 3, 2023
db1ac20
making ptycho aberration fitting convention consistent
gvarnavi Nov 3, 2023
afc93a6
Merge branch 'phase_contrast' of github.com:py4dstem/py4DSTEM into ph…
gvarnavi Nov 3, 2023
5cb3857
adding to_strainmap method
alex-rakowski Nov 3, 2023
116b766
initial namespace chages
alex-rakowski Nov 4, 2023
e8a5f7e
update uncertainty viz
gvarnavi Nov 4, 2023
f337ef5
generalizing to accommodate other classes easier
gvarnavi Nov 4, 2023
844f9c7
add uncertainty viz to all classes except OT
gvarnavi Nov 4, 2023
8029e64
small kde parallax bug
gvarnavi Nov 4, 2023
e351441
more parallax plotting fun(ctionality)
smribet Nov 5, 2023
37e263a
black formatting
smribet Nov 5, 2023
bd2e63f
Merge pull request #550 from py4dstem/phase_contrast
smribet Nov 6, 2023
26de989
read/write for masked datasets
smribet Nov 6, 2023
c9335f3
Merge pull request #551 from bsavitzky/morestrain
bsavitzky Nov 6, 2023
571a061
Merge remote-tracking branch 'origin/dev' into phase_contrast
smribet Nov 6, 2023
e15c344
Merge branch 'dev' into namespace
alex-rakowski Nov 6, 2023
7b4fdb6
Merge pull request #555 from py4dstem/phase_contrast
gvarnavi Nov 7, 2023
d153b55
braggvector_copy calstate
smribet Nov 7, 2023
736add5
Merge remote-tracking branch 'origin/dev' into braggvectors
smribet Nov 7, 2023
dd560a7
Merge pull request #556 from smribet/braggvectors
bsavitzky Nov 7, 2023
fbf6506
pep 8 - Comparisons to singletons complience
alex-rakowski Nov 8, 2023
8e15aa2
== None to is None
alex-rakowski Nov 8, 2023
5672887
black
alex-rakowski Nov 8, 2023
8cf3b36
removing unused f-strings
alex-rakowski Nov 8, 2023
624cb10
changing is Bool to == Bool
alex-rakowski Nov 8, 2023
e1cc319
black
alex-rakowski Nov 8, 2023
571cbf3
versions to 0.14.9
bsavitzky Nov 8, 2023
c8578dd
bumping to allow 3.12
alex-rakowski Nov 10, 2023
3d2e3a2
updating install checkers to 3.12
alex-rakowski Nov 10, 2023
c8fb6bf
nudging quick install to include 3.12
alex-rakowski Nov 10, 2023
c2daa73
changing lower bound to 3.9
alex-rakowski Nov 10, 2023
8c12032
correcting syntax error
alex-rakowski Nov 10, 2023
bff2b27
fixing DeprecationWarning
alex-rakowski Nov 12, 2023
c4909dd
Merge pull request #562 from alex-rakowski/distance_transform_edt_fix
bsavitzky Nov 13, 2023
d6fc7fd
changing to assignment
alex-rakowski Nov 13, 2023
a97c568
p4DSTEM.phase/classification style
alex-rakowski Nov 13, 2023
a24ef46
black
alex-rakowski Nov 13, 2023
590179e
adding orientation
alex-rakowski Nov 13, 2023
a5f5d95
rename linter actions
bsavitzky Nov 13, 2023
3956ea3
Merge pull request #558 from alex-rakowski/singletons
bsavitzky Nov 13, 2023
bc969e3
removing comments
alex-rakowski Nov 13, 2023
b20f113
Merge pull request #561 from alex-rakowski/python-312
bsavitzky Nov 13, 2023
a565331
Merge pull request #554 from alex-rakowski/namespace
bsavitzky Nov 13, 2023
b4a0ce6
fixing is to ==
alex-rakowski Nov 14, 2023
7f01584
Merge pull request #565 from alex-rakowski/mask_hotpatch
bsavitzky Nov 14, 2023
af94ba6
removes redundant linting action
bsavitzky Nov 14, 2023
894b17e
adding E501 to expect fail
alex-rakowski Nov 14, 2023
88b8b35
moving .flake8 file
alex-rakowski Nov 14, 2023
6cc746e
changing : to =
alex-rakowski Nov 14, 2023
563d7fe
updating flake8
alex-rakowski Nov 14, 2023
c628ecc
updating flake8
alex-rakowski Nov 14, 2023
7b143b6
updating flake8
alex-rakowski Nov 14, 2023
9c18dea
removing E501 expecting pass
alex-rakowski Nov 14, 2023
4529d98
adding as string with E501 expecting fail
alex-rakowski Nov 14, 2023
742aca8
adding as non string without E501 expecting pass
alex-rakowski Nov 14, 2023
403b4c6
adding some configs expecting fails
alex-rakowski Nov 14, 2023
5f51ed4
removing 501 expecting pass
alex-rakowski Nov 14, 2023
9368425
adding dummy test and E501 expecting pass
alex-rakowski Nov 14, 2023
2de028a
altering dummy and seeing if top level flake works
alex-rakowski Nov 14, 2023
76748d9
clearning up last commit
alex-rakowski Nov 14, 2023
e67c59c
moving .flake8 back to .github
alex-rakowski Nov 14, 2023
086b96a
changing to *test/*
alex-rakowski Nov 14, 2023
ffdfd4b
changing to **test/*
alex-rakowski Nov 14, 2023
149cb33
changing to test
alex-rakowski Nov 14, 2023
d1fd32e
updating to v5
alex-rakowski Nov 14, 2023
d197339
changing to test_
alex-rakowski Nov 14, 2023
1428d8e
begins fix for flake8 config
bsavitzky Nov 14, 2023
8405d72
adding new line to test_dummy
alex-rakowski Nov 14, 2023
a2b70c3
adding new line to test_dummy
alex-rakowski Nov 14, 2023
8f0487f
filtering to search py4DSTEM only
alex-rakowski Nov 14, 2023
74efd85
trying to add new path to flake file
alex-rakowski Nov 14, 2023
04b52dd
adding ignore __init__.py
alex-rakowski Nov 14, 2023
a32886d
updating .flake8 rules
alex-rakowski Nov 14, 2023
6edb932
updating excluding + comments
alex-rakowski Nov 14, 2023
a271817
updating and adding comments
alex-rakowski Nov 14, 2023
bacbccb
removing dummy test file
alex-rakowski Nov 14, 2023
886f581
removing file
alex-rakowski Nov 14, 2023
4458c70
fixes flake options syntax
bsavitzky Nov 15, 2023
0c1eff2
fixes flake options syntax
bsavitzky Nov 15, 2023
93065b1
conflict errors
alex-rakowski Nov 15, 2023
7e08cb7
moves .flake9 config
bsavitzky Nov 15, 2023
6a86b32
merges dev
bsavitzky Nov 15, 2023
8b7f9a0
Merge pull request #3 from alex-rakowski/linters_test
bsavitzky Nov 15, 2023
272a3f5
update flake config
bsavitzky Nov 15, 2023
18a947c
flake fixes
bsavitzky Nov 15, 2023
cccc6b9
flake fixes
bsavitzky Nov 15, 2023
fc82d46
autoformats
bsavitzky Nov 15, 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
61 changes: 61 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/miniconda
{
"name": "py4dstem-dev",
"image": "mcr.microsoft.com/vscode/devcontainers/miniconda:0-3",
// "build": {
// "context": "..",
// "dockerfile": "Dockerfile"
// },

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": []

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "/opt/conda/bin/conda init && /opt/conda/bin/pip install -e /workspaces/py4DSTEM/ && /opt/conda/bin/pip install ipython ipykernel jupyter",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.analysis.autoFormatStrings": true,
"python.analysis.completeFunctionParens": true,
"ruff.showNotifications": "onWarning",
"workbench.colorTheme": "Monokai",
// "editor.defaultFormatter": "ms-python.black-formatter",
"editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace",
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.minimap.renderCharacters": false,
"editor.minimap.autohide": true,
"editor.minimap.scale": 2,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": {
"source.organizeImports": false
}
}
},
"extensions": [
"ms-python.python",
"donjayamanne.python-extension-pack",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"GitHub.codespaces",
"ms-azuretools.vscode-docker",
"DavidAnson.vscode-markdownlint",
"ms-vsliveshare.vsliveshare",
"charliermarsh.ruff",
"eamodio.gitlens",
"ms-python.black-formatter"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
17 changes: 17 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[flake8]
extend-ignore:
E114,
E115,
E116,
E201,
E202,
E203,
E204,
E231,
E265,
E266,
E303,
E402,
E501,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add, locally collects files differently to the GA
to make it ignore __init__.py and setup.py files and to stop it searching docs, when run locally, we can also add to tests it to ignore this as well

exclude =
    *__init__.py
    *setup.py
    docs



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.
20 changes: 20 additions & 0 deletions .github/scripts/update_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Script to update the patch version number of the py4DSTEM package.
"""

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].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
45 changes: 45 additions & 0 deletions .github/workflows/check_install_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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.9", "3.10", "3.11", "3.12"]
# 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_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.9", "3.10", "3.11", "3.12"]
#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.9", "3.12"]
# 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())"
30 changes: 30 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint with super-linter@v5-slim

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: super-linter/super-linter/slim@v5 # updated to latest slim as quicker to download
env:
VALIDATE_ALL_CODEBASE: false # only check changes
VALIDATE_PYTHON_FLAKE8: true # lint with flake8
DEFAULT_BRANCH: "dev" # set default branch to dev
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for github things
# FILTER_REGEX_EXCLUDE: .*test/.* # exclude test dirs
FILTER_REGEX_EXCLUDE: .*__init__.py/.* # exclude test dirs
FILTER_REGEX_INCLUDE: .*py4DSTEM/.* # only look for py4DSTEM
LINTER_RULES_PATH: / # set toplevel dir as the path to look for rules
PYTHON_FLAKE8_CONFIG_FILE: .flake8 # set specific config file
Loading