Skip to content

Commit

Permalink
production action
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfiex committed Nov 10, 2024
1 parent dabd704 commit 7f9dacf
Show file tree
Hide file tree
Showing 136 changed files with 530 additions and 108 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
Binary file added .github/.wiki/CMIP6plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions .github/.wiki/CMIP6plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/.wiki/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A store of materials needed for the wiki
Binary file added .github/.wiki/cmip6plus600.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/.wiki/model_components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/.wiki/source_id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Other
about: Creating a general issue
title: 'Add a descriptive summary here.'
labels: ''
assignees: ''

---

# General Issue

Please provided a detailed outline of the problem, discussion or suggestion.

Make sure to provide the following where it might apply.

- [ ] Any relevant files or code snippets
- [ ] Where this occurs
Binary file added .github/ISSUE_TEMPLATE/legacy.zip
Binary file not shown.
Binary file added .github/workflows/legacy.zip
Binary file not shown.
56 changes: 56 additions & 0 deletions .github/workflows/new_issue_submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Process a new issue

on:
issues:
types: [edited, labeled]
# opened

jobs:

process_template:
runs-on: ubuntu-latest
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: write
issues: write
# discussions: write
packages: write
pages: write
pull-requests: write
repository-projects: write
# security-events: write
statuses: write




steps:

- name: Get a list of directories with updated files
id: install-cmipld
uses: WCRP-CMIP/CMIP-LD/actions/cmipld@main


- name: Checkout repository
uses: actions/checkout@v4


- name: Run Python script
id: run_python
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: |
${{ github.event.issue.body }}
# pipe should preseve newline properties for multilines
ISSUE_SUBMITTER: ${{ github.event.issue.user.login }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

run: |
new_element
66 changes: 66 additions & 0 deletions .github/workflows/publish2pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: publish_to_pages
on:
push:
branches:
- "main"
- "jsonld_IV"

jobs:
push2production:
runs-on: ubuntu-latest
env:
API_KEY: ${{ secrets.API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: ${{ github.ref_name }}
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: write
packages: write
pages: write
pull-requests: write
repository-projects: write
statuses: write
steps:


- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the complete commit history

- name: Set up Git
run: |
git config user.email "[email protected]"
git config user.name "Daniel Ellis"
git config credential.helper store
git config --global user.email "[email protected]"
git config --global user.name "Daniel Ellis"
git config --global push.default current
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
shell: bash

- name: create symbolic link without extension
id: push_to_production
run: |
# Check if production branch exists; if not, create it
if ! git show-ref --verify --quiet refs/heads/production; then
git checkout -b production
else
git checkout production
fi
# Checkout the specified branch's data_descriptors directory
git checkout "${BRANCH}" -- data_descriptors
# Find all .json files and create symbolic links without the .json extension
find . -type f -name "*.json" -exec sh -c 'ln -s "$0" "${0%.json}"' {} \;
# Stage all changes, commit, and push to production branch
git add -A
git commit -m "production push"
git push --force origin production
61 changes: 61 additions & 0 deletions .github/workflows/update-jsonld.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Update JSONLD
on:
push:
branches:
- '*'
# - main # Adjust this to your branch name if different
jobs:
update-jsonld:
runs-on: ubuntu-latest # Specify the machine type

steps:

- name: Get a list of directories with updated files
id: install-cmipld
uses: WCRP-CMIP/CMIP-LD/actions/cmipld@main

- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Get a list of directories with updated files
id: updated-dirs
uses: WCRP-CMIP/CMIP-LD/actions/updated-dirs@main
with:
filter_dir: "JSONLD"

- name: Compile JSONLD files, generate an RDF network and update frames
id: jsonld
uses: WCRP-CMIP/CMIP-LD/actions/jsonld@main
with:
dirs: ${{ env.updated_dirs }}
frames: "$PWD/compiled/graph_data.json"


- name: Run Update Scripts
if: ${{ env.updated_dirs }}
id: run-all-files
uses: WCRP-CMIP/CMIP-LD/actions/run-all-files@main
with:
directory: "$PWD/JSONLD/scripts"
script: python
script_ext: .py


- name: generate CV
if: ${{ env.updated_dirs }}
id: generate_cv
run: |
if [[ "${{env.updated_dirs}}" == *"JSONLD"* ]]; then
gencv && git push origin HEAD
fi
- name: Commit All
uses: WCRP-CMIP/CMIP-LD/actions/commit-all@main
with:
message: "Automated Content Update"

- name: Push Changes
run: |
git push
Binary file modified data_descriptors/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion data_descriptors/frequency/1hr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "sampled hourly",
"id": "1hr.json",
"id": "1hr",
"long_name": "1 Hourly Frequency",
"name": "1hr",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/1hrcm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "monthly-mean diurnal cycle resolving each day into 1-hour means",
"id": "1hrcm.json",
"id": "1hrcm",
"long_name": "1 Hour Climatology Monthly",
"name": "1hrCM",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/1hrpt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "sampled hourly, at specified time point within an hour",
"id": "1hrpt.json",
"id": "1hrpt",
"long_name": "1 Hour Point",
"name": "1hrPt",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/3hr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "3 hourly mean samples",
"id": "3hr.json",
"id": "3hr",
"long_name": "3 Hourly Frequency",
"name": "3hr",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/3hrpt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "sampled 3 hourly, at specified time point within the time period",
"id": "3hrpt.json",
"id": "3hrpt",
"long_name": "3 Hour Point",
"name": "3hrPt",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/6hr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "6 hourly mean samples",
"id": "6hr.json",
"id": "6hr",
"long_name": "6 Hourly Frequency",
"name": "6hr",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/6hrpt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "sampled 6 hourly, at specified time point within the time period",
"id": "6hrpt.json",
"id": "6hrpt",
"long_name": "6 Hour Point",
"name": "6hrPt",
"type": "frequency",
Expand Down
9 changes: 9 additions & 0 deletions data_descriptors/frequency/_context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@context": {
"@base": "https://WCRP-CMIP.github.io/WCRP-UNIVERSE/data_descriptors/frequency/",
"@vocab": "https://WCRP-CMIP.github.io/WCRP-UNIVERSE/data_descriptors/frequency/",
"id": "_context",
"type": "@type"
},
"@embed": "@always"
}
2 changes: 1 addition & 1 deletion data_descriptors/frequency/day.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "daily mean samples",
"id": "day.json",
"id": "day",
"long_name": "Daily Frequency",
"name": "day",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/dec.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "decadal mean samples",
"id": "dec.json",
"id": "dec",
"long_name": "Decadal Frequency",
"name": "dec",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/fx.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "fixed (time invariant) field",
"id": "fx.json",
"id": "fx",
"long_name": "Fixed Frequency",
"name": "fx",
"type": "frequency",
Expand Down
2 changes: 1 addition & 1 deletion data_descriptors/frequency/mon.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/data_descriptors/frequency/_context",
"description": "monthly mean samples",
"id": "mon.json",
"id": "mon",
"long_name": "Monthly Frequency",
"name": "mon",
"type": "frequency",
Expand Down
Loading

0 comments on commit 7f9dacf

Please sign in to comment.