Skip to content
Draft
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
61 changes: 61 additions & 0 deletions .github/.github/ISSUE_TEMPLATE/a11y_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: Accessibility Report
about: Tell us about something that is not accessible.
title: ''
labels: a11y
assignees: ''
---
## Report Accessibility Issue
### Describe the inaccessible feature
A clear and concise description of what cannot be accessed.

### Which users are impacted?
(delete as applicable)
1. Everyone
2. Readers (i.e. those accessing the published site but not logging in to Janeway)
3. All Janeway Users
4. Only some Janeway Workflows:
a. author
b. editor
c. reviewer
d. copyeditor
e. typesetter
f. proofreader
g. manager

### Assistive software or customised computer setup
Is this about an incompatibility with assistive software, hardware or accessibility settings? If so, please give details, including version numbers.

### Janeway version
The version of Janeway under which the issue was encountered.
If running off of master, please, indicate the current HEAD of the Janeway installation

### To Reproduce
Steps to reproduce:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Screenshots
If applicable, add screenshots to help explain your problem.

## Preferred Solution
A clear and concise description of what you would like to happen instead.

## Front-end Issues (only)
If the issue is front-end specific please add the following details:

### Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

### Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

## Additional context
Add any other context about the problem here.
44 changes: 44 additions & 0 deletions .github/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**Janeway version**
The version of Janeway under which the bug has been reproduced.
If running off of master, please, indicate the current HEAD of the Janeway installation

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

## Front-end Issues
If the issue is front-end specific please add the following details:

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
14 changes: 14 additions & 0 deletions .github/.github/ISSUE_TEMPLATE/documentation_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Documentation update
about: Suggest an update to Janeway Documentation
title: ''
labels: documentation
assignees: ''

---

**Describe the area of the documentation you would like updated/added.**
A clear and concise description of what the problem is. Ex. xyz is missing from the documentation

**Additional context**
Add any other context or screenshots about the request here.
20 changes: 20 additions & 0 deletions .github/.github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: new feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
41 changes: 41 additions & 0 deletions .github/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
build_and_test:
runs-on: ubuntu-latest

steps:
- name: Checkout the codebase
uses: actions/checkout@v4

- name: Set up python environments
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install all dependencies
run: |
python -m pip install --upgrade pip
pip install --src lib/ -r requirements.txt -r dev-requirements.txt

- name: Check code formatting with Ruff
run: |
echo "Running formatting check..."
ruff format --check .
echo "Formatting check completed."

- name: Run Django unit tests
run: |
export DB_VENDOR=sqlite
echo "Running unit tests"
python src/manage.py test
echo "Test run completed."

15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ on:
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout the codebase
uses: actions/checkout@v4

- name: Set up python environments
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: ${{ matrix.python-version }}

- name: Set up environment variables
run: |
Expand Down Expand Up @@ -51,3 +54,11 @@ jobs:
echo "Running unit tests"
python src/manage.py test
echo "Test run completed."

- name: Run python compatibility tests (tox)
run: |
echo "Installing tox gh actions package"
pip install tox-gh-actions
echo "Running tox tests"
tox
echo "Tox run completed."
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ format: ## Run the ruff formatter against the codebase
$(COMPOSE_CMD) run $(NO_DEPS) --entrypoint ruff --rm janeway-web format .
check: ## Runs janeway's test suit
bash -c "DB_VENDOR=sqlite make command CMD=test"
tox
tox: ## Runs python version tests with tox
$(COMPOSE_CMD) run --entrypoint=tox --rm janeway-web
migrate: ## Runs Django's migrate command
bash -c "make command CMD=migrate"
makemigrations: ## Runs Django's makemigrations command
Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ marshmallow
freezegun
snakeviz
django-browser-reload
tox
ruff
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ exclude = [
"src/foundationform",
"src/transform/cassius",
]
[tool.tox]
env_list = ["py39", "py310", "py311", "py312"]
[tool.tox.testenv]
commands = [
"python src/manage.py test"
]
[tool.tox.testenv.deps]
list = ["Django==4.2", "file:requirements.txt"]

[tool.ruff.format]
quote-style = "double"
Expand Down
6 changes: 3 additions & 3 deletions src/core/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_username_normalised(self):
"last_name": "Eve",
}
obj = models.Account.objects.create(**data)
self.assertEquals(obj.username, email.lower())
self.assertEqual(obj.username, email.lower())

def test_username_normalised_quick_form(self):
email = "[email protected]"
Expand All @@ -74,7 +74,7 @@ def test_username_normalised_quick_form(self):
}
form = forms.QuickUserForm(data=data)
acc = form.save()
self.assertEquals(acc.username, email.lower())
self.assertEqual(acc.username, email.lower())

def test_email_normalised(self):
email = "[email protected]"
Expand All @@ -83,7 +83,7 @@ def test_email_normalised(self):
"email": email,
}
obj = models.Account.objects.create(**data)
self.assertEquals(obj.email, expected)
self.assertEqual(obj.email, expected)

def test_no_duplicates(self):
email_a = "[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions src/review/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def test_shared_review_download_view(self):
download_url,
SERVER_NAME=self.journal_one.domain,
)
self.assertEquals(
self.assertEqual(
response.status_code,
404,
)
Expand All @@ -506,7 +506,7 @@ def test_shared_review_download_view(self):
download_url,
SERVER_NAME=self.journal_one.domain,
)
self.assertEquals(
self.assertEqual(
response.status_code,
200,
)
Expand All @@ -519,7 +519,7 @@ def test_shared_review_download_view(self):
download_url,
SERVER_NAME=self.journal_one.domain,
)
self.assertEquals(
self.assertEqual(
response.status_code,
403,
)
Expand Down
Loading