Skip to content

Commit

Permalink
House keeping (#345)
Browse files Browse the repository at this point in the history
* Upgrade to Node v18.13

* Bump sass from 1.57.1 to 1.58.0 in /client

Bumps [sass](https://github.com/sass/dart-sass) from 1.57.1 to 1.58.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.57.1...1.58.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Server package refactor (#310)

* Server package refactoring

* Fix pep errors

* Update pylint ignore file based on current code

* Use npm@8 in Github actions

* Bump tornado from 6.2 to 6.3 in /server

Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.2 to 6.3.
- [Release notes](https://github.com/tornadoweb/tornado/releases)
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](tornadoweb/tornado@v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: tornado
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update dependabot.yml

* Update dependabot.yml

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
Tim020 and dependabot[bot] authored Apr 20, 2023
1 parent 903bd03 commit 1aa7978
Show file tree
Hide file tree
Showing 30 changed files with 127 additions and 366 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,19 @@ updates:
update-types: ["version-update:semver-major"]
versioning-strategy: increase
target-branch: dev
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
target-branch: dev
- package-ecosystem: "github-actions"
directory: "/.github"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
target-branch: dev
3 changes: 2 additions & 1 deletion .github/workflows/nodelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm install -g npm@8
- run: npm ci
- run: npm run ci-lint
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15-buster AS node_build
FROM node:18.13.0-buster AS node_build
RUN npm install npm@8 -g

COPY /server /server
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A digital script project for cueing theatrical shows

### Requirements

* Node v16.15.x (npm 8.11.x)
* Node v18.13.x (npm 8.11.x)
* Python 3.10.x

### Client
Expand Down
16 changes: 8 additions & 8 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"engines": {
"npm": ">=8.0.0 <9.0.0",
"node": ">=16.0.0 <17.0.0"
"node": ">=18.13.0"
},
"dependencies": {
"bootstrap": "4.6.2",
Expand Down Expand Up @@ -43,7 +43,7 @@
"eslint-plugin-vue": "9.9.0",
"eslint-plugin-vuejs-accessibility": "1.2.0",
"node-sass": "7.0.3",
"sass": "1.57.1",
"sass": "1.58.0",
"sass-loader": "13.2.0",
"webpack": "5.75.0"
},
Expand Down
14 changes: 7 additions & 7 deletions server/controllers/api/settings.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from tornado import escape

from utils.base_controller import BaseAPIController
from utils.logger import get_logger
from utils.route import ApiRoute, ApiVersion
from utils.settings import Settings
from utils.web_decorators import no_live_session
from digi_server.logger import get_logger
from digi_server.settings import Settings
from utils.web.base_controller import BaseAPIController
from utils.web.route import ApiRoute, ApiVersion
from utils.web.web_decorators import no_live_session


@ApiRoute('settings', ApiVersion.v1)
@ApiRoute('settings', ApiVersion.V1)
class SettingsController(BaseAPIController):
async def get(self):
settings: Settings = self.application.digi_settings
Expand All @@ -34,7 +34,7 @@ async def patch(self):
self.write({'message': 'Settings updated'})


@ApiRoute('settings/raw', ApiVersion.v1)
@ApiRoute('settings/raw', ApiVersion.V1)
class RawSettingsController(BaseAPIController):
async def get(self):
settings: Settings = self.application.digi_settings
Expand Down
10 changes: 5 additions & 5 deletions server/controllers/api/show/acts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from models.show import Show, Act, Scene
from schemas.schemas import ActSchema
from utils.base_controller import BaseAPIController
from utils.web_decorators import requires_show, no_live_session
from utils.route import ApiRoute, ApiVersion
from utils.web.base_controller import BaseAPIController
from utils.web.web_decorators import requires_show, no_live_session
from utils.web.route import ApiRoute, ApiVersion


@ApiRoute('show/act', ApiVersion.v1)
@ApiRoute('show/act', ApiVersion.V1)
class ActController(BaseAPIController):

@requires_show
Expand Down Expand Up @@ -188,7 +188,7 @@ async def delete(self):
await self.finish({'message': '404 show not found'})


@ApiRoute('show/act/first_scene', ApiVersion.v1)
@ApiRoute('show/act/first_scene', ApiVersion.V1)
class FirstSceneController(BaseAPIController):

@requires_show
Expand Down
8 changes: 4 additions & 4 deletions server/controllers/api/show/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from models.show import Show, Cast
from schemas.schemas import CastSchema
from utils.base_controller import BaseAPIController
from utils.web_decorators import requires_show, no_live_session
from utils.route import ApiRoute, ApiVersion
from utils.web.base_controller import BaseAPIController
from utils.web.web_decorators import requires_show, no_live_session
from utils.web.route import ApiRoute, ApiVersion


@ApiRoute('show/cast', ApiVersion.v1)
@ApiRoute('show/cast', ApiVersion.V1)
class CastController(BaseAPIController):

@requires_show
Expand Down
10 changes: 5 additions & 5 deletions server/controllers/api/show/characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from models.show import Show, Cast, Character, CharacterGroup
from schemas.schemas import CharacterSchema, CharacterGroupSchema
from utils.base_controller import BaseAPIController
from utils.web_decorators import requires_show, no_live_session
from utils.route import ApiRoute, ApiVersion
from utils.web.base_controller import BaseAPIController
from utils.web.web_decorators import requires_show, no_live_session
from utils.web.route import ApiRoute, ApiVersion


@ApiRoute('show/character', ApiVersion.v1)
@ApiRoute('show/character', ApiVersion.V1)
class CharacterController(BaseAPIController):

@requires_show
Expand Down Expand Up @@ -150,7 +150,7 @@ async def delete(self):
await self.finish({'message': '404 show not found'})


@ApiRoute('show/character/group', ApiVersion.v1)
@ApiRoute('show/character/group', ApiVersion.V1)
class CharacterGroupController(BaseAPIController):

@requires_show
Expand Down
10 changes: 5 additions & 5 deletions server/controllers/api/show/cues.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from models.script import ScriptRevision, Script
from models.show import Show
from schemas.schemas import CueTypeSchema, CueSchema
from utils.base_controller import BaseAPIController
from utils.web_decorators import requires_show, no_live_session
from utils.route import ApiRoute, ApiVersion
from utils.web.base_controller import BaseAPIController
from utils.web.web_decorators import requires_show, no_live_session
from utils.web.route import ApiRoute, ApiVersion


@ApiRoute('show/cues/types', ApiVersion.v1)
@ApiRoute('show/cues/types', ApiVersion.V1)
class CueTypesController(BaseAPIController):

@requires_show
Expand Down Expand Up @@ -155,7 +155,7 @@ async def delete(self):
await self.finish({'message': '404 show not found'})


@ApiRoute('show/cues', ApiVersion.v1)
@ApiRoute('show/cues', ApiVersion.V1)
class CueController(BaseAPIController):

@requires_show
Expand Down
8 changes: 4 additions & 4 deletions server/controllers/api/show/scenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from models.show import Show, Scene
from schemas.schemas import SceneSchema
from utils.base_controller import BaseAPIController
from utils.web_decorators import requires_show, no_live_session
from utils.route import ApiRoute, ApiVersion
from utils.web.base_controller import BaseAPIController
from utils.web.web_decorators import requires_show, no_live_session
from utils.web.route import ApiRoute, ApiVersion


@ApiRoute('show/scene', ApiVersion.v1)
@ApiRoute('show/scene', ApiVersion.V1)
class SceneController(BaseAPIController):

@requires_show
Expand Down
16 changes: 8 additions & 8 deletions server/controllers/api/show/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
from models.show import Show
from models.session import Session
from schemas.schemas import ScriptRevisionsSchema, ScriptLineSchema
from utils.base_controller import BaseAPIController
from utils.web_decorators import requires_show, no_live_session
from utils.route import ApiRoute, ApiVersion
from utils.web.base_controller import BaseAPIController
from utils.web.web_decorators import requires_show, no_live_session
from utils.web.route import ApiRoute, ApiVersion


@ApiRoute('show/script/config', ApiVersion.v1)
@ApiRoute('show/script/config', ApiVersion.V1)
class ScriptStatusController(BaseAPIController):
def get(self):
with self.make_session() as session:
Expand All @@ -34,7 +34,7 @@ def get(self):
self.finish(data)


@ApiRoute('show/script/revisions', ApiVersion.v1)
@ApiRoute('show/script/revisions', ApiVersion.V1)
class ScriptRevisionsController(BaseAPIController):

@requires_show
Expand Down Expand Up @@ -197,7 +197,7 @@ async def delete(self):
await self.finish({'message': '404 show not found'})


@ApiRoute('show/script/revisions/current', ApiVersion.v1)
@ApiRoute('show/script/revisions/current', ApiVersion.V1)
class ScriptCurrentRevisionController(BaseAPIController):

@requires_show
Expand Down Expand Up @@ -267,7 +267,7 @@ async def post(self):
await self.finish({'message': '404 show not found'})


@ApiRoute('/show/script', ApiVersion.v1)
@ApiRoute('/show/script', ApiVersion.V1)
class ScriptController(BaseAPIController):

@requires_show
Expand Down Expand Up @@ -668,7 +668,7 @@ async def patch(self):
return


@ApiRoute('/show/script/max_page', ApiVersion.v1)
@ApiRoute('/show/script/max_page', ApiVersion.V1)
class ScriptMaxPageController(BaseAPIController):

@requires_show
Expand Down
12 changes: 6 additions & 6 deletions server/controllers/api/show/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from models.session import ShowSession
from models.show import Show
from schemas.schemas import ShowSessionSchema
from utils.base_controller import BaseAPIController
from utils.web_decorators import requires_show
from utils.route import ApiRoute, ApiVersion
from utils.web.base_controller import BaseAPIController
from utils.web.web_decorators import requires_show
from utils.web.route import ApiRoute, ApiVersion


@ApiRoute('show/sessions', ApiVersion.v1)
@ApiRoute('show/sessions', ApiVersion.V1)
class SessionsController(BaseAPIController):

@requires_show
Expand Down Expand Up @@ -36,7 +36,7 @@ def get(self):
self.finish({'message': '404 show not found'})


@ApiRoute('show/sessions/start', ApiVersion.v1)
@ApiRoute('show/sessions/start', ApiVersion.V1)
class SessionStartController(BaseAPIController):
@requires_show
async def post(self):
Expand Down Expand Up @@ -71,7 +71,7 @@ async def post(self):
await self.finish({'message': '404 show not found'})


@ApiRoute('show/sessions/stop', ApiVersion.v1)
@ApiRoute('show/sessions/stop', ApiVersion.V1)
class SessionStopController(BaseAPIController):
@requires_show
async def post(self):
Expand Down
12 changes: 6 additions & 6 deletions server/controllers/api/show/shows.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from models.script import Script, ScriptRevision
from models.show import Show
from schemas.schemas import ShowSchema
from utils.base_controller import BaseAPIController
from utils.web_decorators import requires_show
from utils.route import ApiRoute, ApiVersion
from utils.logger import get_logger
from utils.web.base_controller import BaseAPIController
from utils.web.web_decorators import requires_show
from utils.web.route import ApiRoute, ApiVersion
from digi_server.logger import get_logger


@ApiRoute('show', ApiVersion.v1)
@ApiRoute('show', ApiVersion.V1)
class ShowController(BaseAPIController):
async def post(self):
"""
Expand Down Expand Up @@ -191,7 +191,7 @@ async def patch(self):
await self.finish({'message': '404 show not found'})


@ApiRoute('shows', ApiVersion.v1)
@ApiRoute('shows', ApiVersion.V1)
class ShowsController(BaseAPIController):

def get(self):
Expand Down
6 changes: 3 additions & 3 deletions server/controllers/api/websocket.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from models.session import Session
from schemas.schemas import SessionSchema
from utils.base_controller import BaseAPIController
from utils.route import ApiRoute, ApiVersion
from utils.web.base_controller import BaseAPIController
from utils.web.route import ApiRoute, ApiVersion


@ApiRoute('ws/sessions', ApiVersion.v1)
@ApiRoute('ws/sessions', ApiVersion.V1)
class WebsocketSessionsController(BaseAPIController):

def get(self):
Expand Down
8 changes: 4 additions & 4 deletions server/controllers/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from tornado.escape import url_unescape
from tornado_prometheus import MetricsHandler

from utils.base_controller import BaseController, BaseAPIController
from utils.logger import get_logger
from utils.route import ApiRoute, ApiVersion, Route
from digi_server.logger import get_logger
from utils.pkg_utils import find_end_modules
from utils.web.base_controller import BaseController, BaseAPIController
from utils.web.route import ApiRoute, ApiVersion, Route


IMPORTED_CONTROLLERS = {}
Expand Down Expand Up @@ -78,7 +78,7 @@ def get(self):
})


@ApiRoute('debug', ApiVersion.v1)
@ApiRoute('debug', ApiVersion.V1)
class ApiDebugController(BaseAPIController):
def get(self):
self.set_status(200)
Expand Down
Loading

0 comments on commit 1aa7978

Please sign in to comment.