Skip to content

Patch0.11.4#772

Open
argerlt wants to merge 10 commits intopyxem:mainfrom
argerlt:patch0.11.4
Open

Patch0.11.4#772
argerlt wants to merge 10 commits intopyxem:mainfrom
argerlt:patch0.11.4

Conversation

@argerlt
Copy link
Contributor

@argerlt argerlt commented Jan 8, 2026

Description of the change

Reduces the number of calls to zenodo so the unit tests once again pass. should solve #767

This is done in two ways:

  1. The test test_data.py:test_dataset_availability now pauses for 30 seconds after every failed ping, and will attempt up to 3 consecutive pings per file before failing.This gets around the new Zenodo requests limit discussed in the blog post below:
    https://blog.zenodo.org/2025/11/25/2025-11-14-search-api-updates/

  2. There is a new pytest flag test_downloads. Tests with this flag will be ran only once in a dedicated VM, as opposed to 7 times (one per OS/python version combo). Since these tests are also time consuming, this has the side benefit of speeding up the overall testing time slightly.

Progress of the PR

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the unreleased
    section in CHANGELOG.rst.
  • New contributors are added to kikuchipy/__init__.py and .zenodo.json.

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@6b62a7d). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #772   +/-   ##
=======================================
  Coverage        ?   95.90%           
=======================================
  Files           ?       93           
  Lines           ?     7286           
  Branches        ?      986           
=======================================
  Hits            ?     6988           
  Misses          ?      214           
  Partials        ?       84           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@argerlt
Copy link
Contributor Author

argerlt commented Jan 8, 2026

Done and ready for review.

@hakonanes
Copy link
Member

Thanks for opening this PR.

But to ease reviewing, can you revert the copyright commits? Let's only format the files we change, leaving unchanged files.

@hakonanes
Copy link
Member

@argerlt, if it's fine with you, the I can bring this across the finish line as described in #767 (comment).

@argerlt
Copy link
Contributor Author

argerlt commented Jan 12, 2026

@hakonanes sure that works.

I did a few things just now which you can include or remove:

  1. A force-push to remove the mass-copyright commit (makes "blame" prettier, and "last-modified" more informative).
  2. Removed all download tests, coverage reporting, and documentation building from the tests ran during a PR push (moderately faster and bypasses Zenodo nonsense).
  3. Added an Ubuntu/python3.12 job that runs all tests (including downloads) and generates a coverage report to the weekly tests .
  4. Based on the information in this page, I added '-n 4` to all the pytests args on Ubuntu VM's, which speeds everything up slightly.

My logic being, functionality testing should be done for every PR on every OS and relevant dependency combination, but things like downloads only need be tested once a week, and if we are doing those tests anyway, it's not much more work to track the total coverage then, as opposed to the coverage-minus-ignored-tests being reported after every single push to a PR branch.

That said, I'm fine being hands-off on this PR now. There are multiple ways to handle this issue, feel free to "take this accross the finish line" however you would like from here.

@hakonanes
Copy link
Member

Thanks again.

But, we should report coverage on every commit to a PR. Many people don't check coverage locally, only on PR commits.

I didn't know GitHub provides four CPUs in their test runners! I thought they only provided two... Perhaps it changed recently? Anyways, glad you made that change!

@argerlt
Copy link
Contributor Author

argerlt commented Jan 12, 2026

But, we should report coverage on every commit to a PR. Many people don't check coverage locally, only on PR commits.

Changing it back just to avoid too many quick-and-dirty patch changes, but do we actually need this? The coverage is still reported in the tests by this line:

      - name: Generate line coverage
        if: ${{ matrix.os == 'ubuntu-latest' }}
        run: |
          coverage report --show-missing

but because there is no coverall check like in orix:

  coveralls-finish:
    needs: build-with-pip
    runs-on: ubuntu-latest
    steps:
      - name: Coveralls finished
        uses: AndreMiras/coveralls-python-action@develop
        with:
          parallel-finished: true

Having uncovered lines (I think?) still doesn't trigger a test failure.

I suppose this is something to discuss in a separate issue though, not a patch.

@argerlt argerlt force-pushed the patch0.11.4 branch 4 times, most recently from 047b4b9 to 7179896 Compare January 12, 2026 21:39
@argerlt
Copy link
Contributor Author

argerlt commented Jan 12, 2026

Woof, okay, sorry about that. I made a whitespace typo in the Weekly_tests.yml that caused the weekly tests to error out.

The weekly tests work now. Apologies for the long string of force-pushes.
https://github.com/argerlt/kikuchipy/actions/runs/20936390114

I believe this is ready to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants