From e9a5ec1441facff71a33ef40bf55eaa73b555c61 Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Thu, 27 Jun 2024 14:07:24 -0400 Subject: [PATCH 1/7] Change badge to point to hexrd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06bbdfe1d..16f821128 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8033939.svg)](https://doi.org/10.5281/zenodo.8033939) ![conda-package](https://github.com/HEXRD/hexrd/workflows/conda-package/badge.svg) ![test](https://github.com/HEXRD/hexrd/workflows/test/badge.svg) [![codecov](https://codecov.io/gh/Verdant-Evolution/hexrd/graph/badge.svg?token=UNM5X7BYDD)](https://codecov.io/gh/Verdant-Evolution/hexrd) ![latest version](https://anaconda.org/hexrd/hexrd/badges/version.svg) ![last updated](https://anaconda.org/hexrd/hexrd/badges/latest_release_relative_date.svg) ![downloads](https://anaconda.org/hexrd/hexrd/badges/downloads.svg) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8033939.svg)](https://doi.org/10.5281/zenodo.8033939) ![conda-package](https://github.com/HEXRD/hexrd/workflows/conda-package/badge.svg) ![test](https://github.com/HEXRD/hexrd/workflows/test/badge.svg) [![codecov](https://codecov.io/gh/Verdant-Evolution/hexrd/graph/badge.svg?token=UNM5X7BYDD)](https://codecov.io/gh/Hexrd/hexrd) ![latest version](https://anaconda.org/hexrd/hexrd/badges/version.svg) ![last updated](https://anaconda.org/hexrd/hexrd/badges/latest_release_relative_date.svg) ![downloads](https://anaconda.org/hexrd/hexrd/badges/downloads.svg) # HEXRD The HEXRD project is developing a cross-platform, open-source library for the general analysis of X-ray diffraction data. This includes powder diffraction, Laue diffraction, and High Energy Diffraction Microscopy (_a.k.a._ 3DXRD, multi-grain rotation method) modalities. At its core, HEXRD provides an abstraction of a generic diffraction instrument with support for multiple detectors. This includes optimized transforms from the direct and reciprocal crystal lattices to the local detector coordinates, harnesses for interpolating image data into scattering angle coordinates, and sophisticated calibration routines. From 3cbbdbcfdf4fc64b4c28896fcdf85e7b519b3e45 Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Thu, 27 Jun 2024 14:10:52 -0400 Subject: [PATCH 2/7] Point status badge to hexrd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 16f821128..58ae51f42 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8033939.svg)](https://doi.org/10.5281/zenodo.8033939) ![conda-package](https://github.com/HEXRD/hexrd/workflows/conda-package/badge.svg) ![test](https://github.com/HEXRD/hexrd/workflows/test/badge.svg) [![codecov](https://codecov.io/gh/Verdant-Evolution/hexrd/graph/badge.svg?token=UNM5X7BYDD)](https://codecov.io/gh/Hexrd/hexrd) ![latest version](https://anaconda.org/hexrd/hexrd/badges/version.svg) ![last updated](https://anaconda.org/hexrd/hexrd/badges/latest_release_relative_date.svg) ![downloads](https://anaconda.org/hexrd/hexrd/badges/downloads.svg) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8033939.svg)](https://doi.org/10.5281/zenodo.8033939) ![conda-package](https://github.com/HEXRD/hexrd/workflows/conda-package/badge.svg) ![test](https://github.com/HEXRD/hexrd/workflows/test/badge.svg) [![codecov](https://codecov.io/gh/Hexrd/hexrd/graph/badge.svg?token=UNM5X7BYDD)](https://codecov.io/gh/Hexrd/hexrd) ![latest version](https://anaconda.org/hexrd/hexrd/badges/version.svg) ![last updated](https://anaconda.org/hexrd/hexrd/badges/latest_release_relative_date.svg) ![downloads](https://anaconda.org/hexrd/hexrd/badges/downloads.svg) # HEXRD The HEXRD project is developing a cross-platform, open-source library for the general analysis of X-ray diffraction data. This includes powder diffraction, Laue diffraction, and High Energy Diffraction Microscopy (_a.k.a._ 3DXRD, multi-grain rotation method) modalities. At its core, HEXRD provides an abstraction of a generic diffraction instrument with support for multiple detectors. This includes optimized transforms from the direct and reciprocal crystal lattices to the local detector coordinates, harnesses for interpolating image data into scattering angle coordinates, and sophisticated calibration routines. From 8b7ef3fc5051d1570f90c356a8074da0a1d13093 Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Tue, 2 Jul 2024 11:50:42 -0400 Subject: [PATCH 3/7] move codecov to test yaml --- .github/workflows/codecov.yml | 45 ----------------------------------- .github/workflows/test.yml | 22 +++++++++++++++-- 2 files changed, 20 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index b02b02b20..000000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Workflow for Codecov -on: [push, pull_request] -jobs: - run: - runs-on: ubuntu-latest - steps: - - name: Checkout HEXRD - uses: actions/checkout@v4 - with: - path: hexrd - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - - name: Checkout examples - uses: actions/checkout@v4 - with: - repository: HEXRD/examples - path: examples - - - name: Install HEXRD - run: | - pip install -e . - working-directory: hexrd - - - name: Install requirements-dev.txt - run: | - pip install -r tests/requirements-dev.txt - working-directory: hexrd - - - name: Run tests - env: - HEXRD_EXAMPLE_REPO_PATH: ${{ github.workspace }}/examples - run: | - pytest --cov hexrd --cov-report xml:coverage.xml tests - working-directory: hexrd - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: coverage.xml - working-directory: hexrd - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea3cd94ca..4d1bfe505 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: test on: push: - branches: [ master ] + branches: [ master, code-coverage ] pull_request: branches: [ master ] @@ -61,8 +61,9 @@ jobs: if: ${{ matrix.config.os == 'macos-latest'}} - name: Install HEXRD + # Install in editable mode for codecov run: | - pip install . + pip install -e . working-directory: hexrd - name: Install requirements-dev.txt @@ -75,4 +76,21 @@ jobs: HEXRD_EXAMPLE_REPO_PATH: ${{ github.workspace }}/examples run: | pytest -s tests/ + if: ${{ matrix.config.os != 'ubuntu-latest'}} working-directory: hexrd + + - name: Run tests with codecov + env: + HEXRD_EXAMPLE_REPO_PATH: ${{ github.workspace }}/examples + run: | + pytest -s --cov hexrd --cov-report xml:coverage.xml tests + if: ${{ matrix.config.os == 'ubuntu-latest'}} + working-directory: hexrd + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: coverage.xml + working-directory: hexrd + From 77726698d29fa488e870e016ec1d3bf5e26755dc Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Tue, 2 Jul 2024 11:51:54 -0400 Subject: [PATCH 4/7] Parallel styling --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d1bfe505..380d9368d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,7 +83,7 @@ jobs: env: HEXRD_EXAMPLE_REPO_PATH: ${{ github.workspace }}/examples run: | - pytest -s --cov hexrd --cov-report xml:coverage.xml tests + pytest -s --cov hexrd --cov-report xml:coverage.xml tests/ if: ${{ matrix.config.os == 'ubuntu-latest'}} working-directory: hexrd From d03e027a81589bbd2659044f2842fb8073282069 Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Tue, 2 Jul 2024 11:54:08 -0400 Subject: [PATCH 5/7] Only try to upload to codecov on ubuntu latest --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 380d9368d..665b59094 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,4 +93,5 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} file: coverage.xml working-directory: hexrd + if: ${{ matrix.config.os == 'ubuntu-latest'}} From 91ca65056d3956b591154acce65456105f3888d5 Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Tue, 2 Jul 2024 11:57:16 -0400 Subject: [PATCH 6/7] Only run tests on master --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 665b59094..62e37eed5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: test on: push: - branches: [ master, code-coverage ] + branches: [ master ] pull_request: branches: [ master ] From 6eb62910d6f496a52b2e4781a8bb0d106dbef442 Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Tue, 2 Jul 2024 12:49:28 -0400 Subject: [PATCH 7/7] Remove unused token from readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58ae51f42..04b87e837 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8033939.svg)](https://doi.org/10.5281/zenodo.8033939) ![conda-package](https://github.com/HEXRD/hexrd/workflows/conda-package/badge.svg) ![test](https://github.com/HEXRD/hexrd/workflows/test/badge.svg) [![codecov](https://codecov.io/gh/Hexrd/hexrd/graph/badge.svg?token=UNM5X7BYDD)](https://codecov.io/gh/Hexrd/hexrd) ![latest version](https://anaconda.org/hexrd/hexrd/badges/version.svg) ![last updated](https://anaconda.org/hexrd/hexrd/badges/latest_release_relative_date.svg) ![downloads](https://anaconda.org/hexrd/hexrd/badges/downloads.svg) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8033939.svg)](https://doi.org/10.5281/zenodo.8033939) ![conda-package](https://github.com/HEXRD/hexrd/workflows/conda-package/badge.svg) ![test](https://github.com/HEXRD/hexrd/workflows/test/badge.svg) [![codecov](https://codecov.io/gh/Hexrd/hexrd/graph/badge.svg)](https://codecov.io/gh/Hexrd/hexrd) ![latest version](https://anaconda.org/hexrd/hexrd/badges/version.svg) ![last updated](https://anaconda.org/hexrd/hexrd/badges/latest_release_relative_date.svg) ![downloads](https://anaconda.org/hexrd/hexrd/badges/downloads.svg) # HEXRD The HEXRD project is developing a cross-platform, open-source library for the general analysis of X-ray diffraction data. This includes powder diffraction, Laue diffraction, and High Energy Diffraction Microscopy (_a.k.a._ 3DXRD, multi-grain rotation method) modalities. At its core, HEXRD provides an abstraction of a generic diffraction instrument with support for multiple detectors. This includes optimized transforms from the direct and reciprocal crystal lattices to the local detector coordinates, harnesses for interpolating image data into scattering angle coordinates, and sophisticated calibration routines.