diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 69da249..125abe9 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Project - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: | ghcr.io/WIPACRepo/people-directory @@ -27,14 +27,14 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}.{{patch}} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 if: ${{ github.event_name != 'pull_request' }} with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push Docker Image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }} diff --git a/.github/workflows/wipac_cicd.yaml b/.github/workflows/wipac_cicd.yaml index 655ed50..7b3854c 100644 --- a/.github/workflows/wipac_cicd.yaml +++ b/.github/workflows/wipac_cicd.yaml @@ -7,24 +7,29 @@ on: tags-ignore: - '**' +env: + py_version: '3.10' + jobs: flake8: needs: [] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ env.py_version }} - uses: WIPACrepo/wipac-dev-flake8-action@v1.0 py-setup: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - - uses: WIPACrepo/wipac-dev-py-setup-action@pip-fix + - uses: WIPACrepo/wipac-dev-py-setup-action@v3.1 py-versions: needs: [py-setup] @@ -32,9 +37,9 @@ jobs: outputs: matrix: ${{ steps.versions.outputs.matrix }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: versions - uses: WIPACrepo/wipac-dev-py-versions-action@v2.1 + uses: WIPACrepo/wipac-dev-py-versions-action@v2.2 pip-install: needs: [py-versions] @@ -44,8 +49,8 @@ jobs: fail-fast: false matrix: ${{ fromJSON(needs.py-versions.outputs.matrix) }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.py3_versions }} - run: | @@ -107,7 +112,7 @@ jobs: runs-on: ubuntu-latest concurrency: release steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} @@ -125,10 +130,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Project - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: | ghcr.io/WIPACRepo/people-directory @@ -138,14 +143,14 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}.{{patch}} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 if: ${{ github.event_name != 'pull_request' }} with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push Docker Image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }} diff --git a/Dockerfile b/Dockerfile index 9145d13..9b81cde 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,17 @@ -FROM python:3.9 +FROM python:3.10 RUN useradd -m -U app -COPY requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt - WORKDIR /home/app USER app COPY . . +USER root +RUN pip install --no-cache-dir -e . + +USER app + ENV PYTHONPATH=/home/app CMD ["python", "-m", "people_directory"] diff --git a/people_directory/py.typed b/people_directory/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 7914a3b..0000000 --- a/requirements.txt +++ /dev/null @@ -1,79 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile -# -aio-pika==9.0.7 - # via wipac-keycloak-rest-services -aiormq==6.7.6 - # via aio-pika -cachetools==5.3.1 - # via wipac-rest-tools -certifi==2023.5.7 - # via requests -cffi==1.15.1 - # via cryptography -charset-normalizer==3.1.0 - # via requests -cryptography==40.0.2 - # via pyjwt -dnspython==2.3.0 - # via pymongo -idna==3.4 - # via - # requests - # yarl -ldap3==2.9.1 - # via wipac-keycloak-rest-services -motor==3.1.2 - # via - # people-directory (setup.py) - # wipac-keycloak-rest-services -multidict==6.0.4 - # via yarl -pamqp==3.2.1 - # via aiormq -pyasn1==0.5.0 - # via ldap3 -pycparser==2.21 - # via cffi -pyjwt[crypto]==2.7.0 - # via wipac-rest-tools -pymongo==4.3.3 - # via motor -pypng==0.20220715.0 - # via qrcode -qrcode==7.4.2 - # via wipac-rest-tools -requests==2.31.0 - # via - # requests-futures - # wipac-dev-tools - # wipac-keycloak-rest-services - # wipac-rest-tools -requests-futures==1.0.0 - # via wipac-rest-tools -tornado==6.3.2 - # via wipac-rest-tools -typing-extensions==4.6.2 - # via - # qrcode - # wipac-dev-tools -urllib3==2.0.2 - # via requests -wipac-dev-tools==1.6.16 - # via - # people-directory (setup.py) - # wipac-keycloak-rest-services - # wipac-rest-tools -wipac-keycloak-rest-services==1.3.10 - # via people-directory (setup.py) -wipac-rest-tools==1.4.20 - # via - # people-directory (setup.py) - # wipac-keycloak-rest-services -yarl==1.9.2 - # via - # aio-pika - # aiormq diff --git a/setup.cfg b/setup.cfg index b824583..b1385e9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,17 +1,19 @@ [wipac:cicd_setup_builder] -python_min = 3.8 +python_min = 3.10 package_dirs = people_directory -[metadata] # generated by wipac:cicd_setup_builder: version +[metadata] # generated by wipac:cicd_setup_builder: name, version version = attr: people_directory.__version__ +name = people-directory -[semantic_release] # generated by wipac:cicd_setup_builder +[semantic_release] # fully-generated by wipac:cicd_setup_builder version_variable = people_directory/__init__.py:__version__ upload_to_pypi = False patch_without_tag = True -commit_parser = semantic_release.history.tag_parser -minor_tag = [minor] -fix_tag = [fix] +commit_parser = semantic_release.history.emoji_parser +major_emoji = [major] +minor_emoji = [minor] +patch_emoji = [fix], [patch] branch = main [options] # generated by wipac:cicd_setup_builder: python_requires, packages @@ -20,7 +22,7 @@ install_requires = wipac-dev-tools wipac-keycloak-rest-services wipac-rest-tools -python_requires = >=3.8, <3.12 +python_requires = >=3.10, <3.13 packages = find: [options.extras_require] @@ -35,10 +37,19 @@ tests = [options.package_data] # generated by wipac:cicd_setup_builder: '*' * = py.typed -[options.packages.find] +[options.packages.find] # generated by wipac:cicd_setup_builder: include/exclude include = people_directory people_directory.* +exclude = + test + tests + doc + docs + resource + resources + example + examples [coverage:run] branch = True