Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/ci-django-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: ci-django-tests

on: [pull_request]

jobs:

django_migrations:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.12]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Run Tests
run: |
cd django
mv core/local_settings.test.py core/local_settings.py
python manage.py makemigrations --check --dry-run

django_tests:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.12]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Run Tests
run: |
cd django
mv core/local_settings.test.py core/local_settings.py
python manage.py migrate
coverage run manage.py test
coverage report
39 changes: 39 additions & 0 deletions .github/workflows/ci-pa11y.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ci-accessibility-tests

on: [pull_request]

jobs:
accessibility_tests:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.12]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Install node dependencies
run: |
npm install jest jest-environment-node puppeteer pa11y
npx puppeteer browsers install chrome
- name: Run Tests
run: |
cd django
mv core/local_settings.test.py core/local_settings.py
python manage.py migrate
python manage.py runserver & sleep 5
npx jest pa11y.test.js
86 changes: 86 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: linting

on: [pull_request]

jobs:
ruff:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.12]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install ".[lint]"
- name: Run Ruff
run: |
ruff --version
ruff check .

curlylint:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[lint]"
- name: Run curlylint
run: |
curlylint --verbose .

eslint:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: |
npm i eslint
npm i globals
- name: Run eslint
run: |
node_modules/eslint/bin/eslint.js . --ignore-pattern '*.mjs'

stylelint:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: |
npm i stylelint-config-standard
npm i @stylistic/stylelint-plugin
- name: Run Stylelint
run: |
node_modules/stylelint/bin/stylelint.mjs .
102 changes: 102 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@

###################### Project-specific Ignore Paths ######################

venv/
private/
*.sqlite3
django/media/
django/static/
node_modules/
accessibility_reports/


###################### Django Templated gitignore paths ######################
# Taken from: from https://github.com/jpadilla/django-project-template/blob/master/.gitignore


### OSX ###
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
coverage_html_report/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Sphinx documentation
docs/_build/

# PyBuilder
target/


### Django ###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py

.env
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2026 BEAR Research Software Group
Copyright (c) 2026 University of Birmingham

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ARTEMIS

This project is a Django-based website created by the Research Software Group.


## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Installing

#### Using virtualenv

To run this project, you're required to have the following software installed on your machine:

* Python 3 (for specific Python 3 version please see the [Django documentation](https://www.djangoproject.com/))
* pip
* virtualenv

The project dependencies are specified in requirements.txt

* cd into project directory
* create a virtualenv
* run `pip install .["lint","test"]`


## Built With

* [Django](https://www.djangoproject.com/) - The Python web framework used

## License

See the [LICENSE.md](LICENSE.md) file for details
Loading
Loading