Skip to content

Commit

Permalink
Merge pull request #77 from e10harvey/develop
Browse files Browse the repository at this point in the history
Resolve conflicts, bring main up to tip of develop
  • Loading branch information
e10harvey authored Apr 11, 2024
2 parents 5fa07a0 + 18b926e commit 36b11b0
Show file tree
Hide file tree
Showing 477 changed files with 12,974 additions and 20,286 deletions.
23 changes: 23 additions & 0 deletions .coverageac
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[run]
omit = test_*.py
__init__.py
branch = True
dynamic_context = test_function

[report]
skip_covered = False
fail_under = 99
show_missing = True

[html]
directory = tests/htmlcov
title = GenConfig Coverage Report
show_contexts = True

[xml]
output = tests/coverage.xml

[json]
output = tests/coverage.json
pretty_print = True
show_contexts = True
3 changes: 1 addition & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: github-DOCKER
on:
push:
branches:
- main

- main

permissions:
contents: none
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/docs_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: github-DOCS

on:
pull_request:
paths-ignore:
- '**/*.rst'
- '**/*.md'
- 'doc/**'
types: [ opened, reopened, synchronize ]

permissions:
contents: none

# Cancels any in progress 'workflow' associated with this PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docs-check:
name: docs-check
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: OpenCSP
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Sphinx docs check
run: |
cd OpenCSP
pip install -r requirements.txt
cd doc
pip install -r requirements.txt
./make_docs.sh
36 changes: 36 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: github-FORMAT
#test
on:
pull_request:
paths-ignore:
- '**/*.rst'
- '**/*.md'
- 'doc/**'
types: [ opened, reopened, synchronize ]

permissions:
contents: none

# Cancels any in progress 'workflow' associated with this PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
format-check:
name: format-check
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: OpenCSP
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Black formatting check
run: |
pip install black
cd OpenCSP
black . -S -C --check --diff --config ./pyproject.toml
47 changes: 47 additions & 0 deletions .github/workflows/ubi8-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: github-UBI8-NIGHTLY

# Runs every night at midnight
on:
schedule:
- cron: '00 00 * * *'

permissions:
contents: none

# Cancels any in progress 'workflow' associated with this PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ubi8-nightly:
name: ubi8-nightly
runs-on: [ubuntu-latest]
permissions:
packages: read
contents: read
container:
image: ghcr.io/sandialabs/opencsp:latest-ubi8
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: checkout
uses: actions/checkout@v4
with:
path: OpenCSP

- name: pytest-cov
working-directory: OpenCSP/example
run: |
python3 -m pip install -r ../requirements.txt
export PYTHONPATH=$PWD/../
pytest --color=yes -rs -vv --cov=. --cov-report term --cov-config=.coveragerc
- name: Pip Upgrade pytest-cov
working-directory: OpenCSP/example
run: |
python3 -m pip install -U -r ../requirements.txt
export PYTHONPATH=$PWD/../
pytest --color=yes -rs -vv --cov=. --cov-report term --cov-config=.coveragerc
21 changes: 0 additions & 21 deletions .github/workflows/ubi8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
UBI8_IMAGE: "ghcr.io/sandialabs/opencsp:latest-ubi8"

jobs:
ubi8-image:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4

- name: Build image
run: echo UBI8_IMAGE=$UBI8_IMAGE && docker build . --file Dockerfile --tag $UBI8_IMAGE --label "runnumber=${GITHUB_RUN_ID}"

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Push image
run: |
echo UBI8_IMAGE=$UBI8_IMAGE
docker push $UBI8_IMAGE
ubi8-ci:
needs: ubi8-image
name: ubi8-ci
runs-on: [ubuntu-latest]
permissions:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/windows2022.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: github-WINDOWS2022

on:
pull_request:
paths-ignore:
- '**/*.rst'
- '**/*.md'
- 'doc/**'
types: [ opened, reopened, synchronize ]

permissions:
contents: none

# Cancels any in progress 'workflow' associated with this PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
windows2022-ci:
name: windows2022-ci
runs-on: [windows-2022]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: OpenCSP

- name: Setup headless display
uses: pyvista/setup-headless-display-action@v2
with:
qt: true
pyvista: false

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Deps
run: |
python3 -m pip install -r ./OpenCSP/requirements.txt
choco install ffmpeg
- name: pytest-cov
working-directory: OpenCSP/opencsp
run: |
set PYTHONPATH="$PWD\.."
echo "$PYTHONPATH"
$env:PYTHONPATH="$PWD\.."
pytest --color=yes -rs -vv --cov=. --cov-report term --cov-config=.coveragerc
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# Python cache files.
*.pyc
.pytest_cache/
.spyproject
**/__pycache__/

# Virtual environment
env/

# Ben's Sublime files.
sftp-config.json

# Test code scratch output directories.
actual_output/

# Jupyter checkpoints
.ipynb_checkpoints/

# pytest-cov data
.coverage

# test data output
**/test/data/output/
12 changes: 1 addition & 11 deletions contrib/app/sofast/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@

Code under this directory is not actively maintained by the OpenCSP team.

This is experimental code, still in early stages of exploration and development.

These examples require additional hardware and data.

The Sofast Contributed example suite contains:
1. Example files that provide examples on how to use Sofast to collect data and process already collected data.
2. Files that can be used to test Sofast's processing on previously processed data using the full-resolution data in the sample data suite.
The Sofast Contributed example suite contains examples on how to use Sofast to collect data.

## Example file description:
| File | Description |
| :--- | :--- |
| run_and_characterize_sofast_1_cam.py | Runs Sofast (requires camera/projector/etc.) with a single camera and characterizes data as a single facet data collection. |
| run_and_characterize_sofast_2_cam.py | Runs Sofast (requires two cameras/projector/etc.) with two cameras simultaneously and characterizes data as a single facet data collection |

## Full-resolution testing with Sofast sample data:
| File | Description |
| :--- | :--- |
| generate_processed_datasets.py | Loads measurement files from the Sofast sample data suite, characterizes with Sofast, and saves output data |
| run_full_calibration_manual.py | Runs a manual Sofast calibration using previously captured calibration data from the Sofast sample data suite |
Loading

0 comments on commit 36b11b0

Please sign in to comment.