Skip to content

Commit

Permalink
Merge branch 'main' into new_data_models
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 11, 2023
2 parents 190dff8 + 61e6f6c commit 15675af
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 128 deletions.
39 changes: 1 addition & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,44 +45,10 @@ jobs:
- name: 🧪 Test Code Units
run: pipenv run pytest

sync:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: 🛫 Checkout
uses: actions/checkout@v3

- name: 🐍 Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: 🛠 Install Dependencies
run: |
python -m pip install --upgrade pip
# pipenv-setup requires downgraded vistir: https://github.com/Madoshakalaka/pipenv-setup/issues/138
python -m pip install pipenv-setup[black]==3.2.0 vistir==0.6.1
- name: ⚙️ Configure Git
run: |
git config --local user.name cfl-bot
git config --local user.email [email protected]
- name: 🔄 Sync Setup Dependencies
run: |
pipenv-setup sync
git add setup.py
# Only commit and push if there are differences.
if ! git diff --staged --quiet; then
git commit -m "ci[setup]: sync dependencies [skip ci]"
git push
fi
release:
concurrency: release
runs-on: ubuntu-latest
needs: [sync]
needs: [test]
if: github.ref_name == 'main'
steps:
- name: 🛫 Checkout
Expand All @@ -91,9 +57,6 @@ jobs:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0

- name: 🔄 Sync Setup Dependencies
run: git pull

- name: 🐍 Set up Python
uses: actions/setup-python@v4
with:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

<!--next-version-placeholder-->

## v0.9.3 (2023-12-11)

### Fix

* Remove requirements sync ([#27](https://github.com/ocadotechnology/codeforlife-package-python/issues/27)) ([`fdc642f`](https://github.com/ocadotechnology/codeforlife-package-python/commit/fdc642f811dfe17a08607bf6030dfb38dabaa44f))

## v0.9.2 (2023-12-01)

### Fix
Expand Down
2 changes: 1 addition & 1 deletion codeforlife/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Do NOT set manually!
# This is auto-updated by python-semantic-release in the pipeline.
__version__ = "0.9.2"
__version__ = "0.9.3"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ upload_to_release = true

[tool.black]
line-length = 80
extend-exclude = "^/setup.py|^/codeforlife/user/migrations/"
extend-exclude = "^/codeforlife/user/migrations/"

[tool.pytest.ini_options]
env = ["DJANGO_SETTINGS_MODULE=manage"]
Expand Down
114 changes: 26 additions & 88 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
"""
© Ocado Group
Created on 11/12/2023 at 10:59:40(+00:00).
Setup the Code for Life package during installation.
"""

import json
import os
import typing as t

from setuptools import find_packages, setup

Expand All @@ -15,7 +20,26 @@
data_files, root_dir = [], os.path.dirname(__file__)
for dir_path, dir_names, file_names in os.walk(DATA_DIR):
rel_data_dir = os.path.relpath(dir_path, root_dir)
data_files += [os.path.join(rel_data_dir, file_name) for file_name in file_names]
data_files += [
os.path.join(rel_data_dir, file_name) for file_name in file_names
]

# Parse Pipfile.lock into strings.
install_requires: t.List[str] = []
with open("Pipfile.lock", "r", encoding="utf-8") as pipfile_lock:
packages: t.Dict[str, t.Dict[str, t.Any]] = json.load(pipfile_lock)[
"default"
]
for name, package in packages.items():
requirement = name
if "extras" in package:
requirement += f"[{','.join(package['extras'])}]"
if "version" in package:
requirement += package["version"]
if "markers" in package:
requirement += f"; {package['markers']}"
install_requires.append(requirement)


setup(
name="codeforlife",
Expand All @@ -31,92 +55,6 @@
data_files=[(str(DATA_DIR), data_files)],
package_data={"codeforlife": ["py.typed"]},
python_requires="==3.8.*",
# These will be synced with Pipfile by the pipeline.
# DO NOT edit these manually. Instead, update the Pipfile.
install_requires=[
"aimmo==2.10.6",
"asgiref==3.7.2; python_version >= '3.7'",
"attrs==23.1.0; python_version >= '3.7'",
"cachetools==5.3.1; python_version >= '3.7'",
"certifi==2023.7.22; python_version >= '3.6'",
"cfl-common==6.37.1",
"charset-normalizer==3.3.0; python_full_version >= '3.7.0'",
"click==8.1.7; python_version >= '3.7'",
"codeforlife-portal==6.37.1",
"defusedxml==0.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"diff-match-patch==20230430; python_version >= '3.7'",
"django==3.2.20",
"django-classy-tags==2.0.0",
"django-cors-headers==4.1.0",
"django-countries==7.3.1",
"django-csp==3.7",
"django-filter==23.2",
"django-formtools==2.2",
"django-import-export==3.3.1; python_version >= '3.8'",
"django-js-reverse==0.9.1",
"django-otp==1.0.2",
"django-phonenumber-field==6.4.0; python_version >= '3.7'",
"django-pipeline==2.0.8",
"django-preventconcurrentlogins==0.8.2",
"django-ratelimit==3.0.1; python_version >= '3.4'",
"django-recaptcha==2.0.6",
"django-sekizai==2.0.0",
"django-treebeard==4.3.1",
"django-two-factor-auth==1.13.2",
"djangorestframework==3.13.1",
"dnspython==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"et-xmlfile==1.1.0; python_version >= '3.6'",
"eventlet==0.31.0",
"flask==2.2.3",
"google-auth==2.23.3; python_version >= '3.7'",
"greenlet==3.0.0; python_version >= '3.7'",
"hypothesis==5.41.3; python_version >= '3.6'",
"idna==3.4; python_version >= '3.5'",
"importlib-metadata==4.13.0",
"itsdangerous==2.1.2; python_version >= '3.7'",
"jinja2==3.1.2; python_version >= '3.7'",
"kubernetes==26.1.0; python_version >= '3.6'",
"libsass==0.22.0; python_version >= '3.6'",
"markuppy==1.14",
"markupsafe==2.1.3; python_version >= '3.7'",
"more-itertools==8.7.0; python_version >= '3.5'",
"numpy==1.24.4; python_version >= '3.8'",
"oauthlib==3.2.2; python_version >= '3.6'",
"odfpy==1.4.1",
"openpyxl==3.1.2",
"pandas==2.0.3; python_version >= '3.8'",
"pgeocode==0.4.0; python_version >= '3.8'",
"phonenumbers==8.12.12",
"pillow==10.0.1; python_version >= '3.8'",
"pyasn1==0.5.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
"pyasn1-modules==0.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
"pydantic==1.10.7",
"pyhamcrest==2.0.2; python_version >= '3.5'",
"pyjwt==2.6.0; python_version >= '3.7'",
"pyotp==2.9.0",
"pypng==0.20220715.0",
"python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"pytz==2023.3.post1",
"pyyaml==5.4.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
"qrcode==7.4.2; python_version >= '3.7'",
"rapid-router==5.11.3",
"reportlab==3.6.13; python_version >= '3.7' and python_version < '4'",
"requests==2.31.0; python_version >= '3.7'",
"requests-oauthlib==1.3.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"rsa==4.9; python_version >= '3.6' and python_version < '4'",
"setuptools==62.1.0; python_version >= '3.7'",
"six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"sortedcontainers==2.4.0",
"sqlparse==0.4.4; python_version >= '3.5'",
"tablib[html,ods,xls,xlsx,yaml]==3.5.0; python_version >= '3.8'",
"typing-extensions==4.8.0; python_version >= '3.8'",
"tzdata==2023.3; python_version >= '2'",
"urllib3==2.0.6; python_version >= '3.7'",
"websocket-client==1.6.4; python_version >= '3.8'",
"werkzeug==3.0.0; python_version >= '3.8'",
"xlrd==2.0.1",
"xlwt==1.3.0",
"zipp==3.17.0; python_version >= '3.8'",
],
install_requires=install_requires,
dependency_links=[],
)

0 comments on commit 15675af

Please sign in to comment.