Skip to content

Commit

Permalink
build(deps): bump requests from 2.31.0 to 2.32.2 (#445)
Browse files Browse the repository at this point in the history
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Fernau <[email protected]>
  • Loading branch information
dependabot[bot] and danielfernau committed May 27, 2024
1 parent e401571 commit a8feeb8
Show file tree
Hide file tree
Showing 81 changed files with 507 additions and 15 deletions.
29 changes: 29 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG PYTHON_IMAGE_VARIANT="3.11"
FROM mcr.microsoft.com/devcontainers/python:${PYTHON_IMAGE_VARIANT}

# update path to include user's .local/bin
ENV PATH="${PATH}:/home/vscode/.local/bin"

# set workdir
WORKDIR /IdeaProjects/unifi-protect-video-downloader

# Poetry
ARG POETRY_VERSION="1.7.0"
#RUN su vscode -c "umask 0002 && pip3 --disable-pip-version-check install poetry==${POETRY_VERSION}"
#RUN su vscode -c "umask 0002 && poetry install"

# Nox
#ARG NOX_VERSION="none"
#RUN if [ "${NOX_VERSION}" != "none" ]; then su vscode -c "umask 0002 && pip3 install nox-poetry nox==${NOX_VERSION}"; fi

# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
# && rm -rf /tmp/pip-tmp

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
54 changes: 54 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "devcontainer unifi-protect-video-downloader",
"build": {
"dockerfile": "Dockerfile",
//"context": "..",
"args": {
// set Python version: 3, 3.8, 3.9, 3.10, 3.11, 3.12
// see https://github.com/devcontainers/images/tree/main/src/python
"PYTHON_IMAGE_VARIANT": "3.11",

// Options
//"NODE_VERSION": "lts/*",
"POETRY_VERSION": "1.7.0"
//"NOX_VERSION": "2022.1.7"
// TODO Add esbonio>=0.11.0 (required for RST support in VSC)
}
},
"remoteUser": "vscode"
// Set *default* container specific settings.json values on container create.
// "settings": {
// "python.defaultInterpreterPath": "/usr/local/bin/python",
// "python.linting.enabled": true,
// "python.linting.pylintEnabled": true,
// "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
// "python.formatting.blackPath": "/usr/local/py-utils/bin/black",
// "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
// "python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
// "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
// "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
// "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
// "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
// "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
// },
// Add the IDs of extensions you want installed when the container is created.
// "extensions": [
// "ms-python.python",
// "ms-python.vscode-pylance",
// "lextudio.restructuredtext-pack"
// ],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Install project dependencies
// "postCreateCommand": "poetry install",
//"postCreateCommand": "bash ./.devcontainer/post-install.sh",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode",
// "features": {
// "github-cli": "latest"
// },
// "mounts": [
// // Re-use local Git configuration
// "source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached"
// ]
}
9 changes: 7 additions & 2 deletions .idea/misc.xml

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

Empty file.
Empty file.

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

Empty file.

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

Empty file.
Empty file.
Empty file.

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

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

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

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

Empty file.
Empty file.

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

Empty file.
Empty file.

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

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

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

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

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

Empty file.
67 changes: 67 additions & 0 deletions .idea/sonarlint/issuestore/index.pb

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

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
67 changes: 67 additions & 0 deletions .idea/sonarlint/securityhotspotstore/index.pb

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

7 changes: 5 additions & 2 deletions .idea/unifi-protect-video-downloader.iml

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

12 changes: 12 additions & 0 deletions compose-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
app:
entrypoint:
- sleep
- infinity
image: docker/dev-environments-default:stable-1
init: true
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock

10 changes: 5 additions & 5 deletions poetry.lock

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

4 changes: 2 additions & 2 deletions protect_archiver/downloader/download_footage.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def download_footage(
time.sleep(int(client.download_wait))

# start and end time of the video segment to be downloaded
js_timestamp_range_start = int(interval_start.timestamp()) * 1000
js_timestamp_range_end = int(interval_end.timestamp()) * 1000
js_timestamp_range_start = int(interval_start.timestamp() * 1e3)
js_timestamp_range_end = int(interval_end.timestamp() * 1e3)

# support selection between local time zone and UTC for file names
interval_start_tz = (
Expand Down
4 changes: 2 additions & 2 deletions protect_archiver/downloader/download_motion_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def download_motion_event(
camera_name_fs_safe = make_camera_name_fs_safe(camera)

# start and end time of the video segment to be downloaded
js_timestamp_start = int(motion_event.start.timestamp()) * 1000
js_timestamp_end = int(motion_event.end.timestamp()) * 1000
js_timestamp_start = int(motion_event.start.timestamp() * 1e3)
js_timestamp_end = int(motion_event.end.timestamp() * 1e3)

# support selection between local time zone and UTC for file names
interval_start_tz = (
Expand Down
2 changes: 1 addition & 1 deletion protect_archiver/downloader/download_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def download_snapshot(client: Any, start: datetime, camera: Camera) -> None:
logging.debug(f"Argument '--touch-files' is present. Creating file at {filename}")
open(filename, "a").close()

js_timestamp_start = int(start.timestamp()) * 1000
js_timestamp_start = int(start.timestamp() * 1e3)

# build snapshot export API address
snapshot_export_query = f"/cameras/{camera.id}/snapshot?ts={js_timestamp_start}"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
python = "^3.8.2"
pip = "*"
python-dateutil = "^2.9.0"
requests = {extras = ["security"], version = "^2.31.0"}
requests = {extras = ["security"], version = "^2.32.2"}
click = "^8.1.7"
types-python-dateutil = "^2.9.0"
types-requests = "^2.31.0"
Expand Down
Loading

0 comments on commit a8feeb8

Please sign in to comment.