Skip to content

Commit

Permalink
Merge pull request #28 from e10harvey/ci_updates
Browse files Browse the repository at this point in the history
.github/workflows: Remove ubi8-image from github-UBI8
  • Loading branch information
e10harvey authored Mar 19, 2024
2 parents 42781b1 + 1b25d3b commit 731a51c
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 84 deletions.
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
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
61 changes: 61 additions & 0 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,67 @@ OpenCSP uses a fork-based development process. To contribute, please create a fo
OpenCSP. When you are ready to propose these changes, please open a pull request (PR)
into the develop branch.

Getting Started
---------------

Setting up your development environment
+++++++++++++++++++++++++++++++++++++++

1. Install Git. Please see: https://git-scm.com/downloads.
2. Install Python 3.10+ and add it to your PATH. Please see: https://www.python.org/downloads/ and https://docs.python.org/3/using/windows.html#installation-steps.
3. Install visual studio code. Please see: https://code.visualstudio.com/.
4. Install ffmpeg. Please see: https://www.ffmpeg.org/download.html.
5. Add ffmpeg to your path. Please see: https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14)#to-add-a-path-to-the-path-environment-variable.
6. Clone the repository. For help on cloning, please see https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository.
7. Setup a python virtual environment to manage OpenCSP's dependencies. For information about python's virtual environments, please see https://docs.python.org/3/library/venv.html.
8. Add OpenCSP to your pythonpath. Please see https://learn.microsoft.com/en-us/windows/python/faqs#what-is-pythonpath-.

How to install OpenCSP's dependencies
+++++++++++++++++++++++++++++++++++++

With python version 3.10 or greater, run the following:

::

$ cd /path/to/OpenCSP/../
$ python -m venv ./venv_opencsp
# On Linux:
$ . ./venv_opencsp/bin/activate
# Or, on Windows:
$ . ./venv_opencsp/Scripts/activate
$ (venv_opencsp) cd OpenCSP
$ (venv_opencsp) pip install -r requirements.txt

Running OpenCSP's test suite
++++++++++++++++++++++++++++

Within venv_opencsp, you can now run:

::

$ (venv_opencsp) cd /path/to/OpenCSP
$ (venv_opencsp) export PYTHONPATH=$PWD
$ (venv_opencsp) cd opencsp
$ (venv_opencsp) pytest

Optional: Using the OpenCSP container
+++++++++++++++++++++++++++++++++++++

If you prefer developing in a container, OpenCSP provides a container image which provides all the dependencies and
environment settings.

You can use this container as follows. Note: to authenticate to ghcr.io, you must create a classic access token with read permissions. See https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry for more information.

::

$ cd /path/to/OpenCSP
$ docker login ghcr.io -u <GITHUB_USERNAME>
$ docker pull ghcr.io/sandialabs/opencsp:latest-ubi8
$ docker run -it -v$PWD:/code ghcr.io/sandialabs/opencsp:latest-ubi8
$ cd opencsp
$ pytest


Contribution Requirements
-------------------------

Expand Down
37 changes: 8 additions & 29 deletions doc/source/example/sofast/config.rst
Original file line number Diff line number Diff line change
@@ -1,57 +1,36 @@
Multi Facet Data Process
========================

.. currentmodule:: example.sofast.example_multi_facet_data_process
.. currentmodule:: example.sofast_fringe.example_multi_facet_data_process

.. automodule:: example.sofast.example_multi_facet_data_process
.. automodule:: example.sofast_fringe.example_multi_facet_data_process
:members:
:show-inheritance:


Photogrammetric Calibration
===========================

.. currentmodule:: example.sofast.example_photogrammetric_calibration

.. automodule:: example.sofast.example_photogrammetric_calibration
:members:
:show-inheritance:


Single Facet Data Process
=========================

.. currentmodule:: example.sofast.example_single_facet_data_process

.. automodule:: example.sofast.example_single_facet_data_process
:members:
:show-inheritance:


Standard Mirror Plot Output
===========================

.. currentmodule:: example.sofast.example_standard_mirror_plot_output
.. currentmodule:: example.sofast_fringe.example_single_facet_data_process

.. automodule:: example.sofast.example_standard_mirror_plot_output
.. automodule:: example.sofast_fringe.example_single_facet_data_process
:members:
:show-inheritance:


Undefined Facet Data Process
============================

.. currentmodule:: example.sofast.example_undefined_facet_data_process
.. currentmodule:: example.sofast_fringe.example_undefined_facet_data_process

.. automodule:: example.sofast.example_undefined_facet_data_process
.. automodule:: example.sofast_fringe.example_undefined_facet_data_process
:members:
:show-inheritance:

View Camera Distortion
======================

.. currentmodule:: example.sofast.example_view_camera_distortion
.. currentmodule:: example.sofast_fringe.example_view_camera_distortion

.. automodule:: example.sofast.example_view_camera_distortion
.. automodule:: example.sofast_fringe.example_view_camera_distortion
:members:
:show-inheritance:
10 changes: 0 additions & 10 deletions doc/source/library_reference/app/sofast/calibration/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ opencsp.app.sofast.lib.save_DisplayShape_file
.. currentmodule:: opencsp.app.sofast.lib.save_DisplayShape_file

.. automodule:: opencsp.app.sofast.lib.save_DisplayShape_file
:members:
:undoc-members:
:show-inheritance:

opencsp.app.sofast.calibration.lib.screen_distortion_calculations
=====================================================================

.. currentmodule:: opencsp.app.sofast.calibration.lib.screen_distortion_calculations

.. automodule:: opencsp.app.sofast.calibration.lib.screen_distortion_calculations
:members:
:undoc-members:
:show-inheritance:
50 changes: 30 additions & 20 deletions doc/source/library_reference/app/sofast/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,52 +38,62 @@ opencsp.app.sofast.lib.ImageCalibrationScaling
:undoc-members:
:show-inheritance:

opencsp.app.sofast.lib.Measurement
==================================
opencsp.app.sofast.lib.MeasurementSofastFixed
=============================================

.. currentmodule:: opencsp.app.sofast.lib.Measurement
.. currentmodule:: opencsp.app.sofast.lib.MeasurementSofastFixed

.. automodule:: opencsp.app.sofast.lib.Measurement
.. automodule:: opencsp.app.sofast.lib.MeasurementSofastFixed
:members:
:undoc-members:
:show-inheritance:

opencsp.app.sofast.lib.Sofast
=============================
opencsp.app.sofast.lib.MeasurementSofastFringe
==============================================

.. currentmodule:: opencsp.app.sofast.lib.Sofast
.. currentmodule:: opencsp.app.sofast.lib.MeasurementSofastFringe

.. automodule:: opencsp.app.sofast.lib.Sofast
.. automodule:: opencsp.app.sofast.lib.MeasurementSofastFringe
:members:
:undoc-members:
:show-inheritance:

opencsp.app.sofast.lib.SofastParams
===================================
opencsp.app.sofast.lib.ParamsSofastFringe
=========================================

.. currentmodule:: opencsp.app.sofast.lib.SofastParams
.. currentmodule:: opencsp.app.sofast.lib.ParamsSofastFringe

.. automodule:: opencsp.app.sofast.lib.SofastParams
.. automodule:: opencsp.app.sofast.lib.ParamsSofastFringe
:members:
:undoc-members:
:show-inheritance:

opencsp.app.sofast.lib.System
=============================
opencsp.app.sofast.lib.ParamsSofastFixed
========================================

.. currentmodule:: opencsp.app.sofast.lib.System
.. currentmodule:: opencsp.app.sofast.lib.ParamsSofastFixed

.. automodule:: opencsp.app.sofast.lib.System
.. automodule:: opencsp.app.sofast.lib.ParamsSofastFixed
:members:
:undoc-members:
:show-inheritance:

opencsp.app.sofast.lib.load_saved_data
======================================
opencsp.app.sofast.lib.SystemSofastFringe
=========================================

.. currentmodule:: opencsp.app.sofast.lib.SystemSofastFringe

.. automodule:: opencsp.app.sofast.lib.SystemSofastFringe
:members:
:undoc-members:
:show-inheritance:

opencsp.app.sofast.lib.SystemSofastFixed
========================================

.. currentmodule:: opencsp.app.sofast.lib.load_saved_data
.. currentmodule:: opencsp.app.sofast.lib.SystemSofastFixed

.. automodule:: opencsp.app.sofast.lib.load_saved_data
.. automodule:: opencsp.app.sofast.lib.SystemSofastFixed
:members:
:undoc-members:
:show-inheritance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_project_fixed_pattern_target():
# Set pattern parameters
file_image_projection = os.path.join(
opencsp_code_dir(),
"test/data/measurements_sofast_fringe/general/Image_Projection_test.h5",
"test/data/measurements_sofast_fringe/general/image_projection_test.h5",
)

# Load ImageProjection
Expand Down
2 changes: 1 addition & 1 deletion opencsp/common/lib/render/test/test_VideoHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ def test_frames_to_video_exclusions(self):
def test_transform_powerpoint(self):
src_video_dir_name_ext = os.path.join(self.dir_in, "1s.mp4")
dst_dir = os.path.join(self.dir_out, "test_transform_powerpoint")
ft.create_directories_if_necessary(dst_dir)
dst_video_dir_name_ext = vh.VideoHandler.transform_powerpoint(
src_video_dir_name_ext, dst_dir, overwrite=True
)
ft.create_directories_if_necessary(dst_dir)

# verify the width and height
handler = vh.VideoHandler.VideoInspector(dst_video_dir_name_ext)
Expand Down

0 comments on commit 731a51c

Please sign in to comment.