Skip to content

Commit

Permalink
Add support for 'run outdated' and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pronovic committed Feb 26, 2024
1 parent ceda442 commit 307c227
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 139 deletions.
24 changes: 24 additions & 0 deletions .run/commands/outdated.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# vim: set ft=bash ts=3 sw=3 expandtab:
# Show top-level dependencies with outdated constraints

# See: https://github.com/python-poetry/poetry/issues/2684#issuecomment-1076560832

command_outdated() {
echo "Updating dependencies with current constraints..."
echo ""
poetry update
if [ $? != 0 ]; then
echo "*** Failed to update dependencies"
exit 1
fi

echo ""
echo "Checking for outdated constraints..."
echo ""
poetry show --outdated | grep --file=<(poetry show --tree | grep '^\w' | cut -d' ' -f1 | sed 's/.*/^&\\s/')
if [ $? != 0 ]; then
echo "*** Failed to check for outdated constraints"
exit 1
fi
}

10 changes: 10 additions & 0 deletions .run/tasks/outdated.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# vim: set ft=bash sw=3 ts=3 expandtab:

help_outdated() {
echo "- run outdated: Find top-level dependencies with outdated constraints"
}

task_outdated() {
run_command outdated
}

4 changes: 2 additions & 2 deletions .run/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# General utility functions for use by the run script

# This is the set of basic tasks that must always exist
BASIC_TASKS="install format checks build test suite"
BASIC_TASKS_REGEX="^install$|^format$|^checks$|^build$|^test$|^suite$"
BASIC_TASKS="install outdated format checks build test suite"
BASIC_TASKS_REGEX="^install$|^outdated$|^format$|^checks$|^build$|^test$|^suite$"

# Run a command
run_command() {
Expand Down
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Version 0.6.10 unreleased
* Update Poetry install instructions in DEVELOPER.md.
* Pull in latest version of run-script-framework.
* Upgrade to gha-shared-workflows@v4 with new Poetry setup.
* Add support for 'run outdated' and update dependencies.

Version 0.6.9 17 Jan 2024

Expand Down
278 changes: 145 additions & 133 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ cattrs = "^23.1.2"
pytz = ">=2023.3.post1"
genshi = "^0.7.7"
click = "^8.1.7"
importlib-metadata = { version="^6.8.0", optional=true }
importlib-metadata = { version="^7.0.1", optional=true }
sphinx = { version="^7.2.6", optional=true }
sphinx-autoapi = { version="^3.0.0", optional=true }

[tool.poetry.extras]
docs = [ "sphinx", "sphinx-autoapi" ]

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.2"
pytest = "^8.0.2"
pytest-testdox = "^3.1.0"
coverage = "^6.5.0" # coveralls needs v6
pylint = "^3.0.1"
pre-commit = "^3.4.0"
black = "^23.9.1"
black = "^24.2.0"
mypy = "^1.6.0"
isort = "^5.12.0"
coveralls = "^3.3.1"
Expand Down
1 change: 0 additions & 1 deletion src/hcoopmeetbotlogic/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
# pylint: disable=unused-argument, too-many-public-methods:
@define
class CommandDispatcher:

"""
Identify and dispatch meeting commands.
Expand Down

0 comments on commit 307c227

Please sign in to comment.