Skip to content

Commit

Permalink
fix: Try upgrading setuptools again and remove old react frontend (#2245
Browse files Browse the repository at this point in the history
)

* fix: Try upgrading setuptools again and remove old react frontend

* Remove rogue F

* Bring back node for Cypress
  • Loading branch information
faucomte97 committed Dec 13, 2023
1 parent 4922e37 commit 5e1c186
Show file tree
Hide file tree
Showing 68 changed files with 501 additions and 12,116 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,11 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies and build frontend
- name: Install dependencies
run: |
pip install pipenv
pipenv install --dev --system
yarn --frozen-lockfile
- name: Build frontend
run: |
cd portal_frontend
yarn --frozen-lockfile
yarn build
mv build ../portal/frontend
- name: Collect static
run: python example_project/manage.py collectstatic --noinput --settings portal_test_settings
- name: Run Python tests
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/publish-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,10 @@ jobs:
with:
python-version: "3.8"
architecture: "x64"
- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install pip requirements
run: |
pip install pipenv
pipenv install --dev --system
- name: "Install, build and move frontend"
run: |
cd portal_frontend
yarn --frozen-lockfile
yarn build
mv build ../portal/frontend
- name: Release codeforlife-portal
uses: relekang/[email protected]
with:
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install Node dependencies
run: npm install --prefix portal_frontend
- name: Run Snyk to check for vulnerabilities in Node.js
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor --file=portal_frontend/package.json --package-manager=npm --project-name="portal_frontend"
- name: Setup python-version
uses: actions/setup-python@v4
with:
Expand Down
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ codeforlife_portal.egg-info
build/
# .vscode/
dist/
node_modules

# Cypress generated folder
/cypress

# react frontend
/portal/frontend

# tunnel software
ngrok

.venv
.venv
642 changes: 494 additions & 148 deletions Pipfile.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions example_project/portal_test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
LANGUAGE_CODE = "en-gb"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = "/static/"
STATICFILES_DIRS = [os.path.join(BASE_DIR, "portal/frontend/static"), os.path.join(BASE_DIR, "portal/static")]
STATICFILES_DIRS = [os.path.join(BASE_DIR, "portal/static")]
MEDIA_ROOT = os.path.join(STATIC_ROOT, "email_media/")

WSGI_APPLICATION = "wsgi.application"
Expand Down Expand Up @@ -169,8 +169,7 @@
"common.context_processors.cookie_management_enabled",
"portal.context_processors.process_newsletter_form",
]
},
"DIRS": [os.path.join(BASE_DIR, "portal/frontend")],
}
}
]

Expand Down
5 changes: 2 additions & 3 deletions example_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
LANGUAGE_CODE = "en-gb"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = "/static/"
STATICFILES_DIRS = [os.path.join(BASE_DIR, "portal/frontend/static"), os.path.join(BASE_DIR, "portal/static")]
STATICFILES_DIRS = [os.path.join(BASE_DIR, "portal/static")]
MEDIA_ROOT = os.path.join(STATIC_ROOT, "email_media/")
SECRET_KEY = "not-a-secret"

Expand Down Expand Up @@ -132,8 +132,7 @@
"common.context_processors.cookie_management_enabled",
"portal.context_processors.process_newsletter_form",
]
},
"DIRS": [os.path.join(BASE_DIR, "portal/frontend")],
}
}
]

Expand Down
8 changes: 0 additions & 8 deletions portal/reactTestSpace.py

This file was deleted.

30 changes: 0 additions & 30 deletions portal/tests/test_react_test_space.py

This file was deleted.

2 changes: 0 additions & 2 deletions portal/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
)
from portal.helpers.ratelimit import school_student_key
from portal.helpers.regexes import ACCESS_CODE_REGEX, JWT_REGEX
from portal.reactTestSpace import reactTestSpace
from portal.views.about import about, getinvolved, contribute
from portal.views.admin import AdminChangePasswordDoneView, AdminChangePasswordView
from portal.views.aimmo.dashboard import StudentAimmoDashboard, TeacherAimmoDashboard
Expand Down Expand Up @@ -345,7 +344,6 @@
]
),
),
url(r"^reactTestSpace/", reactTestSpace, name="reactTestSpace"),
url(r"^codingClub/$", coding_club, name="codingClub"),
url(r"^codingClub/(?P<student_pack_type>[3-4])/", download_student_pack, name="download_student_pack"),
url(r"^removeFakeAccounts/", RemoveFakeAccounts.as_view(), name="remove_fake_accounts"),
Expand Down
21 changes: 0 additions & 21 deletions portal_frontend/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions portal_frontend/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion portal_frontend/.prettierrc.json

This file was deleted.

46 changes: 0 additions & 46 deletions portal_frontend/README.md

This file was deleted.

52 changes: 0 additions & 52 deletions portal_frontend/package.json

This file was deleted.

Binary file removed portal_frontend/public/favicon.ico
Binary file not shown.
47 changes: 0 additions & 47 deletions portal_frontend/public/index.html

This file was deleted.

25 changes: 0 additions & 25 deletions portal_frontend/public/manifest.json

This file was deleted.

4 changes: 0 additions & 4 deletions portal_frontend/public/portal.css

This file was deleted.

3 changes: 0 additions & 3 deletions portal_frontend/public/robots.txt

This file was deleted.

3 changes: 0 additions & 3 deletions portal_frontend/src/@cfl/colors/index.ts

This file was deleted.

Loading

0 comments on commit 5e1c186

Please sign in to comment.