Skip to content

Commit

Permalink
Merge pull request #10 from odtp-org/v0.5.0
Browse files Browse the repository at this point in the history
V0.5.0
  • Loading branch information
caviri authored Nov 13, 2024
2 parents d03761c + 6be9f2c commit 4664c66
Show file tree
Hide file tree
Showing 17 changed files with 743 additions and 190 deletions.
17 changes: 14 additions & 3 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
#ODTP COMPONENT VARIABLES
VARIABLES=
# ODTP ENV VARIABLES TO CONNECT


## ODTP COMPONENT CLIENT VARIABLES
### ODTP ENV VARIABLES TO CONNECT
ODTP_MONGO_SERVER=
ODTP_S3_SERVER=
ODTP_BUCKET_NAME=
ODTP_ACCESS_KEY=
ODTP_SECRET_KEY=
# ODTP ENV VARIABLES DB REFERENCES

### ODTP ENV VARIABLES DB REFERENCES
ODTP_USER_ID=
ODTP_DIGITAL_TWIN=
ODTP_EXCUTION=
ODTP_STEP=
ODTP_COMPONENT=
ODTP_COMPONENT_VERSION=
ODTP_COMPONENT_VERSION=
ODTP_RESULT=

### OTHER ENV VARIABLES (FALSE/TRUE)
TRANSFER_INPUT_TO_OUTPUT=FALSE
ODTP_SAVE_SNAPSHOT=FALSE
ODTP_SAVE_IN_RESULT=TRUE
ODTP_LOGS_IN_DB=FALSE
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-reporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug reporting
about: Describe any bug you may find.
title: "[BUG]"
labels: bug
assignees: ''

---

## Environment

- **ODTP/ODTP Component version:** Which version are you using?
- **Operating System:** Include operating system where you are running the tool.
- **Browser:** (if applicable)

## Bug description

### Summary:
A concise summary of the bug.

### Steps to reproduce the bug:
1.
2.

### Expected behavior

What you expect to happen

### Actual behavior
What actually happened

### Severity and impact
- Severity: (Critical, Major, Minor, or Trivial)
- Impact: Description of the impact on users and processes.

### Supporting information
- Screenshots/Video: Attach any relevant visuals
- Logs: Include any relevant logs or error messages
- Additional Context: Any other information that might be relevant
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Feature request
about: Request a new feature
title: "[FEATURE]"
labels: enhancement
assignees: ''

---

- **Feature name:** A concise, descriptive title for the feature.

## Description:

A detailed explanation of the feature. This should include what the feature is, why it is needed, and how it is expected to improve the product or process.

## Importance Level
(Low, Medium, or High)

An indication of the feature's importance from the strategic point of view. Please, do not take it as a priority level which will be determined as relative to the other features.

## Origin
An explanation of how the feature aligns with projects goals, objectives, or steps of one user journey (and related user persona). This part will contain references to the preliminary assessment of feedback and should be framed in one of the user journeys defined.

## User Impact
An assessment of how the feature will affect the end user, including any potential benefits or drawbacks.

## Mockups or Diagrams
Visual representations (if applicable) to help clarify the feature or feedback. This could include UI mockups, flowcharts, or architectural diagrams.

## Affected Components (examples: components, modules, … )
Identification of specific parts of the project that the feature or feedback pertains to. This could be ODTP modules or ODTP components.

## Technical Requirements (if possible, otherwise completed by SDSC)
Detailed technical specifications or requirements needed to implement the feature. This could include algorithms, data structures, APIs, or third-party services.

## Related Documents/Links:
References to any related documentation, user stories, tickets, or external resources that provide additional context.

## Dependencies (if possible, otherwise completed by SDSC):
Identification of any other features, systems, or processes that the proposed feature depends on or interacts with. This can be considered a “ready if” field and it will define what’s needed to have in order to start the development.

## Acceptance criteria:
Specific criteria or metrics for evaluating the success or effectiveness of the feature once implemented.
57 changes: 57 additions & 0 deletions .github/workflows/multiplatform_docker_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Multi-Platform Docker Build

on:
workflow_dispatch:

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
# Step 1: Check out the repository and submodules
- name: Check out code
uses: actions/checkout@v3
with:
submodules: true # Fetch submodules
fetch-depth: 0 # Ensure the full history is fetched

# Step 2: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Step 3: Install yq
- name: Install yq
run: |
sudo apt-get update && sudo apt-get install -y wget
sudo wget https://github.com/mikefarah/yq/releases/download/v4.35.1/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
# Step 4: Extract component-version and component-name from odtp.yml
- name: Extract component-version and component-name
id: extract_info
run: |
VERSION=$(yq e '.component-version' odtp.yml)
NAME=$(yq e '.component-name' odtp.yml)
echo "VERSION=${VERSION}"
echo "NAME=${NAME}"
echo "COMPONENT_VERSION=${VERSION}" >> $GITHUB_ENV
echo "COMPONENT_NAME=${NAME}" >> $GITHUB_ENV
# Step 5: Log in to GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Step 6: Build and push Docker image for multiple platforms
- name: Build and push Docker image
run: |
IMAGE_NAME=ghcr.io/${{ github.repository }}/${{ env.COMPONENT_NAME }}
docker buildx build \
--platform linux/amd64,linux/arm64 \
--build-arg COMPONENT_VERSION=${{ env.COMPONENT_VERSION }} \
-t $IMAGE_NAME:${{ env.COMPONENT_VERSION }} \
-t $IMAGE_NAME:latest \
--push .
56 changes: 56 additions & 0 deletions .github/workflows/multiplatform_docker_build_dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Multi-Platform Docker Build for Dockerhub

on:
workflow_dispatch:

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
# Step 1: Check out the repository and submodules
- name: Check out code
uses: actions/checkout@v3
with:
submodules: true # Fetch submodules
fetch-depth: 0 # Ensure the full history is fetched

# Step 2: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Step 3: Install yq
- name: Install yq
run: |
sudo apt-get update && sudo apt-get install -y wget
sudo wget https://github.com/mikefarah/yq/releases/download/v4.35.1/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
# Step 4: Extract component-version and component-name from odtp.yml
- name: Extract component-version and component-name
id: extract_info
run: |
VERSION=$(yq e '.component-version' odtp.yml)
NAME=$(yq e '.component-name' odtp.yml)
echo "VERSION=${VERSION}"
echo "NAME=${NAME}"
echo "COMPONENT_VERSION=${VERSION}" >> $GITHUB_ENV
echo "COMPONENT_NAME=${NAME}" >> $GITHUB_ENV
# Step 5: Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Step 6: Build and push Docker image for multiple platforms
- name: Build and push Docker image
run: |
IMAGE_NAME=${{ secrets.DOCKER_USERNAME }}/${{ env.COMPONENT_NAME }}
docker buildx build \
--platform linux/amd64,linux/arm64 \
--build-arg COMPONENT_VERSION=${{ env.COMPONENT_VERSION }} \
-t $IMAGE_NAME:${{ env.COMPONENT_VERSION }} \
-t $IMAGE_NAME:latest \
--push .
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# ODTP Testing
odtp-input/
odtp-output/
odtp-logs/

# Mac crap
.DS_Store

Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.0.1] - XXXX-XX-XX

Fixes mismatch between PyPI release version and GitHub release version.

### Changed

-
-
-

## Fixes

-
-
-
19 changes: 19 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# YAML 1.2
---
cff-version: "1.0.4"
message: "If you use this software, please cite it as below."
authors:
- family-names: xxxx
given-names: xxxx
orcid: https://orcid.org/xxxx-xxxx-xxxx-xxxx
title: "My Research Software"
version: x.x.x
identifiers:
- type: doi
value: xxxx/xxxx.1234
date-released: xxxx-xx-xx
repository-code: "https://github.com/XXXXX/XXXX"
keywords:
- xxxx
- xxxx
license: xxxx
29 changes: 18 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
FROM ubuntu:22.04

RUN apt update
RUN apt install python3.10 python3-pip -y
LABEL maintainer="Your Name <your.email@example.com>"
LABEL version="v0.0.1"
LABEL description="ODTP component based on Ubuntu 22.04"
LABEL org.opencontainers.image.title="ODTP Component"
LABEL org.opencontainers.image.vendor="Your Organization"
LABEL org.opencontainers.image.source="https://github.com/your-org/your-repo"
LABEL org.opencontainers.image.licenses="XXX"

##################################################
# Ubuntu setup
##################################################

RUN apt-get update \
&& apt-get install -y wget \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get -y upgrade \
&& apt-get install -y --no-install-recommends \
# Ubuntu setup
RUN apt update && apt install -y \
python3.10 \
python3-pip \
wget \
unzip \
nano \
git \
git \
g++ \
gcc \
htop \
zip \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ca-certificates && \
rm -rf /var/lib/apt/lists/*

##################################################
# ODTP setup
Expand Down Expand Up @@ -70,4 +74,7 @@ COPY ./odtp-component-client /odtp/odtp-component-client
COPY ./app /odtp/odtp-app
WORKDIR /odtp

# Fix for end of the line issue on Windows. Avoid error when building on windows
RUN find /odtp -type f -iname "*.sh" -exec sed -i 's/\r$//' {} \;

ENTRYPOINT ["bash", "/odtp/odtp-component-client/startup.sh"]
Loading

0 comments on commit 4664c66

Please sign in to comment.