Skip to content

Commit

Permalink
Dev (#82)
Browse files Browse the repository at this point in the history
* 🔒 use non-root user in generated Dockerfile

* fixed readme (#75)

Fixed issue in #74

* fixed background callback issue

* Version 1.10.4

* Add CodeQL workflow for GitHub code scanning (#73)

* Update README.md

* Add CodeQL workflow for GitHub code scanning

Co-authored-by: Andrew Hossack <42557253+andrew-hossack@users.noreply.github.com>
Co-authored-by: LGTM Migrator <lgtm-migrator@users.noreply.github.com>

* remove changes to add to different branch

* codeql fixes

* 👷 added package install to pipelines

* changelog updates

* Changed pypa publish to use v1 release

* Filepath hotfix (#83)

* update path

* Catch exception for src/app.py

* Changed python version in cicd to 3.10.8

* upgrade pytest to 6.2.5

* update gitlab ci to python version 3.10.9

* Version 1.10.5

Co-authored-by: Jason Washburn <wburn@wburn.net>
Co-authored-by: lgtm-com[bot] <43144390+lgtm-com[bot]@users.noreply.github.com>
Co-authored-by: LGTM Migrator <lgtm-migrator@users.noreply.github.com>
Co-authored-by: Jason Washburn <35488541+jasonwashburn@users.noreply.github.com>
  • Loading branch information
5 people committed Dec 17, 2022
1 parent 67c754d commit ec38957
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.6
- name: Set up Python 3.10.9
uses: actions/setup-python@v1
with:
python-version: 3.6
python-version: 3.10.9
- name: Install pypa/build
run: >-
python -m
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upload_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.6
- name: Set up Python 3.10.9
uses: actions/setup-python@v1
with:
python-version: 3.6
python-version: 3.10.9
- name: Install pypa/build
run: >-
python -m
Expand All @@ -39,7 +39,7 @@ jobs:
run: |
python -m pytest
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
9 changes: 9 additions & 0 deletions docs/source/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

All notable changes to this project will be documented in this file.

## [1.10.5] - 2022-12-16

### Fixed

- Fixed background callbacks printing warnings on new version of plotly dash
- Update pypa publish to use v1 release
- Fixed issue with deploypage callbacks not working in some cases
- Update gitlab runner to python version 3.10.9

## [1.10.4] - 2022-11-8

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -- Project information

__version__ = '1.10.4'
__version__ = '1.10.5'

project = 'DashTools'
author = 'Andrew Hossack'
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gunicorn
packaging==21.0
pipreqs==0.4.11
pre-commit==2.16.0
pytest==6.2.2
pytest==6.2.5
pandas
yolk3k==0.9
termcolor==1.1.0
Expand Down
1 change: 1 addition & 0 deletions src/dashtools/dashboard/callbacks/deployPage_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def file_explorer_callback(n, force_tree_update, filepath: os.PathLike):
])
if not n:
return empty_div, False, None, html.Div()
filepath = os.path.normpath(filepath)
if filepath:
if os.path.isdir(filepath):
try:
Expand Down
7 changes: 3 additions & 4 deletions src/dashtools/deploy/fileUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,15 @@ def search_appfile_ui(app_root: os.PathLike) -> bool:
Returns:
True if server=app.server is found, else False
"""
with open(os.path.join(app_root, 'src', 'app.py'), 'r', encoding="utf8") as modfile:
appfile_contents = modfile.read()

# Look for the hook "server =" or "server=" with spaces and newlines
# https://regex101.com/r/Ad3TN8/2
try:
with open(os.path.join(app_root, 'src', 'app.py'), 'r', encoding="utf8") as modfile:
appfile_contents = modfile.read()
re.search(f"^[\s]*server[\s]?=.*app\.server",
appfile_contents, re.MULTILINE).group(0)
return True
except (AttributeError, IndexError, UnboundLocalError):
except (AttributeError, IndexError, UnboundLocalError, FileNotFoundError):
return False


Expand Down
2 changes: 1 addition & 1 deletion src/dashtools/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Version in this file must match version for docs/source/version.py!

__version__ = '1.10.4'
__version__ = '1.10.5'

0 comments on commit ec38957

Please sign in to comment.