Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NaturalHistoryMuseum/ckanext-contact
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.4
Choose a base ref
...
head repository: NaturalHistoryMuseum/ckanext-contact
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jan 31, 2023

  1. Copy the full SHA
    7c46e9b View commit details
  2. merge: PR #28 from dev

    alycejenni authored Jan 31, 2023
    Copy the full SHA
    e5a1dc6 View commit details
  3. Copy the full SHA
    706b109 View commit details

Commits on Feb 17, 2023

  1. Copy the full SHA
    8d64b15 View commit details
  2. Copy the full SHA
    41059f1 View commit details
  3. Copy the full SHA
    9c23cb1 View commit details
  4. Copy the full SHA
    0f7e9fe View commit details

Commits on Feb 20, 2023

  1. merge: PR #30 from dev

    Weekly release 2023-02-20
    alycejenni authored Feb 20, 2023
    Copy the full SHA
    91cda49 View commit details
  2. Copy the full SHA
    1c99c0e View commit details

Commits on Mar 28, 2023

  1. feat: allow contact emails to be sent to multiple recipients

    the mail dict keys "recipient_email" and "recipient_name" can now be set to lists of strings instead of just single string values. When this is detected, an individual email is sent to each address present. This isn't ideal, but it's the best we can do without changing CKAN.
    jrdh committed Mar 28, 2023
    Copy the full SHA
    02065e6 View commit details
  2. Merge pull request #31 from NaturalHistoryMuseum/josh/send_multiple_e…

    …mails
    
    feat: allow contact emails to be sent to multiple recipients
    jrdh authored Mar 28, 2023
    Copy the full SHA
    076572c View commit details

Commits on Mar 31, 2023

  1. feat: allow users to specify a subject line in their contact emails

    A subject field is now shown in the contact form, allowing users to specify a custom subject instead of the default one. This creates an order of priority for subject line contents - first user defined, then config defined, then the default defined in the build_subject function signature. The logic goes through each of these options until a valid value is found and then this is used as the subject for the email. The email field in the contact form is completely optional and no validation is done on it.
    jrdh committed Mar 31, 2023
    Copy the full SHA
    8f9d8d9 View commit details
  2. Copy the full SHA
    2eb645b View commit details
  3. Copy the full SHA
    7d7f587 View commit details
  4. test: fix a test

    jrdh committed Mar 31, 2023
    Copy the full SHA
    a88a001 View commit details

Commits on Apr 3, 2023

  1. merge: PR #33 from dev

    Weekly release 2023-04-03
    alycejenni authored Apr 3, 2023
    Copy the full SHA
    49a2008 View commit details
  2. Copy the full SHA
    d3df795 View commit details

Commits on Apr 4, 2023

  1. Merge pull request #32 from NaturalHistoryMuseum/josh/allow_user_subject

    feat: allow users to specify a subject line in their contact emails
    jrdh authored Apr 4, 2023
    Copy the full SHA
    5e26af3 View commit details
  2. Copy the full SHA
    d731f17 View commit details
  3. Copy the full SHA
    0245fb3 View commit details
  4. Merge pull request #34 from NaturalHistoryMuseum/josh/subject_prefix

    Add prefix to subject from config
    jrdh authored Apr 4, 2023
    Copy the full SHA
    3da180a View commit details
  5. Copy the full SHA
    b257a3a View commit details
  6. fix: expect no trailing space in the prefix from config

    The setting in the ini file can't have a trailing space and there's no way of including it using quotes, so just add one always if we have a prefix set.
    jrdh committed Apr 4, 2023
    Copy the full SHA
    dda5db2 View commit details
  7. Merge pull request #35 from NaturalHistoryMuseum/josh/subject_prefix

    fix: expect no trailing space in the prefix from config
    jrdh authored Apr 4, 2023
    Copy the full SHA
    c448af5 View commit details
  8. Copy the full SHA
    8ef010c View commit details
  9. Copy the full SHA
    c58da00 View commit details
  10. Merge pull request #37 from NaturalHistoryMuseum/josh/fix-docker-post…

    …gres-start-error
    
    Update docker-compose config to fix db issue
    jrdh authored Apr 4, 2023
    Copy the full SHA
    4679e20 View commit details

Commits on Apr 11, 2023

  1. merge: PR #38 from dev

    Weekly release 2023-04-11
    alycejenni authored Apr 11, 2023
    Copy the full SHA
    5c752d8 View commit details
  2. Copy the full SHA
    1ae78e1 View commit details

Commits on Jul 11, 2023

  1. docs: update logos

    alycejenni committed Jul 11, 2023
    Copy the full SHA
    cc17eae View commit details
  2. Copy the full SHA
    c288dbd View commit details

Commits on Jul 17, 2023

  1. merge: PR #41 from dev

    Weekly release 2023-07-17
    alycejenni authored Jul 17, 2023
    Copy the full SHA
    cc19e67 View commit details
  2. Copy the full SHA
    36d7e3e View commit details

Commits on Sep 29, 2023

  1. Copy the full SHA
    014fb48 View commit details
  2. chore: add citation file

    alycejenni committed Sep 29, 2023
    Copy the full SHA
    998f121 View commit details
  3. chore: add code of conduct

    alycejenni committed Sep 29, 2023
    Copy the full SHA
    3a916ba View commit details
  4. Copy the full SHA
    26b5339 View commit details
  5. Copy the full SHA
    1c7b544 View commit details

Commits on Oct 2, 2023

  1. Copy the full SHA
    9973420 View commit details
  2. Copy the full SHA
    f310fe8 View commit details
  3. Copy the full SHA
    dd9a16e View commit details
  4. merge: PR #44 from dev

    Weekly release 2023-10-02
    alycejenni authored Oct 2, 2023
    Copy the full SHA
    22a61f2 View commit details

Commits on Nov 23, 2023

  1. Copy the full SHA
    8518647 View commit details
  2. Copy the full SHA
    c7aaabe View commit details

Commits on Dec 4, 2023

  1. Copy the full SHA
    9a77134 View commit details
  2. Copy the full SHA
    a4ffe25 View commit details

Commits on Dec 11, 2023

  1. merge: PR #47 from dev

    Weekly release 2023-12-11
    alycejenni authored Dec 11, 2023
    Copy the full SHA
    f346c1b View commit details

Commits on Jan 3, 2024

  1. feat: check provided email address with pyisemail

    also adds a config option to turn it off, if necessary
    
    Closes: #48
    alycejenni committed Jan 3, 2024
    Copy the full SHA
    64b4a9e View commit details
  2. Copy the full SHA
    5c6460f View commit details
  3. Copy the full SHA
    5e43534 View commit details
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [ ] I have read the [section on commits and pull requests](https://github.com/NaturalHistoryMuseum/ckanext-contact/blob/main/CONTRIBUTING.md#commits-and-pull-requests) in `CONTRIBUTING.md`


Describe your changes, tagging relevant issues where possible.
5 changes: 3 additions & 2 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Support

## Documentation
- [ckanext-contact documentation](https://ckanext-contact.readthedocs.io)
- [Our API documentation](https://naturalhistorymuseum.github.io/dataportal-docs)
- [Official CKAN documentation](http://docs.ckan.org/en/latest)

## Issues
- [Issues for ckanext-contact](https://github.com/NaturalHistoryMuseum/ckanext-contact/issues)
- [The NHM on Github](https://github.com/NaturalHistoryMuseum)
- [General issue tracker](https://github.com/NaturalHistoryMuseum/data-portal-issues/issues)
- [Our CKAN extensions](https://github.com/search?q=topic%3Ackan+org%3ANaturalHistoryMuseum&type=repositories) (for more specific issues)
- [Our CKAN extensions](https://github.com/search?q=topic:ckan+org:NaturalHistoryMuseum&type=repositories) (for more specific issues)

## Contact Us
- [Gitter](https://gitter.im/nhm-data-portal/lobby)
- [Email _data@nhm.ac.uk_](mailto:data@nhm.ac.uk)
- [Twitter](https://twitter.com/nhm_data)
58 changes: 0 additions & 58 deletions .github/nhm-logo.svg

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ on:

jobs:
bump-version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
name: Bump version and create changelog
runs-on: ubuntu-latest
name: "Bump version and create changelog"
if: "!startsWith(github.event.head_commit.message, 'bump:')"
steps:
- name: Check out
uses: actions/checkout@v3
- name: Checkout source code
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
27 changes: 27 additions & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Validate pull requests

on:
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
validate-commits:
name: Validate commit messages
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Check commit message format
uses: webiny/action-conventional-commits@v1.3.0
with:
allowed-commit-types: 'feat,fix,refactor,perf,docs,style,test,build,ci,chore,new,patch,revert,ui,merge'
pre-commit:
name: Run pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
9 changes: 4 additions & 5 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -10,17 +10,16 @@ permissions:

jobs:
deploy:
name: Deploy package to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Checkout source code
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
27 changes: 27 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Sync branches

on:
push:
branches:
- main

jobs:
sync-branches:
name: Sync dev and patch branches to latest commit
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Sync dev branch
uses: connor-baer/action-sync-branch@main
with:
branch: dev
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Sync patch branch
uses: connor-baer/action-sync-branch@main
with:
branch: patch
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/main.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -3,19 +3,19 @@ name: Tests
on:
push:
workflow_dispatch:
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
test:
name: Run tests
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v3

uses: actions/checkout@v4
- name: Build images
run: docker-compose build

run: docker compose build
- name: Run tests
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: docker-compose run -e COVERALLS_REPO_TOKEN ckan bash /opt/scripts/run-tests.sh -c ckanext.contact
run: docker compose run -e COVERALLS_REPO_TOKEN ckan bash /opt/scripts/run-tests.sh -c ckanext.contact
30 changes: 19 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
exclude: /(vendor|dist)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: detect-private-key
- id: end-of-file-fixer
- id: name-tests-test
args: ["--pytest-test-first"]
args: ['--pytest-test-first']
exclude: ^tests/helpers/
- id: trailing-whitespace
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.37.0
rev: v3.30.0
hooks:
- id: commitizen
additional_dependencies: ["cz-nhm"]
- repo: https://github.com/psf/black
rev: 22.10.0
additional_dependencies: ['cz-nhm']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
hooks:
- id: black
- id: ruff
args: [ '--fix', '--select', 'I', '--select', 'F401', '--fix-only' ]
- id: ruff-format
- repo: https://github.com/PyCQA/docformatter
rev: v1.5.0
rev: eb1df34
hooks:
- id: docformatter
# these can't be pulled directly from the config atm, not sure why
args: ["-i", "--wrap-summaries=88", "--wrap-descriptions=88",
"--pre-summary-newline", "--make-summary-multi-line"]
args: [ '-i', '--config', './pyproject.toml' ]
additional_dependencies: ['tomli']
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [ javascript, vue, less, sass, scss, css ]
args: [ '--single-quote' ]
5 changes: 5 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
install:
- requirements: docs/requirements.txt
126 changes: 126 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,131 @@
# Changelog

## v2.4.3 (2024-11-04)

### Docs

- use variable logo based on colour scheme
- fix tests badge tests workflow file was renamed

## v2.4.2 (2024-11-04)

### Docs

- standardise returns field

### Style

- automatic reformat auto reformat with ruff/docformatter/prettier after config changes

### Build System(s)

- remove version from docker compose file version specifier is deprecated

### CI System(s)

- fix python setup action version
- add merge to valid commit types
- add docformatter args and dependency docformatter currently can't read from pyproject.toml without tomli
- only apply auto-fixes in pre-commit F401 returns linting errors as well as auto-fixes, so this disables the errors and just applies the fixes
- update tool config update pre-commit repo versions and switch black to ruff
- add pull request validation workflow new workflow to check commit format and code style against pre-commit config
- update workflow files standardise format, change name of tests file

### Chores/Misc

- add pull request template
- update tool details in contributing guide

## v2.4.1 (2024-08-20)

## v2.4.0 (2024-01-15)

### Feature

- check provided email address with pyisemail

### Fix

- remove unnecessary markdown message in request field

### Style

- fix run-on sentence

### Chores/Misc

- add build section to read the docs config
- add regex for version line in citation file
- add citation.cff to list of files with version
- add contributing guidelines
- add code of conduct
- add citation file
- update support.md links

## v2.3.1 (2023-07-17)

### Docs

- update logos

## v2.3.0 (2023-04-11)

### Feature

- add a prefix to email subject when it's provided in the config
- allow users to specify a subject line in their contact emails

### Fix

- expect no trailing space in the prefix from config

### Refactor

- move tests into unit subdir

### Docs

- add the new prefix option to the docs

### Tests

- fix a test
- add additional tests for the ne subject changes

### Build System(s)

- fix postgres not loading when running tests in docker

### Chores/Misc

- add action to sync branches when commits are pushed to main

## v2.2.0 (2023-04-03)

### Feature

- allow contact emails to be sent to multiple recipients

## v2.1.6 (2023-02-20)

### Docs

- fix api docs generation script

### Style

- reformat with prettier

### Chores/Misc

- small fixes to align with other extensions

## v2.1.5 (2023-01-31)

### Docs

- **readme**: change logo url from blob to raw

## v2.1.4 (2023-01-31)

### Docs
Loading