Skip to content

Commit

Permalink
Release 16.3.0 (#828)
Browse files Browse the repository at this point in the history
Co-authored-by: Moritz Heckmann <[email protected]>
Co-authored-by: dvmoritzschoefl <[email protected]>
Co-authored-by: Michael Puehringer <[email protected]>
Co-authored-by: dvtschachinger <[email protected]>
Co-authored-by: Holger Stitz <[email protected]>
Co-authored-by: Michael Pühringer <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dvzacharycutler <[email protected]>
Co-authored-by: oltionchampari <[email protected]>
Co-authored-by: Christian Bors <[email protected]>
Co-authored-by: dvflorianengertsberger <[email protected]>
Co-authored-by: Zach Cutler <[email protected]>
Co-authored-by: anita-steiner <>
Co-authored-by: Anita Steiner <[email protected]>
Co-authored-by: dvdanielamoitzi <[email protected]>
Co-authored-by: Christian Bors <[email protected]>
Co-authored-by: Markus Vogl <[email protected]>
Co-authored-by: Champari Oltion <[email protected]>
  • Loading branch information
18 people authored Feb 7, 2023
1 parent e0ede21 commit 20de9d1
Show file tree
Hide file tree
Showing 415 changed files with 4,749 additions and 4,212 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
name: build

on: [push, workflow_dispatch]
on:
workflow_dispatch:
inputs:
cypress:
description: 'Run cypress'
required: false
type: boolean
default: false
push:

jobs:
build:
uses: datavisyn/github-workflows/.github/workflows/build-node-python.yml@main
secrets: inherit
uses: datavisyn/github-workflows/.github/workflows/build-node-python.yml@new_deployment
secrets: inherit
with:
cypress_enable: true
cypress_run_because_flag: ${{ inputs.cypress == true }}
28 changes: 13 additions & 15 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
const path = require('path');

module.exports = {
stories: [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/preset-scss"
],
framework: "@storybook/react",
core: {
builder: 'webpack5',
},
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/preset-scss', 'storybook-addon-swc'],
framework: '@storybook/react',
webpackFinal: async (config) => {
// Add tdp_core/dist as alias, as we have scss/code imports like tdp_core/dist/assets/...
// These can only be resolved in a workspace currently, and not in the standalone repo.
config.resolve.alias = {
...(config.resolve.alias || {}),
'tdp_core/dist': path.resolve(__dirname, '../', 'dist')
// I have no clue why this is required, but if this is missing we get a "Can't resolve '../../assets/icons/datavisyn_logo.svg' in '.../src/scss'""
'../../assets': path.resolve(__dirname, '../src/assets'),
// Add tdp_core/dist as alias, as we have scss/code imports like tdp_core/dist/assets/...
'tdp_core/dist': path.resolve(__dirname, '../src'),
'tdp_core/src': path.resolve(__dirname, '../src'),
'tdp_core': path.resolve(__dirname, '../src'),
};
return config;
},
}
};
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// 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": "Python: Module",
"type": "python",
"request": "launch",
"module": "tdp_core",
"justMyCode": false
}
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"tdp_core"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
34 changes: 26 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
.DEFAULT_GOAL := help
pkg_src = tdp_core

flake8 = flake8 $(pkg_src) setup.py
isort = isort $(pkg_src) setup.py
black = black --line-length 140 $(pkg_src) setup.py
pyright = pyright $(pkg_src) setup.py
ruff = ruff $(pkg_src) setup.py --line-length 140 --select E,W,F,N,I,C,B,UP,PT,SIM,RUF --ignore E501,C901,B008

.PHONY: start ## Start the development server
start:
python $(pkg_src)

.PHONY: all ## Perform the most common development-time rules
all: format lint test
Expand All @@ -13,25 +17,25 @@ ci: check-format lint test

.PHONY: format ## Auto-format the source code
format:
$(isort)
$(ruff) --fix
$(black)

.PHONY: check-format ## Check the source code format without changes
check-format:
$(isort) --check-only
$(black) --check

.PHONY: lint ## Run flake8
.PHONY: lint ## Run flake8 and pyright
lint:
$(flake8)
$(ruff) --format=github
$(pyright)

.PHONY: test ## Run tests
test:
pytest $(pkg_src)

.PHONEY: documentation ## Generate docs
documentation:
mkdocs build
documentation:
echo "TODO"

.PHONY: install ## Install the requirements
install:
Expand All @@ -41,6 +45,20 @@ install:
develop:
pip install -e .[develop]

.PHONY: env_encrypt ## Encrypts the current ./<app>/.env
env_encrypt:
openssl aes-256-cbc -pbkdf2 -in ./$(pkg_src)/.env -out ./$(pkg_src)/.env.enc

.PHONY: env_decrypt ## Decrypts the ./<app>/.env.enc
env_decrypt:
@if [ -z "${ENV_PASSWORD}" ]; then \
echo "No ENV_PASSWORD set, prompting for password..."; \
openssl aes-256-cbc -pbkdf2 -d -in ./$(pkg_src)/.env.enc -out ./$(pkg_src)/.env; \
else \
echo "ENV_PASSWORD set, using it..."; \
openssl aes-256-cbc -pbkdf2 -d -in ./$(pkg_src)/.env.enc -out ./$(pkg_src)/.env -pass env:ENV_PASSWORD; \
fi

.PHONY: build ## Build a wheel
build:
python setup.py sdist bdist_wheel --dist-dir dist_python
Expand Down
20 changes: 20 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from 'cypress';
import * as webpackConfig from 'visyn_scripts/config/webpack.config';

export default defineConfig({
viewportHeight: 1080,
viewportWidth: 1920,
defaultCommandTimeout: 10000,
e2e: {
baseUrl: 'http://localhost:8080',
// eslint-disable-next-line @typescript-eslint/no-unused-vars
setupNodeEvents(on, config) {},
},
component: {
devServer: {
framework: 'react',
bundler: 'webpack',
webpackConfig: webpackConfig({ workspace_mode: 'single' }, { mode: 'production' }),
},
},
});
2 changes: 2 additions & 0 deletions cypress/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/videos
/screenshots
10 changes: 10 additions & 0 deletions cypress/component/component-health-check.cy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as React from 'react';
import { mount } from 'cypress/react';
import { MainApp } from '../../src/demo/MainApp';

describe('Health check for Cypress component test', () => {
it('should mount MainApp', () => {
mount(<MainApp />);
cy.get('body').should('include.text', 'Visualization type');
});
});
6 changes: 6 additions & 0 deletions cypress/e2e/health-check.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
describe('Health check for Cypress e2e test', () => {
it('should visit the home page', () => {
cy.visit('/');
cy.get('body').should('include.text', 'Visualization type');
});
});
22 changes: 0 additions & 22 deletions cypress/plugins/index.js

This file was deleted.

Loading

0 comments on commit 20de9d1

Please sign in to comment.