Prepare for v0.10.0 Release!

This commit is contained in:
thatdonfc 2021-03-06 08:05:15 -08:00
parent 4203434e46
commit b7b2234156
No known key found for this signature in database
GPG Key ID: 805A5EDAE682FD3A
25 changed files with 177 additions and 263 deletions

View File

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8, 3.9]
python: [3.7, 3.8, 3.9]
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
@ -27,7 +27,7 @@ jobs:
run: |
python -m pip install --user -U pip wheel setuptools
python setup.py bdist_wheel
- name: Intsall LedFx
- name: Install LedFx
run: |
pip install --pre --find-links=dist .
@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, 12]
node-version: [10, 12, 14]
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2

View File

@ -3,8 +3,12 @@ name: CI Linting
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
pull_request: ~
env:
CACHE_VERSION: 1

View File

@ -3,11 +3,13 @@ name: CodeQL Analysis
on:
push:
branches:
- master
- dev
paths-ignore:
- '.*/**'
pull_request:
branches:
- master
- dev
paths-ignore:
- '.*/**'
@ -17,7 +19,7 @@ on:
env:
CACHE_VERSION: 1
DEFAULT_PYTHON: 3.9
DEFAULT_PYTHON: 3.8
jobs:
analyze-python:

View File

@ -1,28 +0,0 @@
name: Node CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install yarn
run: npm install -g yarn
- name: yarn install and build
run: |
cd frontend
yarn
yarn build
env:
CI: true

View File

@ -19,5 +19,5 @@ jobs:
SENTRY_ORG: ledfx-org
SENTRY_PROJECT: ledfx-betas
with:
environment: developement
environment: development
finalize: false

9
.gitignore vendored
View File

@ -7,7 +7,6 @@
*.orig
*.log
*.pot
__pycache__/*
.cache/*
.*.swp
*/.ipynb_checkpoints/*
@ -66,3 +65,11 @@ formatting_test.bat
.devcontainer/ledfx-config.yml
.vscode/launch.json
win.spec
frontend/*.eslintcache
*.eslintcache
#Pycache from numba
ledfx/effects/__pycache__/*
ledfx/__pycache__/*
__pycache__/*

View File

@ -2,8 +2,8 @@
Changelog
=========
Version 1.0.0
=============
Version 0.10.0
==============
What's new?
-----------

View File

@ -58,7 +58,7 @@ The below image describes a basic setup - LedFx running on PC, communicating wit
- For most, this is the difficult step. Don't worry! There's guides here and online, and plenty of people able to help on WLED and LedFx Discord.
- Follow the WLED guide to connect the LED strip and ESP together: https://github.com/Aircoookie/WLED/wiki.
- Flash WLED to the ESP device: https://github.com/Aircoookie/WLED/wiki/Install-WLED-binary
- Ensure all WLED devices are powered on, and connected to your Wi-Fi 2.4Ghz.
- Ensure all WLED devices are powered on, and connected to your Wi-Fi.
- Test you can access the WLED web interface from your PC. If so, then you're good to go!
#. **Install LedFx.**

View File

@ -1,155 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC1090
if [ -t 0 ] ; then
screen_size=$(stty size)
else
screen_size="24 80"
fi
# Set rows variable to contain first number
printf -v rows '%d' "${screen_size%% *}"
# Set columns variable to contain second number
printf -v columns '%d' "${screen_size##* }"
# Divide by two so the dialogs take up half of the screen, which looks nice.
r=$(( rows / 2 ))
c=$(( columns / 2 ))
# Unless the screen is tiny
r=$(( r < 20 ? 20 : r ))
c=$(( c < 70 ? 70 : c ))
# Pretty logo so we can verify it's us.
curl -sSL https://install.ledfx.app/ledfxrainbow.out | cat
# Could probably do something more productive here to display the logo, but oh well.
sleep 3
install-ledfx () {
echo "Ensuring build environment setup correctly"
sudo apt-get update
sudo apt-get install -y gcc \
git \
libatlas3-base \
libavformat58 \
portaudio19-dev \
pulseaudio \
python3-pip \
avahi-daemon
python3 -m pip install --upgrade pip wheel setuptools
curruser=$USER
IP=$(/sbin/ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p')
echo "Downloading and installing latest version of LedFx from github"
python3 -m pip install --no-cache-dir git+https://github.com/LedFx/LedFx@dev
echo "Adding" $curruser "to Audio Group"
sudo usermod -a -G audio $curruser
whiptail --yesno "Install LedFx as a service so it launches automatically on boot?" --yes-button "Yes" --no-button "No" "${r}" "${c}"
SERVICE=$?
if [ "$SERVICE" = "0" ]; then
echo "Installing LedFx Service"
echo "[Unit]
Description=LedFx Music Visualizer
After=network.target sound.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=5
User="$curruser"
Group=audio
ExecStart=/usr/bin/python3 /home/"$curruser"/.local/bin/ledfx
Environment=XDG_RUNTIME_DIR=/run/user/"$UID"
[Install]
WantedBy=multi-user.target
" >> ~/ledfx.service
sudo mv ~/ledfx.service /etc/systemd/system/ledfx.service
sudo systemctl enable ledfx
sudo systemctl start ledfx
sudo systemctl status ledfx
echo "LedFx is now running. Please navigate to "$IP":8888 in your web browser"
echo "If you have no audio devices in LedFx and you're on a Raspberry Pi, please run 'sudo raspi-config' and setup your audio device (System Devices -> Audio)"
else
echo "LedFx is now installed. Please type ledfx to start."
echo "If you have no audio devices in LedFx and you're on a Raspberry Pi, please run 'sudo raspi-config' and setup your audio device (System Devices -> Audio)"
fi
}
update-ledfx () {
sudo systemctl stop ledfx 2> /dev/null
python3 -m pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/LedFx/LedFx@dev
echo "All Updated, enjoy LedFx!"
sudo systemctl start ledfx 2> /dev/null
}
delete-config () {
sudo systemctl stop ledfx 2> /dev/null
echo "Stopping Service..."
sleep 2
rm ~/.ledfx/config.json
echo "Configuration Deleted"
echo "Restarting Service..."
sudo systemctl start ledfx 2> /dev/null
echo "Relaunch LedFx to rebuild if you aren't using a service. Otherwise you're good to go."
}
backup-config (){
cp ~/.ledfx/config.json ~/config.json.bak
menu
}
uninstall-ledfx () {
echo "Removing LedFx installation and configuration"
sudo systemctl stop ledfx 2> /dev/null
sudo systemctl disable ledfx 2> /dev/null
sudo rm /etc/systemd/system/ledfx.service 2> /dev/null
python3 -m pip -q uninstall -y ledfx 2> /dev/null
rm -rf ~/.ledfx/
echo "LedFx uninstalled. Sorry to see you go :("
}
repair-ledfx () {
echo "Removing old LedFx installation"
sudo systemctl stop ledfx 2> /dev/null
sudo systemctl disable ledfx 2> /dev/null
sudo rm /etc/systemd/system/ledfx.service 2> /dev/null
python3 -m pip -q uninstall -y ledfx 2> /dev/null
install-ledfx
}
menu () {
FILE=~/.ledfx/config.json
if [ -f "$FILE" ]; then
INSTALLOPTION=$(
whiptail --title "LedFx Installer" --menu "Prior Installation Detected" "${r}" "${c}" 14 \
"Update" "Update LedFx." \
"Fresh Install" "Remove all data (INCLUDING CONFIGURATION) and reinstall." \
"Uninstall" "Removes LedFx." \
"Repair" "Attempts to repair LedFx installation."\
"Backup Config" "Backs up your configuration file to your home folder." \
"Delete Config" "Sometimes your configuration file can cause issues." 3>&2 2>&1 1>&3
)
if [ "$INSTALLOPTION" = "Update" ]; then
update-ledfx
elif [ "$INSTALLOPTION" = "Fresh Install" ]; then
install-ledfx
elif [ "$INSTALLOPTION" = "Uninstall" ]; then
uninstall-ledfx
elif [ "$INSTALLOPTION" = "Repair" ]; then
repair-ledfx
elif [ "$INSTALLOPTION" = "Backup Config" ]; then
backup-config
elif [ "$INSTALLOPTION" = "Delete Config" ]; then
delete-config
else
echo "What happened? We broke? Give me another go!"
fi
else
install-ledfx
fi
}
menu

File diff suppressed because one or more lines are too long

3
frontend/.gitignore vendored
View File

@ -12,11 +12,12 @@
/build
# misc
.DS_Store
*.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
*.eslintcache
npm-debug.log*
yarn-debug.log*

View File

@ -3,21 +3,30 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" >
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="LedFX front end"
/>
<meta name="description" content="LedFx frontend" />
<!-- Apple Web App Tags -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="LedFx" />
<link rel="apple-touch-icon" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="120x120" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-120.png" />
<link rel="apple-touch-icon" sizes="152x152" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-152.png" />
<link rel="apple-touch-icon" sizes="167x167" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-167.png" />
<link rel="apple-touch-icon" sizes="180x180" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-180.png" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-startup-image" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/apple-touch-startup-image.png" />
<!-- Mobile Web App Tags -->
<meta name="mobile-web-app-capable" content="yes" />
<meta name="application-name" content="LedFx" />
<meta name="msapplication-starturl" content="/" />
<link rel="icon" type="image/png" sizes="120x120" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-120.png" />
<link rel="icon" type="image/png" sizes="152x152" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-152.png" />
<link rel="icon" type="image/png" sizes="167x167" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-167.png" />
<link rel="icon" type="image/png" sizes="180x180" href="https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-180.png" />
<!-- including does flicker on Load
<style>
@ -47,7 +56,6 @@
</style>
-->
<!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> -->
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/

View File

@ -0,0 +1,36 @@
{
"name": "LedFx",
"short_name": "LedFx",
"description": "LedFx Frontend",
"lang": "en-US",
"start_url": "/",
"scope": "/",
"display": "standalone",
"icons": [
{
"src": "https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/apple-touch-icon.png",
"sizes": "180x180",
"type": "image/png"
},
{
"src": "https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-120.png",
"sizes": "120x120",
"type": "image/png"
},
{
"src": "https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-167.png",
"sizes": "167x167",
"type": "image/png"
},
{
"src": "https://raw.githubusercontent.com/LedFx/LedFx/dev/icons/ios/square-180.png",
"sizes": "180x180",
"type": "image/png"
}
]
}

View File

@ -51,8 +51,8 @@ const AddSceneCard = ({ scenes = {}, addScene }) => {
subheader="Save current effects of all devices as a Scene"
/>
<CardContent>
<Box display="flex">
<Box item="true" flexGrow={1}>
<Box display="flex" flexWrap="wrap" alignItems="flex-end">
<Box item="true" flexGrow={1} paddingX={1}>
<TextField
error={!!error}
id="SceneNameInput"
@ -62,7 +62,7 @@ const AddSceneCard = ({ scenes = {}, addScene }) => {
helperText={error}
/>
</Box>
<Box item="true">
<Box item="true" paddingX={1}>
<Button
className={classes.button}
color="primary"

View File

@ -70,7 +70,6 @@ const IntegrationsCard = ({ int }) => {
aria-label="Add"
className={classes.button}
endIcon={<AddCircleIcon />}
aria-haspopup="true"
//onClick={handleClickListItem}
role="listitem"
>
@ -90,7 +89,7 @@ const IntegrationsCard = ({ int }) => {
variant="text"
color="secondary"
onClick={() => {
console.log('edit');
// console.log('edit');
}}
>
<EditIcon />

View File

@ -1,4 +1,4 @@
import React from 'react'
import React from 'react';
import { deleteAsyncIntegration } from 'modules/integrations';
import EditIcon from '@material-ui/icons/Edit';
import { Switch } from '@material-ui/core';
@ -7,37 +7,37 @@ import TableRow from '@material-ui/core/TableRow';
import TableCell from '@material-ui/core/TableCell';
import PopoverSure from 'components/VirtualComponents/PopoverSure';
const DataRow = ({id, name, type, data}) =>
data.map(dr => <TableRow key={id}>
<TableCell>{name}</TableCell>
<TableCell>{type}</TableCell>
<TableCell>{dr[0]}</TableCell>
<TableCell>{dr[1] && dr[1].scene_name}</TableCell>
<TableCell>{JSON.stringify(dr[3])}</TableCell>
<TableCell>
<div style={{ display: 'flex' }}>
<PopoverSure
variant="text"
onDeleteVitem={() =>
deleteAsyncIntegration({
id: id,
})
}
/>
<Button
variant="text"
color="secondary"
onClick={() => {
console.log('edit');
}}
>
<EditIcon />
</Button>
<Switch color="primary" checked={ data &&dr && dr[2]} />
</div>
</TableCell>
</TableRow>)
const DataRow = ({ id, name, type, data }) =>
data.map(dr => (
<TableRow key={id}>
<TableCell>{name}</TableCell>
<TableCell>{type}</TableCell>
<TableCell>{dr[0]}</TableCell>
<TableCell>{dr[1] && dr[1].scene_name}</TableCell>
<TableCell>{JSON.stringify(dr[3])}</TableCell>
<TableCell>
<div style={{ display: 'flex' }}>
<PopoverSure
variant="text"
onDeleteVitem={() =>
deleteAsyncIntegration({
id: id,
})
}
/>
<Button
variant="text"
color="secondary"
onClick={() => {
// console.log('edit');
}}
>
<EditIcon />
</Button>
<Switch color="primary" checked={data && dr && dr[2]} />
</div>
</TableCell>
</TableRow>
));
export default DataRow
export default DataRow;

View File

@ -132,7 +132,6 @@ export default function ConfirmationDialog({ virtual, deviceList, config, integr
aria-label="Add"
className={classes.button}
endIcon={<AddCircleIcon />}
aria-haspopup="true"
onClick={handleClickListItem}
role="listitem"
>

View File

@ -17,10 +17,11 @@ import Fab from '@material-ui/core/Fab';
const styles = theme => ({
appBar: {
backgroundColor: theme.palette.background.default,
paddingLeft: drawerWidth,
paddingLeft: 0,
[theme.breakpoints.up('md')]: {
width: `100%`,
left: 0,
paddingLeft: drawerWidth,
},
},
// toolBar: {

View File

@ -21,7 +21,7 @@ const BottomBar = ({ classes }) => {
<IconButton
aria-label="Github"
color="inherit"
href="https://github.com/LedFx/LedFx/tree/dev"
href="https://git.ledfx.app/"
target="_blank"
title="Github"
>
@ -36,7 +36,9 @@ const BottomBar = ({ classes }) => {
>
<ForumIcon />
</IconButton>
{parseInt(window.localStorage.getItem('BladeMod')) >= 2 && <BugTracker />}
{parseInt(window.localStorage.getItem('BladeMod')) >= 2 && (
<BugTracker color="inherit" />
)}
</div>
);
};

View File

@ -1,6 +1,24 @@
import { drawerWidth } from 'utils/style';
const sidebarStyle = theme => ({
'@global': {
'*::-webkit-scrollbar': {
backgroundColor: '#ffffff30',
width: '8px',
borderRadius: '8px',
},
'*::-webkit-scrollbar-track': {
backgroundColor: '#00000060',
borderRadius: '8px',
},
'*::-webkit-scrollbar-thumb': {
backgroundColor: '#555555',
borderRadius: '8px',
},
'*::-webkit-scrollbar-button': {
display: 'none',
}
},
drawerPaper: {
width: drawerWidth,
[theme.breakpoints.up('md')]: {
@ -141,9 +159,12 @@ const sidebarStyle = theme => ({
overflow: 'auto',
zIndex: '4',
overflowScrolling: 'touch',
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
},
bottomBar: {
position: 'absolute',
position: 'relative',
background: theme.palette.grey[900],
bottom: 0,
left: 0,

View File

@ -63,7 +63,7 @@ class DashboardView extends React.Component {
<Grid container direction="row" spacing={4}>
{devices.list.map(device => {
return (
<Grid key={device.id} item lg={6}>
<Grid key={device.id} item xs sm={6} lg={4} xl={3}>
<Card className={classes.card}>
<CardContent>
<DeviceMiniControl
@ -78,10 +78,10 @@ class DashboardView extends React.Component {
})}
</Grid>
<Grid container direction="row" spacing={4}>
<Grid item lg={6}>
<Grid item sm>
<MiniScenesCard activateScene={activateScene} />
</Grid>
<Grid item lg={6}>
<Grid item sm>
<AddSceneCard scenes={scenes} addScene={addScene} />
</Grid>
</Grid>
@ -100,5 +100,12 @@ export default connect(
devices: state.devices,
scenes: state.scenes,
}),
{ addScene, activateScene, getScenes, setDeviceEffect, clearDeviceEffect, fetchDeviceList }
{
addScene,
activateScene,
getScenes,
setDeviceEffect,
clearDeviceEffect,
fetchDeviceList,
}
)(withStyles(styles)(DashboardView));

View File

@ -41,6 +41,8 @@ class HttpServer(object):
def register_routes(self):
self.api.register_routes(self.app)
self.app.router.add_route("get", "/favicon.ico", self.favicon)
self.app.router.add_route("get", "/manifest.json", self.manifest)
self.app.router.add_static(
"/static",
path=ledfx_frontend.where() + "/static",
@ -50,6 +52,17 @@ class HttpServer(object):
self.app.router.add_route("get", "/", self.index)
self.app.router.add_route("get", "/{extra:.+}", self.index)
async def favicon(self, response):
return web.FileResponse(
path=ledfx_frontend.where() + "/favicon.ico", status=200
)
async def manifest(self, response):
return web.FileResponse(
path=ledfx_frontend.where() + "/manifest.json", status=200
)
async def start(self):
self.runner = web.AppRunner(self.app)
await self.runner.setup()

View File

@ -5,5 +5,5 @@ flake8>=3.8.4
black>=20.8b1
isort>=5.6.4
pre-commit>=2.9.3
cython<=0.29.21
cython==0.29.21
pre-commit>=2.9.3

View File

@ -8,16 +8,16 @@
numpy>=1.20
voluptuous>=0.12.0
pyaudio>=0.2.11
sacn==1.5
aiohttp>=3.7.3
sacn>=1.5
aiohttp>=3.7.4
yarl>=1.5.1
multidict>=4.7.6
multidict>=5.0.0
aiohttp_jinja2>=1.1.0
requests>=2.24.0
pyyaml>=5.3.1
aubio>=0.4.9
zeroconf>=0.28.6
cython<=0.29.21
cython==0.29.21
pyupdater>=3.1.0
sentry-sdk>=0.19.0
certifi>=2019.3.9

View File

@ -15,24 +15,24 @@ PROJECT_URL = "https://github.com/LedFx/LedFx/tree/dev"
# Need to install numpy first
SETUP_REQUIRES = [
"numpy>=1.19.5",
"numpy>=1.20",
]
INSTALL_REQUIRES = [
"numpy>=1.20",
"voluptuous>=0.12.0",
"pyaudio>=0.2.11",
"sacn==1.5",
"aiohttp>=3.7.3",
"sacn>=1.5",
"aiohttp>=3.7.4",
"yarl>=1.5.1",
"multidict>=4.7.6",
"multidict>=5.0.0",
"aiohttp_jinja2>=1.1.0",
"requests>=2.24.0",
"pyyaml>=5.3.1",
"aubio>=0.4.9",
"zeroconf>=0.28.6",
'pypiwin32>=223; platform_system == "Windows"',
"cython<=0.29.21",
"cython==0.29.21",
"pyupdater>=3.1.0",
"sentry-sdk>=0.19.0",
"certifi>=2019.3.9",
@ -57,7 +57,5 @@ setup(
install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES,
python_requires=const.REQUIRED_PYTHON_STRING,
# include_package_data=True,
# zip_safe=False,
entry_points={"console_scripts": ["ledfx = ledfx.__main__:main"]},
)