Skip to content

Commit

Permalink
Merge pull request #10 from odtp-org/v0.1.6
Browse files Browse the repository at this point in the history
v0.1.6
  • Loading branch information
caviri authored Nov 13, 2024
2 parents 2d277e2 + 738b104 commit 3c700d2
Show file tree
Hide file tree
Showing 8 changed files with 218 additions and 15 deletions.
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 .
23 changes: 11 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
FROM ubuntu:22.04

RUN apt update
RUN apt install python3.10 python3-pip -y

##################################################
# 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 @@ -66,4 +62,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"]
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is a dashboard to visualize output from matsim.
```odtp new component
odtp new odtp-component-entry \
--name odtp-travel-data-dashboard \
--component-version 0.1.1 \
--component-version 0.1.6 \
--repository https://github.com/odtp-org/odtp-travel-data-dashboard
```

Expand Down Expand Up @@ -46,6 +46,15 @@ docker run -it --rm -p 8502:8501 odtp-travel-data-dashboard

## Changelog

- v0.1.6
- Not github credential required as the github tool repo is now public
- Github actions
- Refined Dockerfile

- v0.1.5

- v0.1.4

- v0.1.3
- Add parameters: DATA_INPUT_OPTION and DATA_INPUT_PATH

Expand Down
2 changes: 1 addition & 1 deletion app/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Actions
# A1 - Clone github
git clone https://$GITHUB_USERNAME:$GITHUB_TOKEN@github.com/zuocsfm/OD_data_dashboard.git /odtp/odtp-workdir/OD_data_dashboard
git clone https://github.com/zuocsfm/OD_data_dashboard.git /odtp/odtp-workdir/OD_data_dashboard
cd /odtp/odtp-workdir/OD_data_dashboard
git checkout 86bf7bdc631961ac05c976fc280e78d93d666d02

Expand Down
2 changes: 1 addition & 1 deletion odtp.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file should contain basic component information for your component.
component-name: odtp-travel-data-dashboard
component-author: Carlos Vivar Rios
component-version: 0.1.0
component-version: 0.1.6
component-repository: https://github.com/odtp-org/odtp-travel-data-dashboard
component-license: AGPL-3.0
component-type: ephemeral
Expand Down

0 comments on commit 3c700d2

Please sign in to comment.