Skip to content

Commit

Permalink
Puppet build (see pyramid::app) needs a requirements.txt, so generate it
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrillkuettel committed May 8, 2024
1 parent 13b2a4e commit 3080dd9
Show file tree
Hide file tree
Showing 5 changed files with 338 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,36 @@ make run # uses pserve

- Login at http://localhost:9090 with [email protected] / test


# Manage dependencies

We use `uv` to manage dependencies

## Regenerate requirements files based on new dependencies

./requirements/compile.sh

## Upgrade dependencies to latest version

Specific dependency:

./requirements/compile.sh -P Pillow

All dependencies:

./requirements/compile.sh -U

## Upgrade local environment

uv pip install -r requirements.txt -r test_requirements.txt

## Sync local environment with CI/Production

This will remove packages that have been manually installed locally

uv pip sync requirements.txt test_requirements.txt


## Miscellaneous
### Javascript dependencies
The project uses [Tom Select](https://github.com/orchidjs/tom-select) for some forms.
Expand Down
3 changes: 3 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ ensure_uv: in_virtual_env
# use latest uv
uv pip install --upgrade uv

compile:
@./requirements/compile.sh

run: in_virtual_env
pserve --reload development.ini

Expand Down
154 changes: 154 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# This file was autogenerated by uv via the following command:
# uv pip compile setup.cfg - -o requirements.txt --no-emit-package setuptools
-e .
alembic==1.13.1
# via privatim
apache-libcloud==3.8.0
# via sqlalchemy-file
babel==2.15.0
# via privatim
bcrypt==4.1.3
# via privatim
beaker==1.13.0
# via pyramid-beaker
certifi==2024.2.2
# via
# requests
# sentry-sdk
chameleon==4.5.4
# via pyramid-chameleon
charset-normalizer==3.3.2
# via requests
dnspython==2.6.1
# via email-validator
email-validator==2.1.1
# via privatim
fanstatic==1.4
# via privatim
greenlet==3.0.3
# via sqlalchemy
hupper==1.12.1
# via pyramid
idna==3.7
# via
# email-validator
# requests
mako==1.3.3
# via
# alembic
# pyramid-mako
markdown==3.6
# via privatim
markupsafe==2.1.5
# via
# mako
# privatim
# wtforms
nh3==0.2.17
# via privatim
packaging==24.0
# via zope-sqlalchemy
pastedeploy==3.1.0
# via plaster-pastedeploy
plaster==1.1.2
# via
# plaster-pastedeploy
# pyramid
plaster-pastedeploy==1.0.1
# via
# privatim
# pyramid
psycopg2==2.9.9
# via privatim
pygments==2.18.0
# via pyramid-debugtoolbar
pyramid==2.0.2
# via
# privatim
# pyramid-beaker
# pyramid-chameleon
# pyramid-debugtoolbar
# pyramid-layout
# pyramid-mako
# pyramid-retry
# pyramid-tm
pyramid-beaker==0.9
# via privatim
pyramid-chameleon==0.3
# via privatim
pyramid-debugtoolbar==4.12.1
# via privatim
pyramid-layout==1.0
# via privatim
pyramid-mako==1.1.0
# via pyramid-debugtoolbar
pyramid-retry==2.1.1
# via privatim
pyramid-tm==2.5
# via privatim
pytz==2024.1
# via sedate
requests==2.31.0
# via apache-libcloud
sedate==1.0.3.post1
# via privatim
sentry-sdk==2.1.1
# via privatim
sqlalchemy==2.0.30
# via
# alembic
# privatim
# sqlalchemy-file
# zope-sqlalchemy
sqlalchemy-file==0.6.0
# via privatim
transaction==4.0
# via
# privatim
# pyramid-tm
# zope-sqlalchemy
translationstring==1.4
# via pyramid
typing-extensions==4.11.0
# via
# alembic
# privatim
# sqlalchemy
urllib3==2.2.1
# via
# requests
# sentry-sdk
venusian==3.1.0
# via pyramid
waitress==3.0.0
# via privatim
webob==1.8.7
# via
# fanstatic
# privatim
# pyramid
wtforms==3.1.2
# via privatim
zope-deprecation==5.0
# via
# privatim
# pyramid
zope-event==5.0
# via
# privatim
# zope-schema
zope-interface==6.3
# via
# privatim
# pyramid
# pyramid-retry
# transaction
# zope-schema
# zope-sqlalchemy
zope-schema==7.0.1
# via privatim
zope-sqlalchemy==3.1
# via privatim

# The following packages were excluded from the output:
# setuptools
26 changes: 26 additions & 0 deletions requirements/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail

# change to scripts directory
cd $(dirname "$0")
# change to base directory
cd ..

# make sure virtual env is active
if [ -z "${VIRTUAL_ENV:-}" ]; then
source env/bin/activate
fi

echo "Building requirements.txt"
echo "-e ." | uv pip compile setup.cfg - \
-o requirements.txt \
--no-emit-package setuptools \
"$@"

echo "Building tests_requirements.txt"
uv pip compile setup.cfg \
--extra testing \
--extra typing \
-o tests_requirements.txt \
-c requirements.txt \
"$@"
125 changes: 125 additions & 0 deletions tests_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# This file was autogenerated by uv via the following command:
# uv pip compile setup.cfg --extra testing --extra typing -o tests_requirements.txt -c requirements.txt
alembic==1.13.1
apache-libcloud==3.8.0
# via sqlalchemy-file
babel==2.15.0
bcrypt==4.1.3
beaker==1.13.0
# via pyramid-beaker
certifi==2024.2.2
# via
# requests
# sentry-sdk
chameleon==4.5.4
# via pyramid-chameleon
charset-normalizer==3.3.2
# via requests
dnspython==2.6.1
# via email-validator
email-validator==2.1.1
fanstatic==1.4
greenlet==3.0.3
# via sqlalchemy
hupper==1.12.1
# via pyramid
idna==3.7
# via
# email-validator
# requests
mako==1.3.3
# via
# alembic
# pyramid-mako
markdown==3.6
markupsafe==2.1.5
# via
# mako
# wtforms
nh3==0.2.17
packaging==24.0
# via zope-sqlalchemy
pastedeploy==3.1.0
# via plaster-pastedeploy
plaster==1.1.2
# via
# plaster-pastedeploy
# pyramid
plaster-pastedeploy==1.0.1
# via pyramid
psycopg2==2.9.9
pygments==2.18.0
# via pyramid-debugtoolbar
pyramid==2.0.2
# via
# pyramid-beaker
# pyramid-chameleon
# pyramid-debugtoolbar
# pyramid-layout
# pyramid-mako
# pyramid-retry
# pyramid-tm
pyramid-beaker==0.9
pyramid-chameleon==0.3
pyramid-debugtoolbar==4.12.1
pyramid-layout==1.0
pyramid-mako==1.1.0
# via pyramid-debugtoolbar
pyramid-retry==2.1.1
pyramid-tm==2.5
pytz==2024.1
# via sedate
requests==2.31.0
# via apache-libcloud
sedate==1.0.3.post1
sentry-sdk==2.1.1
setuptools==69.5.1
# via
# fanstatic
# pyramid
# zope-deprecation
# zope-event
# zope-interface
# zope-schema
# zope-sqlalchemy
sqlalchemy==2.0.30
# via
# alembic
# sqlalchemy-file
# zope-sqlalchemy
sqlalchemy-file==0.6.0
transaction==4.0
# via
# pyramid-tm
# zope-sqlalchemy
translationstring==1.4
# via pyramid
typing-extensions==4.11.0
# via
# alembic
# sqlalchemy
urllib3==2.2.1
# via
# requests
# sentry-sdk
venusian==3.1.0
# via pyramid
waitress==3.0.0
webob==1.8.7
# via
# fanstatic
# pyramid
wtforms==3.1.2
zope-deprecation==5.0
# via pyramid
zope-event==5.0
# via zope-schema
zope-interface==6.3
# via
# pyramid
# pyramid-retry
# transaction
# zope-schema
# zope-sqlalchemy
zope-schema==7.0.1
zope-sqlalchemy==3.1

0 comments on commit 3080dd9

Please sign in to comment.