Skip to content

Commit

Permalink
Merge branch 'release/4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Sep 6, 2024
2 parents bfd904f + 0929187 commit cfc3afc
Show file tree
Hide file tree
Showing 686 changed files with 61,033 additions and 23,869 deletions.
15 changes: 15 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
last 2 ChromeAndroid versions
last 2 Chrome versions

last 2 iOS versions
last 2 Safari versions

last 2 Samsung versions

last 2 FirefoxAndroid versions
last 2 Firefox versions

last 2 OperaMobile versions
last 2 Opera versions

last 2 Edge versions
25 changes: 25 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**/.git*
.git/
.github/
.circleci/

docs/
infra/
node_modules/
var/

dev.env*
docker/database
docker/httpd
**/Dockerfile
**/.dockerignore
docker-bake.yml
docker-compose.yml
**/README.md
**/*.sql*
.justfile

appspec.yml
compose.yml

.files/*
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public/
node_modules/

17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'jsx-a11y', 'jest'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
],
rules: {
'@typescript-eslint/ban-ts-comment': [0],
},
env: {
'jest/globals': true,
},
};
27 changes: 0 additions & 27 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# We need node to install the JS dependencies used to build static assets.
# Because some unit tests use Django's test client to visit pages, we need
# to have JS and styles ready to be loaded on those pages or there will be
# errors.
# Uses the node version specified in package.json
- name: Setup node
uses: actions/setup-node@v4

# Basing the cache on the hash of the lockfile means that the cache should
# only ever be invalidated when we update package-lock.json, which happens
# as part of a release. For more info, see:
# https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows
- name: Cache node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-${{ hashFiles('package-lock.json') }}
npm-
- name: Install JS dependencies
run: npm ci

# Python version to use is stored in the .python-version file, which is the
# convention for pyenv (https://github.com/pyenv/pyenv)
# setup-python automatically picks up version from .python-version
Expand All @@ -80,9 +56,6 @@ jobs:
- name: Setup local_settings.py
run: python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> cdhweb/settings/local_settings.py

- name: Build static assets
run: python manage.py compress

- name: Run pytest
run: pytest --cov=./ --cov-config=.coveragerc --cov-report=xml

Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
local_settings.py
db.sqlite3
cdhweb.dbml
*.sql

# Media ignores
static
static/dist
static/
myapp/static
media
static/CACHE
sitemedia/fonts
**/.sass-cache/
cdhweb/static_src/fonts/**/*.woff2

# Vim stuff
*.pyc
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/*.html
**/*.ss
**/*.yml
node_modules
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"arrowParens": "always"
}
12 changes: 9 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGELOG
=========

4.0.0
-----
- Major overhaul, redesigned and rebuilt by Springload
- Dropped custom views and shift logic to using wagtail pages throughout
- numerous new wagtail blocks added
- frontend build now uses webpack, dropped django compressor

3.5.3
-----

Expand Down Expand Up @@ -30,7 +37,7 @@ Maintenance release: npm package updates
- updated to django 4.2 and wagtail 5.0
- updated to python 3.8+ (tested against 3.8-3.11)
- updated node version 18
- removed editoria11y v1 integration
- removed editoria11y v1 integration
- removed Percy visual testing workflow

3.4.4
Expand All @@ -41,7 +48,7 @@ Maintenance release: npm package updates
3.4.3
-----

* Update to include Humanities + Data Science Institute instructors and participants as
* Update to include Humanities + Data Science Institute instructors and participants as
affiliates and student affiliates
* bugfixes:
* correct Event ordering on semester archive pages
Expand Down Expand Up @@ -401,4 +408,3 @@ Other Content
Import
~~~~~~
* As an admin, I want an import of content from the previous version of the site so that all the information available on the old site is migrated to the new version.

35 changes: 35 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ Pull requests should be made against **develop**.
Development instructions
------------------------

Bare-metal
~~~~~~~~~~

Initial setup and installation:

- Recommended: create and activate a python 3.9 virtualenv::
Expand Down Expand Up @@ -72,6 +75,38 @@ You must add a ``SECRET_KEY`` value in your local settings.

- Install OpenCV dependencies (if necessary) for `wagtail image feature detection <https://docs.wagtail.io/en/stable/advanced_topics/images/feature_detection.html>`_

Docker (Springload)
~~~~~~~~~~~~~~~~~~~

- Download the **database**, **media dump** and **fonts** from https://drive.google.com/drive/u/0/folders/1B7qObEuO6sYJhVyE23RP8Tf0IbFCLlMf
- Copy the database dump into `docker/database`
- Extract the media into `media`

tar -xvzf path_to_file.tar.gz -C media

- Move the font files into `static_src/fonts`
- Copy cdhweb/settings/local_settings.py.docker-sample to cdhweb/settings/local_settings.py
- Run `docker-compose up`

Frontend (Springload)
~~~~~~~~~~~~~~~~~~~~~

The frontend uses webpack and npm.

First, make sure you're using the correct node version:

nvm use

If it tells you to install a new version, do so. Then run ``nvm use`` again.

Install dependencies:

npm install

Then to run the site in development mode locally:

npm start

Setup pre-commit hooks
~~~~~~~~~~~~~~~~~~~~~~

Expand Down
7 changes: 7 additions & 0 deletions audit-ci.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// $schema provides code completion hints to IDEs.
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
"moderate": true,
"allowlist": [
]
}
14 changes: 14 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Used by Jest and others
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
[
'@babel/preset-react',
{
runtime: 'automatic',
useBuiltIns: true,
},
],
],
};
8 changes: 1 addition & 7 deletions cdhweb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
__version_info__ = (3, 5, 3, None)


# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = ".".join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += "-%s" % (__version_info__[-1],)
__version__ = "4.0.0"


# context processor to add version to the template environment; can be
Expand Down
Loading

0 comments on commit cfc3afc

Please sign in to comment.