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

Added a py.typed for type checkers #35

Closed
wants to merge 2,569 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2569 commits
Select commit Hold shift + click to select a range
6e26ddd
Merge pull request #3364 from ericpre/plot_roi_map_fix
ericpre May 8, 2024
5ffcff8
Prepare 2.1 release: update change log
ericpre May 8, 2024
cd40ce5
Fix formatting release notes
ericpre May 8, 2024
0ad20e2
Fix typos release notes
ericpre May 8, 2024
b92f219
Update documentation version switcher
ericpre May 8, 2024
686ba82
Update fallback version in `pyproject.toml`
ericpre May 8, 2024
b742845
Merge pull request #3370 from ericpre/release2.1
ericpre May 8, 2024
f5e1ea5
Merge remote-tracking branch 'upsteam/RELEASE_next_minor' into RELEAS…
ericpre May 8, 2024
0c862df
Bump softprops/action-gh-release from 2.0.4 to 2.0.5
dependabot[bot] May 13, 2024
685d945
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 13, 2024
2b933f3
Merge pull request #3369 from hyperspy/pre-commit-ci-update-config
ericpre May 17, 2024
3612fde
Merge pull request #3372 from hyperspy/dependabot/github_actions/RELE…
ericpre May 17, 2024
ceb08a6
Fix add_poisson_noise replacing data array
francisco-dlp May 29, 2024
849d8d5
Add test
francisco-dlp May 29, 2024
0cdf37c
Update docstring
francisco-dlp May 29, 2024
8702cf8
Tweak the documentation on dask scheduler
ericpre May 29, 2024
3c342c5
Fix link to tutorials
ericpre May 29, 2024
d5861c4
Fix error message to point to RosettaSciIO for report error when read…
ericpre May 29, 2024
74f8a00
Add changelog entry
ericpre May 29, 2024
d45e6f7
Fix it for lazy signals too
francisco-dlp May 31, 2024
73e3280
Deprecate keep_dtype
francisco-dlp May 31, 2024
01c2921
Refactor test_add_poisson_noise to use pytest warnings
francisco-dlp May 31, 2024
ba2b08d
update dask min version
francisco-dlp May 31, 2024
5b3faeb
Remove unnessary test line
francisco-dlp May 31, 2024
3ca8555
Further simplify test
francisco-dlp May 31, 2024
a7cb1de
add_gaussian_noise no longer changes data object when lazy
francisco-dlp May 31, 2024
5263955
Update hyperspy/signal.py
francisco-dlp Jun 1, 2024
bf9d5ba
Update hyperspy/signal.py
francisco-dlp Jun 1, 2024
e4595c1
Update hyperspy/tests/signals/test_2D.py
francisco-dlp Jun 1, 2024
38097be
Update hyperspy/tests/signals/test_2D.py
francisco-dlp Jun 1, 2024
8b9095a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 3, 2024
ea6c7ba
BSS: avoid changing mask
francisco-dlp Jun 5, 2024
82cfbce
Add test
francisco-dlp Jun 5, 2024
2cb36c1
Fix it for lazy signals too
francisco-dlp Jun 5, 2024
890baa6
Add changelog entry
francisco-dlp Jun 5, 2024
6292e82
Update upcoming_changes/3384.bugfix.rst
francisco-dlp Jun 5, 2024
adb1dff
Add test for decomposition masks too
francisco-dlp Jun 5, 2024
7f02a15
Merge branch 'BUGFIX_BSS_sig_mask' of https://github.com/francisco-dl…
francisco-dlp Jun 5, 2024
fe4d939
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 5, 2024
fabc016
Change dask version in test.yml
francisco-dlp Jun 5, 2024
04f1188
Add changelog entry
francisco-dlp Jun 5, 2024
f4d90b0
Merge pull request #3384 from francisco-dlp/BUGFIX_BSS_sig_mask
ericpre Jun 5, 2024
fd547dc
Merge branch 'BUGFIX_poisson_noise' of https://github.com/francisco-d…
francisco-dlp Jun 5, 2024
01cfd39
Fix test
francisco-dlp Jun 5, 2024
b06fe8e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 5, 2024
4ab18a6
Fix changelog entry
ericpre Jun 5, 2024
444ae14
Merge pull request #3379 from francisco-dlp/BUGFIX_poisson_noise
ericpre Jun 5, 2024
fec27b7
Fix typos
ericpre Jun 5, 2024
1d69e62
Merge pull request #3380 from ericpre/improve_Documentation_distribut…
ericpre Jun 5, 2024
c06b7a7
Merge pull request #3377 from hyperspy/pre-commit-ci-update-config
ericpre Jun 6, 2024
c4f54c7
Only import gui widget when the toolkit is enabled
ericpre May 4, 2024
e6a9690
Add changelog entry
ericpre May 4, 2024
35b09c4
Merge pull request #3366 from ericpre/avoid_importing_toolkit_when_no…
francisco-dlp Jun 6, 2024
25c28e3
Update residual line when model line is changed.
HanHsuanWu Apr 11, 2024
0ccf5c6
Apply suggestions from code review
HanHsuanWu May 9, 2024
a24a53c
Apply suggestions from code review
HanHsuanWu May 9, 2024
079a36a
minor fix
HanHsuanWu May 9, 2024
0c09554
self.residual_line disconnection and reset to None when plot is closed
HanHsuanWu May 14, 2024
723a758
Add test for checking events connection and resetting plotting line w…
ericpre Jun 6, 2024
4110233
Add changelog entry
ericpre Jun 6, 2024
52ceddc
Merge pull request #3355 from HanHsuanWu/RELEASE_next_patch
ericpre Jun 6, 2024
95c194c
Merge remote-tracking branch 'upsteam/RELEASE_next_patch' into RELEAS…
ericpre Jun 6, 2024
f4e9586
Fix import error of `VisibleDeprecationWarning` from numpy
ericpre Jun 8, 2024
998a89d
Replace use of removed `data.ptp()` by `np.ptp(data)`
ericpre Jun 8, 2024
1a8370e
Fix incorrect dtype in test
ericpre Jun 8, 2024
92d4013
Fix import error of `VisibleDeprecationWarning` from numpy: use hyper…
ericpre Jun 8, 2024
9b18122
Add `copy` argument to `__array__` method
ericpre Jun 8, 2024
d9fdf1b
Specify `axes` in `fft_correlation`` as per numpy 2.0 deprecation war…
ericpre Jun 8, 2024
5c44108
Add `return_scalar` parameter to `__array_wrap__` as per numpy 2.0 de…
ericpre Jun 8, 2024
fe7bbce
Add build with numpy 2.0 to CI test matrix
ericpre Jun 8, 2024
9edf207
Update GitHub CI matrix following changes to macos runner: latest is …
ericpre Jun 8, 2024
cf3983d
Don't upload coverage results on fork to avoid warning on GitHub
ericpre Jun 8, 2024
b322f67
Make docstring test to pass with numpy 2.0.0rc2
ericpre Jun 8, 2024
83b3faa
Add changelog entry
ericpre Jun 8, 2024
d231992
Fix order variables when substituing with real sympy symbols
ericpre Jun 9, 2024
36ef02d
Fix gradients of some expression based component
ericpre Jun 10, 2024
bf4067b
Consolidate components tests
ericpre Jun 11, 2024
d63c725
Don't compute gradients for heaviside using sympy
ericpre Jun 11, 2024
aee33ac
Add changelog entry
ericpre Jun 11, 2024
2b1e528
Merge pull request #3388 from ericpre/fix_expression
jlaehne Jun 24, 2024
c086e3f
Bump softprops/action-gh-release from 2.0.5 to 2.0.6
dependabot[bot] Jun 24, 2024
ed34770
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 24, 2024
c629b57
Merge pull request #3387 from hyperspy/pre-commit-ci-update-config
ericpre Jun 25, 2024
70b9669
Merge remote-tracking branch 'upsteam/RELEASE_next_patch' into RELEAS…
ericpre Jun 25, 2024
642af58
Add support for `"sig"` and `"nav"` to index `axes_manager`
ericpre Jun 5, 2024
8f98d0a
Raise deprecation warning for `rechunk` argument in `derivative`
ericpre Jun 7, 2024
6471b6f
Add support in ROI call
ericpre Jun 7, 2024
bf3e9cb
Add changelog entries
ericpre Jun 6, 2024
89c2e54
Add TupleSA
francisco-dlp May 27, 2021
31c44b3
Use TupleSA for and
francisco-dlp May 28, 2021
165a778
Keep type in * and + operations
francisco-dlp May 28, 2021
a3d1a08
Set attributes with iterable
francisco-dlp May 28, 2021
5156d58
Fix indexing bug
francisco-dlp May 28, 2021
9bc6b4e
Remove forgotted HEAD
francisco-dlp Jun 26, 2024
b1ada90
Add forgotten import
francisco-dlp Jun 26, 2024
c9a4916
Improve docstring
ericpre Jun 26, 2024
e93d55a
Use set instead of __setattr__
francisco-dlp Jun 27, 2024
a937517
Add tests
francisco-dlp Jun 27, 2024
29fae86
Add docstring
francisco-dlp Jun 27, 2024
ebebf02
Add UG documentation
francisco-dlp Jun 27, 2024
9eab3a2
Add changelog
francisco-dlp Jun 27, 2024
72cc079
Add more tests
francisco-dlp Jun 27, 2024
2328ad3
Update docstrings
francisco-dlp Jun 27, 2024
58f7c23
Fix changelog link
francisco-dlp Jun 27, 2024
3ad2fb2
Fix typo in sphinx directive
francisco-dlp Jun 27, 2024
324cc1c
Merge pull request #3392 from hyperspy/dependabot/github_actions/RELE…
ericpre Jul 1, 2024
ea7c24d
Use `show_version_warning_banner` option of `pydata-sphinx-theme`
ericpre Jul 1, 2024
80973fe
Fix broken link
ericpre Jul 1, 2024
daba5e9
Use `VisibleDeprecationWarning` and add corresponding test
ericpre Jul 1, 2024
abc0882
Merge pull request #3385 from ericpre/support_nav_sig_axes_keyword
ericpre Jul 1, 2024
dcafc42
Add changelog entry
ericpre Jul 3, 2024
faae089
Fix link to zenodo concept DOI
ericpre Jul 3, 2024
d81ad52
Exclude pillow 10.4.0 because of its incompatibility with numpy 1.20.x
ericpre Jul 3, 2024
bb6d570
Merge pull request #3397 from ericpre/add_warning_banner_old_document…
ericpre Jul 3, 2024
d89b847
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 2, 2024
93c28f1
Fix ruff redefinition error
ericpre Jul 3, 2024
0df3b90
Merge pull request #3398 from hyperspy/pre-commit-ci-update-config
ericpre Jul 3, 2024
ae33bc8
Merge pull request #3386 from ericpre/fix_numpy2
ericpre Jul 3, 2024
1cd8e3c
Merge remote-tracking branch 'upsteam/RELEASE_next_patch' into RELEAS…
ericpre Jul 4, 2024
6ffdd91
Update doc/user_guide/axes.rst
francisco-dlp Jul 9, 2024
b57a9e6
Update doc/user_guide/axes.rst
francisco-dlp Jul 9, 2024
17211e9
Update doc/user_guide/axes.rst
francisco-dlp Jul 9, 2024
172d3a5
Add method
francisco-dlp Jul 9, 2024
da5a64a
Add tests
francisco-dlp Jul 9, 2024
f87c6a5
Add TupleSA to API
francisco-dlp Jul 9, 2024
07a2db4
Add comment, thanks @ericpre
francisco-dlp Jul 9, 2024
8e1fa51
Update UG
francisco-dlp Jul 9, 2024
b6f3c41
Update changelog
francisco-dlp Jul 9, 2024
8aede49
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 9, 2024
7e45574
Merge pull request #2756 from francisco-dlp/NEW_TupleSA
ericpre Jul 9, 2024
409f9bc
Prepare 2.1.1 release
ericpre Jul 10, 2024
ecee88f
Merge pull request #3403 from ericpre/Release_2.1.1
ericpre Jul 11, 2024
414c8a2
Merge remote-tracking branch 'upsteam/RELEASE_next_patch' into RELEAS…
ericpre Jul 11, 2024
a5de11d
Fix `fallback_version` in `pyproject.toml`
ericpre Jul 11, 2024
4c413f5
Fix rebin uniform axis when another axis is non-uniform
ericpre Jul 18, 2024
f9b7830
Add changelog entry
ericpre Jul 18, 2024
ce9902f
Fix test failure on oldest build on Github CI
ericpre Jul 18, 2024
75b5a84
Merge pull request #3407 from ericpre/fix_rebin_nonuniform
jlaehne Jul 18, 2024
74ac9b5
Fix rebin uniform axis when another axis is non-uniform
ericpre Jul 18, 2024
ea288ed
Add changelog entry
ericpre Jul 18, 2024
d081f83
Fix test failure on oldest build on Github CI
ericpre Jul 18, 2024
b0e7da1
Workaround for old version banner to play well with the stable versio…
ericpre Jul 11, 2024
2e2fdac
Add changelog entry
ericpre Jul 19, 2024
26b48dd
Bump robotology/gh-action-nightly-merge from 1.5.0 to 1.5.2
dependabot[bot] Jul 22, 2024
e90d37c
Bump softprops/action-gh-release from 2.0.6 to 2.0.8
dependabot[bot] Jul 22, 2024
5fafd1b
Fix loading polynomial component saved with hyperspy <= 2.1.1. The `o…
ericpre Jul 22, 2024
f65c7fa
Fallback to module "numpy" module when loading expression based compo…
ericpre Jul 22, 2024
f04be98
Add changelog entry
ericpre Jul 22, 2024
33853fb
Merge pull request #3411 from hyperspy/dependabot/github_actions/RELE…
ericpre Jul 26, 2024
a72065d
Merge pull request #3412 from hyperspy/dependabot/github_actions/RELE…
ericpre Jul 26, 2024
9db1706
Merge pull request #3413 from ericpre/fix_saving_polynomial
jlaehne Aug 5, 2024
2173652
Add example: live FFT using region of interest
magnunor Aug 5, 2024
08cdda1
Add noise to make the FFT more realistic and mention about apodization
ericpre Aug 5, 2024
6bf87ca
Pin towncrier for now - until sphinxcontrib-towncrier supports towncr…
ericpre Aug 5, 2024
c8e7f15
Merge pull request #3400 from magnunor/add_fft_live_example
ericpre Aug 5, 2024
a2c8974
Merge pull request #3409 from ericpre/fix_switcher_banner
ericpre Aug 5, 2024
aaea02e
Use `lock=False` in `dask.array.store` to avoid error with picking lo…
ericpre Aug 3, 2024
1fd5760
Use context manager to handle progress bar
ericpre Aug 3, 2024
4060859
Add option to silence warning when `BaseSignal.map` operates on signa…
ericpre Aug 4, 2024
a701523
Add changelog entries
ericpre Aug 3, 2024
49fc6ee
Merge pull request #3421 from ericpre/lock_dask_store
ericpre Aug 5, 2024
09d2112
Disable snapping for non-uniform axis to avoid error when moving ROI …
ericpre Aug 2, 2024
b0bdd7e
Catch warning for summing over non-uniform in `hs.plot.plot_roi_map`
ericpre Aug 2, 2024
17c6090
Add changelog entry
ericpre Aug 2, 2024
c13f9d4
Merge pull request #3418 from ericpre/snap_widget_non-uniform_axis
jlaehne Aug 8, 2024
1571c11
Merge remote-tracking branch 'upsteam/RELEASE_next_patch' into RELEAS…
ericpre Aug 8, 2024
7b43d99
Add parameter to normalise spectra in `hs.plot.plot_spectra`
ericpre Aug 2, 2024
1e32b39
Add changelog entry
ericpre Aug 2, 2024
fc39dc1
Merge pull request #3419 from ericpre/normalise_plot_spectra
ericpre Aug 8, 2024
2c22280
Add support to convert to uniform axis in `interpolate_on_axis`
ericpre Jul 19, 2024
9b7534b
Fix `convert_to_uniform_axis` for `FunctionalDataAxis`
ericpre Jul 19, 2024
94b3b83
Add option to use numpy polynomial fit to estimate the `offset` and `…
ericpre Jul 22, 2024
5de58e9
Add changelog entries
ericpre Jul 19, 2024
b532058
Suggest to use `interpolate_on_axis` in rebin error message when rebi…
ericpre Aug 12, 2024
ec2731c
Remove numpy 2.0 build in the test matrix since it is now released an…
ericpre Aug 12, 2024
5fc755d
Fix docstring
ericpre Aug 20, 2024
32ae100
Merge pull request #3410 from ericpre/interpolation_on_axis_convert_u…
ericpre Aug 20, 2024
cae88b0
Silence warning in `smooth_lowess`
ericpre Aug 25, 2024
578dea8
Fix handling of `silence_warning` parameter in `map`
ericpre Aug 25, 2024
f34df34
Silence warning in `find_peaks1D_ohaver`
ericpre Aug 26, 2024
029d627
Increase tolerance in hanning test for lazy signal - most likely in n…
ericpre Aug 27, 2024
9a84391
Add changelog entry
ericpre Aug 27, 2024
000e3ce
Merge pull request #3428 from ericpre/silence_warning_non-uniform
jlaehne Aug 28, 2024
4d10b61
Merge remote-tracking branch 'upsteam/RELEASE_next_patch' into RELEAS…
ericpre Aug 28, 2024
e2f0cdb
Add non negative linear fitting
ericpre Jul 9, 2024
b7f1991
Rename optimizer `ridge_regression` to `ridge` and add `ols` optimizer
ericpre Aug 17, 2024
6d905f1
Add changelog entries
ericpre Aug 17, 2024
f7eb230
Fix failing test with scipy 1.15 dev - most likely due singular matri…
ericpre Aug 19, 2024
5806870
Improve `hs.data.atomic_resolution_image`
ericpre Aug 3, 2024
f264b11
Add changelog entry
ericpre Aug 3, 2024
b0627bc
Merge pull request #3420 from ericpre/improve_atomic_resolution_image
jlaehne Aug 29, 2024
8485c71
Consistently return `TupleSA` when indexing `AxesManager`
ericpre Sep 10, 2024
8dba2ee
Merge pull request #3434 from ericpre/return_tupleSA_indexing_AxesMan…
jlaehne Sep 10, 2024
59282e5
Fix typo in documentation
ericpre Sep 11, 2024
8e8a54e
Merge pull request #3426 from ericpre/linear_optimizer_improvements
jlaehne Sep 11, 2024
cca4171
update set-signal-type docstring
jlaehne Sep 11, 2024
618059f
add changelog entry
jlaehne Sep 11, 2024
1506926
Fix horizontal plotting with ipympl 0.9.4/ipython 8.24: ipympl backen…
ericpre Sep 11, 2024
ef745b7
update signal_basics etc
jlaehne Sep 11, 2024
922b855
Merge pull request #3435 from jlaehne/set-signal-doc
ericpre Sep 11, 2024
f797610
Add changelog entry
ericpre Sep 11, 2024
f71e0ba
Merge pull request #3437 from ericpre/fix_horizontal_plotting_ipympl
jlaehne Sep 12, 2024
4ea5f18
Merge remote-tracking branch 'upsteam/RELEASE_next_patch' into RELEAS…
ericpre Sep 12, 2024
d04aeb7
Fix interactive normalise in `hs.plot.plot_spectra`
ericpre Aug 25, 2024
9159550
Fix passing `single_figure_kwargs` in `hs.plot.plot_roi_map` when `hs…
ericpre Sep 12, 2024
ec7a85f
Set quantity in `BaseSignal.get_histogram`
ericpre Jul 28, 2024
e913b9e
Fix range bins `BaseSignal.get_histogram` when number of bins is too …
ericpre Aug 3, 2024
52a4df5
Remove pop up `range_bins` parameter for lazy signal since dask suppo…
ericpre Aug 4, 2024
ab380d1
Set quantity in `BaseSignal.get_histogram`
ericpre Aug 4, 2024
a94a608
Increase test coverage
ericpre Aug 4, 2024
9f7be72
Add changelog entry
ericpre Aug 3, 2024
5dbd2b5
Merge pull request #3438 from ericpre/fix_interactive_normalise
jlaehne Sep 12, 2024
ed210c9
Fix wording docstring
ericpre Sep 12, 2024
cd3fc13
Add style parameter to `print_known_signal_types`
ericpre Sep 12, 2024
a9e7995
Catch warning in spikes removal tools
ericpre Sep 12, 2024
d0ee956
Add changelog entry
ericpre Sep 12, 2024
fcba3b4
Merge pull request #3439 from ericpre/add_style_parameters_print_know…
jlaehne Sep 13, 2024
5a4d3f6
Improve wording docstring and fix formatting release note
ericpre Sep 13, 2024
5b319d1
Improve docstring
ericpre Sep 13, 2024
a900179
Merge pull request #3422 from ericpre/fix_get_histogram
jlaehne Sep 13, 2024
5a310b5
Merge remote-tracking branch 'upsteam/RELEASE_next_patch' into RELEAS…
ericpre Sep 13, 2024
1c15771
Pass `ax` to `hs.plot.plot_images`
ericpre Aug 1, 2024
5bb3d00
Fix setting contrast with overlay: remove hardcoding min value to 0
ericpre Aug 4, 2024
7f63191
Pass `ax` to `hs.plot.plot_spectra`
ericpre Aug 4, 2024
c775e03
Fix and simplify some plotting tests
ericpre Aug 4, 2024
ad36954
Fix plotting overlay with signals
ericpre Aug 26, 2024
71e01f2
Add examples
ericpre Sep 18, 2024
527e251
Add changelog entry, enable `tls_verify` to avoid documentation build…
ericpre Sep 19, 2024
bdeb103
Remove broken links - dead google site.
ericpre Sep 19, 2024
21ea403
New Feature: Add sub-figure plotting
CSSFrancis Mar 26, 2024
dbcc103
Bigfix: Draw idle rather than draw
CSSFrancis Mar 26, 2024
9208532
NewFeature: Add support for 1D case
CSSFrancis Mar 26, 2024
27fabd0
Example: Add example for custom layouts
CSSFrancis Mar 27, 2024
d7e9d57
Example: Add Example for ROI insets
CSSFrancis Mar 27, 2024
3a1053e
Example: Add missing random import
CSSFrancis Mar 27, 2024
75404e8
BugFix: Improved documentation workflow
CSSFrancis Mar 27, 2024
74396ba
Refactor plot close event connection
ericpre Apr 9, 2024
5077b6a
Documentation: Made the ROI's interactive for example.
CSSFrancis Apr 11, 2024
8fe7bcd
Fix colorbar warning
ericpre Apr 12, 2024
2d9208f
Fix ruff
ericpre Apr 12, 2024
618f9bc
Fix doc build
ericpre Apr 12, 2024
688ed40
Require matplotlib 3.9 to use subfigure to be able to use interactive…
ericpre May 18, 2024
c2c4cfc
Add `use_subfigure` option to preferences
ericpre May 18, 2024
010fe88
Add more tests
ericpre May 18, 2024
0238c72
Add note to mention that plotting with subfigures is slower than sepa…
ericpre Sep 21, 2024
49f6edb
Add changelog entry
ericpre May 18, 2024
619e5e5
Merge pull request #3343 from CSSFrancis/advanced_plotting_tools
CSSFrancis Sep 24, 2024
8a2b624
Fix typos and use figure handle instead of `pyplot`
ericpre Oct 5, 2024
e20d095
Merge pull request #3423 from ericpre/ax_parameters_plot
ericpre Oct 5, 2024
f965ee2
added a py.typed file
thomasaarholt Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 0 additions & 18 deletions .drone.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Run ruff format
922f3594ab343a49cbab22073fa79f073932e13d
8f05320b5419a482ac485f352f352ac4504d08f0
614ccb9895f8e2aaa9a722712944b9eafa227c8c
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'type: bug'

---

#### Describe the bug
A clear and concise description of what the bug is.

#### To Reproduce
Steps to reproduce the behavior:
```
Minimum working example of code
```

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

#### Python environment:
- HyperSpy version: 1.x.x
- Python version: 3.x

#### Additional context
Add any other context about the problem here. If necessary, add screenshots to help explain your problem.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
---


17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'type: feature request'
assignees: ''

---

#### Describe the functionality you would like to see.
A clear and concise description of what you would like to do.

#### Describe the context
Do you want to extend existing functionalities, what types of signals should it apply to, etc.

#### Additional information
Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Requirements
* Read the [developer guide](https://hyperspy.org/hyperspy-doc/current/dev_guide/index.html).
* Read the [developer guide](https://hyperspy.org/hyperspy-doc/current/dev_guide/intro.html).
* Base your pull request on the [correct branch](https://hyperspy.org/hyperspy-doc/current/dev_guide/git.html#semantic-versioning-and-hyperspy-main-branches).
* Filling out the template; it helps the review process and it is useful to summarise the PR.
* This template can be updated during the progression of the PR to summarise its status.
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
target-branch: "RELEASE_next_patch"
44 changes: 44 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Documentation

on: [push, pull_request]

jobs:
Build:
# Use the "reusable workflow" from the hyperspy organisation
uses: hyperspy/.github/.github/workflows/doc.yml@main
with:
# install with speed extra to avoid warnings
pip_extra_doc: 'doc,speed'
# graphviz is required to build mermaid graph
# optipng is required to optimize thumbnail
install_package_ubuntu: graphviz optipng

Push_dev:
needs: Build
# Push only on the "RELEASE_next_minor" and update the "dev" documentation
if: ${{ github.repository_owner == 'hyperspy' && github.ref_name == 'RELEASE_next_minor' }}
permissions:
# needs write permission to push the docs to gh-pages
contents: write
# Use the "reusable workflow" from the hyperspy organisation
uses: hyperspy/.github/.github/workflows/push_doc.yml@main
with:
repository: 'hyperspy/hyperspy-doc'
output_path: 'dev'
secrets:
access_token: ${{ secrets.PAT_DOCUMENTATION }}

Push_tag:
needs: Build
# Push only on tag and update the "current" documentation
if: ${{ github.repository_owner == 'hyperspy' && startsWith(github.ref, 'refs/tags/') }}
permissions:
# needs write permission to push the docs to gh-pages
contents: write
# Use the "reusable workflow" from the hyperspy organisation
uses: hyperspy/.github/.github/workflows/push_doc.yml@main
with:
repository: 'hyperspy/hyperspy-doc'
output_path: 'current'
secrets:
access_token: ${{ secrets.PAT_DOCUMENTATION }}
4 changes: 2 additions & 2 deletions .github/workflows/nightly-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Nightly Merge
uses: robotology/gh-action-nightly-merge@v1.3.2
uses: robotology/gh-action-nightly-merge@81570ba03dd370f582bd3f52d47672d29191829f
with:
stable_branch: 'RELEASE_next_patch'
development_branch: 'RELEASE_next_minor'
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/nightly-merge_non_uniform.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/package_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Package & Test

on: [push, pull_request]

jobs:
package_and_test:
name: Package and Test
# Use the "reusable workflow" from the hyperspy organisation
uses: hyperspy/.github/.github/workflows/package_and_test.yml@main
169 changes: 38 additions & 131 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: Release
# Reusable workflow are not supported with trusted publisher
# https://github.com/pypa/gh-action-pypi-publish/issues/166
# copy and paste
# https://github.com/hyperspy/.github/blob/main/.github/workflows/release_pure_python.yml

# This workflow builds the wheels "on tag".
# If run from the hyperspy/hyperspy repository, the wheels will be uploaded to pypi ;
# otherwise, the wheels will be available as a github artifact.
Expand All @@ -9,140 +14,42 @@ on:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
create_release:
package_and_test:
name: Package and Test
# Use the "reusable workflow" from the hyperspy organisation
uses: hyperspy/.github/.github/workflows/package_and_test.yml@main

upload_to_pypi:
needs: [package_and_test]
runs-on: ubuntu-latest
name: Upload to pypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download dist
uses: actions/download-artifact@v4

- name: Display downloaded files
run: |
ls -shR
working-directory: dist

- uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'hyperspy' }}
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/

create_github_release:
# If zenodo is setup to create a DOI automatically on a GitHub release,
# this step will trigger the mining of the DOI
needs: upload_to_pypi
permissions:
contents: write
name: Create Release
name: Create GitHub Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

build_wheels:
name: Wheels on ${{ matrix.os }}/py${{ matrix.python-version }}
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: ${{ matrix.python-version }}

- name: What OS and Python version
run: |
uname -a
python --version
which python

- name: install pep517 and twine
run: |
python -m pip install --upgrade pip
python -m pip install pep517 twine

- name: Build wheels
run: |
python -m pep517.build --binary --out-dir dist/ .

- name: Display content dist folder
run: |
ls dist/

- name: Install and test distribution
env:
MPLBACKEND: agg
run: |
pip install --pre --find-links dist hyperspy[tests]
pytest --pyargs hyperspy

- uses: actions/upload-artifact@v2
with:
path: ./dist/*.whl

- name: Publish wheels to PyPI
if: github.repository_owner == 'hyperspy'
env:
# Github secret set in the hyperspy/hyperspy repository
# Not available from fork or pull request
# Secrets are not passed to workflows that are triggered by a pull request from a fork
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*.whl --verbose

build_wheels_linux:
name: Wheels on ubuntu-latest
needs: create_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: install twine
run: |
python -m pip install twine

- name: Build manylinux Python wheels
uses: RalfG/[email protected]
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
build-requirements: 'cython'

- name: Build source distribution
run: |
pip install pep517
python -m pep517.build --source --out-dir sdist/ .

- name: Display content dist folder
run: |
ls dist/
ls sdist/

- name: Install and test distribution
env:
MPLBACKEND: agg
run: |
pip install --pre --find-links dist hyperspy[tests]
pytest --pyargs hyperspy

- uses: actions/upload-artifact@v2
with:
path: |
./dist/*-manylinux*.whl
./sdist/*.tar.gz

- name: Publish wheels to PyPI
if: github.repository_owner == 'hyperspy'
env:
# Github secret set in the hyperspy/hyperspy repository
# Not available from fork or pull request
# Secrets are not passed to workflows that are triggered by a pull request from a fork
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*-manylinux*.whl --verbose
twine upload sdist/*.tar.gz --verbose

if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'hyperspy' }}
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
Loading
Loading