Skip to content

Commit

Permalink
Initialize test_0318
Browse files Browse the repository at this point in the history
  • Loading branch information
c-suh authored Nov 25, 2024
0 parents commit fba921d
Show file tree
Hide file tree
Showing 42 changed files with 2,082 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.

# ***************************************************************
#
# Go to https://github.com/orgs/pds-data-dictionaries/teams to
# find out more information about your applicable team

* @pds-data-dictionaries/dldd-data-modeling-team

# **************************************************************

# For more information on populating this file, go to
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
Title ^^^^ above ^^^^ should follow good commit message best practices wherever possible.
A properly formed git commit subject line should always be able to complete the following sentence:
If applied, this commit will <your subject line here>
-->

## Summary
<!-- Brief summary of changes if not sufficiently described by commit messages. -->
Enter summary here

## Test Data and/or Report
<!--
One of the following should be included here:
* Reference to regression test included in code (preferred wherever reasonable)
* Attach test data here + outputs of tests
-->
Enter info here

## Related Issues
<!--
Reference related issues here and use `Fixes` or `Resolves` for closing issues, for example:
* Refs pds-data-dictionaries/PDS4-LDD-Issue-Repo#13 will include a link between this PR and that issue
* Resolves pds-data-dictionaries/PDS4-LDD-Issue-Repo#13 will actually close the ticket once this PR is merged
-->
Enter related issues here
102 changes: 102 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Build and Deploy Docs

on:
push:
branches:
- 'main'
paths:
- 'docs/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
name: 'Build and Deploy Sphinx Docs'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: github.actor != 'pdsen-ci'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}

- name: Install dependencies
run: |
# Install Sphinx
pip install -r docs/requirements.txt
- name: Make Sphinx
id: make
run: |
cd docs
# Make the HTML docs and copy to main
make github
cd ..
- name: Setup Pages
uses: actions/configure-pages@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '.'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

pdfgen: # job 1
name: 'Build PDF'
runs-on: ubuntu-latest
if: github.actor != 'pdsen-ci'

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}

- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: '3.7'

- name: Install dependencies
run: |
# Install Sphinx
pip install -r docs/requirements.txt
# Install dependencies for PDF generation
sudo apt install texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk
- name: Generate PDF
id: make
run: |
cd docs
make latexpdf
cp build/latex/*.pdf .
- name: Push PDF to Github
run: |
git config --local user.email "[email protected]"
git config --local user.name "PDSEN CI Bot"
git add -A ./*.pdf
git commit --allow-empty -m "Auto-gen PDF by PDSEN CI Bot"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: true
76 changes: 76 additions & 0 deletions .github/workflows/release-ldd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
---

name: Release and Tag LDD Release

on:
push:
branches:
- 'main'
paths:
- 'build/release/**'

env:
DEPLOY_PATH: ${{ format('{0}/{1}', github.workspace, 'build/release') }}
# TODO - Have to hard-code this for now since Actions don't yet allow the use of env here.
LOGS_PATH: ${{ format('{0}/{1}', github.workspace, 'logs') }}

jobs:
get_versions:
name: Get Applicable PDS4 Versions
runs-on: ubuntu-latest
if: github.actor != 'pdsen-ci'
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
ssh-key: ${{ secrets.SSH_KEY }}

- id: set-matrix
run: |
while read -r line; do
if [[ ! -z "$line" ]]; then
versions=$versions'"'$line'"',
fi
done < $GITHUB_WORKSPACE/pds4_versions.txt
versions="[${versions::-1}]"
echo "{\"pds4_version\":${versions}}"
echo "matrix={\"pds4_version\": $versions}" >> $GITHUB_OUTPUT
build: # job 1
name: 'Tag and Release LDD'
needs: get_versions
runs-on: ubuntu-latest
if: github.actor != 'pdsen-ci'

strategy:
matrix: ${{fromJson(needs.get_versions.outputs.matrix)}}

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
ssh-key: ${{ secrets.SSH_KEY }}

- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: '3.7'

- name: Adding dependencies
run: |
sudo apt-get update && sudo apt-get install -y libxml2-dev libxslt1-dev python3-libxml2
- name: Clean previous dev/snapshot tags
run: |
git fetch --prune --unshallow --tags
git tag -l | grep 'dev' | xargs -t -I arg sh -c 'git tag -d arg;git push --delete origin arg;'
- name: Publish new release
run: |
pip install pds-github-util
ldd-release --ingest_ldd_src_dir ${{github.workspace}}/src --ldd_output_path ${{ env.DEPLOY_PATH }} --token ${{ secrets.GITHUB_TOKEN }} --pds4_version ${{matrix.pds4_version}}
Loading

0 comments on commit fba921d

Please sign in to comment.