Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 14.x

Expand All @@ -30,7 +30,7 @@ jobs:
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|3.9|${{ hashFiles('setup.*') }}
Expand All @@ -45,7 +45,7 @@ jobs:
npx redoc-cli bundle openapi-spec.json -o api-docs/index.html

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: api-docs
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- {name: Style, python: '3.9', tox: style}
- {name: '3.9', python: '3.9', tox: py39, postgres: true}
- {name: Style, python: '3.12', tox: style}
- {name: '3.12', python: '3.12', tox: py312, postgres: true}

services:
postgres:
Expand All @@ -28,9 +28,9 @@ jobs:
options: --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -45,7 +45,7 @@ jobs:
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.*') }}
Expand Down
41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[project]
name = 'ursh'
dynamic = ['version', 'dependencies']
description = 'A URL shortening microservice'
readme = 'README.md'
license = 'MIT'
authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }]
classifiers = [
'Environment :: Web Environment',
'Framework :: Flask',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.12',
]
requires-python = '~=3.12'

[project.scripts]
ursh = 'ursh.cli.core:cli'

[project.optional-dependencies]
dev = ['pytest', 'isort']

[project.urls]
Issues = 'https://github.com/indico/ursh/issues'
GitHub = 'https://github.com/indico/ursh'

[build-system]
requires = ['hatchling==1.27.0', 'hatch-requirements-txt==0.4.1']
build-backend = 'hatchling.build'

[tool.hatch]
version = { path = 'ursh/__init__.py' }

[tool.hatch.metadata.hooks.requirements_txt]
files = ['requirements.txt']

[tool.hatch.build]
packages = ['ursh']

[tool.uv]
# uv does not know about dynamic metadata so `pip install -e .` should always reinstall
reinstall-package = ['ursh']
23 changes: 12 additions & 11 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
apispec-webframeworks==0.5.2
flask-apispec==0.8.8
flask-marshmallow==0.12.0
apispec-webframeworks
click
flask
flask-apispec
flask-marshmallow
flask-shell-ipython
flask-sqlalchemy==2.4.1
flask==1.1.2
marshmallow-sqlalchemy==0.23.0
markupsafe<2.1
itsdangerous<2.1
psycopg2
flask-sqlalchemy
ipython<9
marshmallow-sqlalchemy
marshmallow<4
psycopg2-binary
pyyaml
sqlalchemy-utc
sqlalchemy
werkzeug==1.0.1
sqlalchemy<2
werkzeug
107 changes: 50 additions & 57 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,118 +1,111 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile
#
apispec[yaml]==5.1.1
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.in -o requirements.txt
apispec==6.8.2
# via
# apispec-webframeworks
# flask-apispec
apispec-webframeworks==0.5.2
apispec-webframeworks==1.2.0
# via -r requirements.in
asttokens==2.0.5
asttokens==3.0.0
# via stack-data
backcall==0.2.0
# via ipython
click==8.0.4
blinker==1.9.0
# via flask
click==8.2.1
# via
# -r requirements.in
# flask
# flask-shell-ipython
decorator==5.1.1
decorator==5.2.1
# via ipython
executing==0.8.3
executing==2.2.0
# via stack-data
flask==1.1.2
flask==3.1.1
# via
# -r requirements.in
# flask-apispec
# flask-marshmallow
# flask-shell-ipython
# flask-sqlalchemy
flask-apispec==0.8.8
flask-apispec==0.11.4
# via -r requirements.in
flask-marshmallow==0.12.0
flask-marshmallow==1.3.0
# via -r requirements.in
flask-shell-ipython==0.4.1
flask-shell-ipython==0.5.3
# via -r requirements.in
flask-sqlalchemy==2.4.1
flask-sqlalchemy==3.0.5
# via -r requirements.in
greenlet==1.1.2
greenlet==3.2.3
# via sqlalchemy
ipython==8.1.1
# via flask-shell-ipython
itsdangerous==2.0.1
ipython==8.37.0
# via
# -r requirements.in
# flask
jedi==0.18.1
# flask-shell-ipython
itsdangerous==2.2.0
# via flask
jedi==0.19.2
# via ipython
jinja2==3.0.3
jinja2==3.1.6
# via flask
markupsafe==2.0.1
markupsafe==3.0.2
# via
# -r requirements.in
# flask
# jinja2
marshmallow==3.15.0
# werkzeug
marshmallow==3.26.1
# via
# -r requirements.in
# flask-apispec
# flask-marshmallow
# marshmallow-sqlalchemy
# webargs
marshmallow-sqlalchemy==0.23.0
marshmallow-sqlalchemy==1.4.2
# via -r requirements.in
matplotlib-inline==0.1.3
matplotlib-inline==0.1.7
# via ipython
packaging==21.3
# via marshmallow
parso==0.8.3
packaging==25.0
# via
# apispec
# marshmallow
# webargs
parso==0.8.4
# via jedi
pexpect==4.8.0
pexpect==4.9.0
# via ipython
pickleshare==0.7.5
prompt-toolkit==3.0.51
# via ipython
prompt-toolkit==3.0.28
# via ipython
psycopg2==2.9.3
psycopg2-binary==2.9.10
# via -r requirements.in
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
pure-eval==0.2.3
# via stack-data
pygments==2.11.2
pygments==2.19.2
# via ipython
pyparsing==3.0.7
# via packaging
pyyaml==6.0
pyyaml==6.0.2
# via
# -r requirements.in
# apispec
six==1.16.0
# via
# flask-apispec
# flask-marshmallow
sqlalchemy==1.4.32
setuptools==80.9.0
# via sqlalchemy-utc
sqlalchemy==1.4.54
# via
# -r requirements.in
# flask-sqlalchemy
# marshmallow-sqlalchemy
# sqlalchemy-utc
sqlalchemy-utc==0.14.0
# via -r requirements.in
stack-data==0.2.0
stack-data==0.6.3
# via ipython
traitlets==5.1.1
traitlets==5.14.3
# via
# ipython
# matplotlib-inline
wcwidth==0.2.5
wcwidth==0.2.13
# via prompt-toolkit
webargs==5.5.3
webargs==8.7.0
# via flask-apispec
werkzeug==1.0.1
werkzeug==3.1.3
# via
# -r requirements.in
# flask

# The following packages are considered to be unsafe in a requirements file:
# setuptools
44 changes: 0 additions & 44 deletions setup.py

This file was deleted.

8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist =
py39
py312
style

[testenv]
extras = tests
extras = dev
commands = pytest -rs -v --color=yes
setenv = URSH_CONFIG=/dev/null
passenv = URSH_TEST_DATABASE_URI
Expand All @@ -15,5 +15,5 @@ deps =
flake8
isort
commands =
isort --diff --check-only setup.py ursh
flake8 setup.py ursh/
isort --diff --check-only ursh
flake8 ursh/
Loading
Loading