Skip to content

Commit

Permalink
Feature/init taipy studio (#124)
Browse files Browse the repository at this point in the history
* init taipy-studio

* remove quickstart

* add github actions

* update github actions
  • Loading branch information
dinhlongviolin1 authored Jan 10, 2023
1 parent d19bb4e commit 6ad3462
Show file tree
Hide file tree
Showing 102 changed files with 2,477 additions and 16,672 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/prerelease-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Publish pre-release to marketplace

on:
workflow_dispatch:
inputs:
version:
description: "The package version to create (ex: 1.0.0)"
required: true

jobs:
verify-package-version:
timeout-minutes: 20
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Ensure package version is properly set
run: |
echo """
import json, sys
with open('package.json') as version_file:
version = json.load(version_file)['version']
if version != sys.argv[1]:
raise ValueError(f'Invalid version {version} / {sys.argv[1]}')
""" > /tmp/check1.py
python /tmp/check1.py "${{ github.event.inputs.version }}"
- name: Validate branch name
run: |
echo """
import json, sys, re
with open('package.json') as version_file:
version = json.load(version_file)['version']
x = re.search(r'(\d+)\.(\d+)\.(\d+)(?:\.([a-zA-Z0-9_]+))?', version)
if not x:
raise ValueError('Invalid version expression')
if f'release/{x[1]}.{x[2]}' != sys.argv[1]:
raise ValueError(
f'Branch name mismatch: release/{x[1]}.{x[2]} != {sys.argv[1]}'
)
""" > /tmp/check.py
python /tmp/check.py "${{ steps.extract_branch.outputs.branch }}"
publish:
needs: [verify-package-version]
timeout-minutes: 20
environment: publish
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: setup node version
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install node_modules
run: npm ci --include=dev

- name: Build the package
run: npm run package

- name: Publish
run: npm run prerelease-deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
73 changes: 73 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Publish to marketplace

on:
workflow_dispatch:
inputs:
version:
description: "The package version to create (ex: 1.0.0)"
required: true

jobs:
verify-package-version:
timeout-minutes: 20
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Ensure package version is properly set
run: |
echo """
import json, sys
with open('package.json') as version_file:
version = json.load(version_file)['version']
if version != sys.argv[1]:
raise ValueError(f'Invalid version {version} / {sys.argv[1]}')
""" > /tmp/check1.py
python /tmp/check1.py "${{ github.event.inputs.version }}"
- name: Validate branch name
run: |
echo """
import json, sys, re
with open('package.json') as version_file:
version = json.load(version_file)['version']
x = re.search(r'(\d+)\.(\d+)\.(\d+)(?:\.([a-zA-Z0-9_]+))?', version)
if not x:
raise ValueError('Invalid version expression')
if f'release/{x[1]}.{x[2]}' != sys.argv[1]:
raise ValueError(
f'Branch name mismatch: release/{x[1]}.{x[2]} != {sys.argv[1]}'
)
""" > /tmp/check.py
python /tmp/check.py "${{ steps.extract_branch.outputs.branch }}"
publish:
needs: [verify-package-version]
timeout-minutes: 20
environment: publish
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: setup node version
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install node_modules
run: npm ci --include=dev

- name: Build the package
run: npm run package

- name: Publish
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Create Github Release

on:
workflow_dispatch:
inputs:
version:
description: "The package version to create (ex: 1.0.0)"
required: true

jobs:
verify-package-version:
timeout-minutes: 20
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Ensure package version is properly set
run: |
echo """
import json, sys
with open('package.json') as version_file:
version = json.load(version_file)['version']
if version != sys.argv[1]:
raise ValueError(f'Invalid version {version} / {sys.argv[1]}')
""" > /tmp/check1.py
python /tmp/check1.py "${{ github.event.inputs.version }}"
- name: Validate branch name
run: |
echo """
import json, sys, re
with open('package.json') as version_file:
version = json.load(version_file)['version']
x = re.search(r'(\d+)\.(\d+)\.(\d+)(?:\.([a-zA-Z0-9_]+))?', version)
if not x:
raise ValueError('Invalid version expression')
if f'release/{x[1]}.{x[2]}' != sys.argv[1]:
raise ValueError(
f'Branch name mismatch: release/{x[1]}.{x[2]} != {sys.argv[1]}'
)
""" > /tmp/check.py
python /tmp/check.py "${{ steps.extract_branch.outputs.branch }}"
release:
needs: [verify-package-version]
timeout-minutes: 20
name: Release package
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Extract commit hash
shell: bash
run: echo "##[set-output name=hash;]$(echo $(git rev-parse HEAD))"
id: extract_hash

- name: Create/update release and tag
run: |
gh release create ${{ github.event.inputs.version }} --target ${{ steps.extract_hash.outputs.hash }} --notes "Release created using Github Workflows"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion core/.gitignore → .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ dist
# Node.JS
node_modules/

.DS_Store

# Python
__pycache__/
*.pyc
package-lock.json
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
4 changes: 4 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to the "taipy-studio" extension pack will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

- Initial release
File renamed without changes.
Binary file added assets/taipy-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 0 additions & 23 deletions core/.eslintrc.json

This file was deleted.

15 changes: 0 additions & 15 deletions core/.vscode/launch.json

This file was deleted.

13 changes: 0 additions & 13 deletions core/.vscodeignore

This file was deleted.

Loading

0 comments on commit 6ad3462

Please sign in to comment.