Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ Add validator #108

Merged
merged 6 commits into from
Nov 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: ♻️ transfer validation api to codefair repo (#106)
slugb0t authored Nov 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 0767e2c82b1fbcc05f53ee79b0fabc847758d8f9
23 changes: 23 additions & 0 deletions validator-api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.DS_Store
dist
dist-ssr
coverage
*.local


# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# API Platform specific files
*.pyc
/config.ps1

# Environment variables
.env
3 changes: 3 additions & 0 deletions validator-api/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 120
ignore= W293,W503
2 changes: 2 additions & 0 deletions validator-api/.flaskenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FLASK_APP=app
FLASK_RUN_PORT=5000
44 changes: 44 additions & 0 deletions validator-api/.github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and push validator api image to Azure Container Registry

on:
push:
branches:
- main
pull_request:
types: [closed]
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build and push Docker image
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
runs-on: ubuntu-latest
env:
AZURE_REGISTRY_LOGIN_SERVER: ${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }}
AZURE_REGISTRY_USERNAME: ${{ secrets.AZURE_REGISTRY_USERNAME }}
AZURE_REGISTRY_PASSWORD: ${{ secrets.AZURE_REGISTRY_PASSWORD }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.AZURE_REGISTRY_USERNAME }}
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.AZURE_REGISTRY_LOGIN_SERVER }}/cwl-validator-api:latest
44 changes: 44 additions & 0 deletions validator-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# API Platform specific files
*.pyc
/config.ps1

# Environment variables
.env
.venv

# Virutal Environments
.venv

# Database
postgres-data/*
redis-data/*
storage/*
10 changes: 10 additions & 0 deletions validator-api/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": true,
"MD013": false,
"MD024": {
"siblings_only": true
},
"MD033": false,
"MD036": false,
"MD046": false
}
14 changes: 14 additions & 0 deletions validator-api/.pydocstyle.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[pydocstyle]

# D211: No blank lines allowed before class docstring
add_select = D211

# D100: Missing docstring in public module
# D101: Missing docstring in public class
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# D104: Missing docstring in public package
# D105: Missing docstring in magic method
# D107: Missing docstring in __init__
# D202: No blank lines allowed after function docstring
add_ignore = D100,D101,D102,D103,D104,D105,D107,D202
Loading