Skip to content

Commit

Permalink
Merge 78580bf into ee6bd48
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Oct 9, 2023
2 parents ee6bd48 + 78580bf commit 32b07ba
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for a new or extended feature in RDMO
title: ''
labels: 'type: feature request'
labels: 'type:feature-request'
assignees: ''

---
Expand Down
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- These comments are hidden when you submit the pull request, so you do not need to remove them. -->

<!--- Provide a general summary of your changes in the Title above --->

## Description
Expand Down
25 changes: 9 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
cache: pip
- run: python -m pip install --upgrade pip setuptools wheel
- run: python -m pip install -e .[dev]
Expand All @@ -50,19 +50,12 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
db-backend: [mysql, postgres]
# test Python 3.12 already using 3.12-dev
# release is scheduled for 2023-10-02 (https://peps.python.org/pep-0693/)
# when released: replace "python-version: ['3.8', '3.11']" with python-version: ['3.8', '3.12']
include:
- python-version: '3.12-dev'
db-backend: postgres

name: "Test (Python: ${{ matrix.python-version }}, DB: ${{ matrix.db-backend }})"
needs: lint
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -121,10 +114,10 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
cache: pip
- run: python -Im pip install -e .[dev]
- run: python -Ic 'import rdmo; print(rdmo.__version__)'
Expand All @@ -133,10 +126,10 @@ jobs:
name: Test installation of optional-dependencies
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
cache: pip
- name: Install os requirements for python-ldap
run: |
Expand All @@ -152,7 +145,7 @@ jobs:
needs: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ __pycache__
*~
*.swp
.DS_Store
.ruff_cache

env
env2
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ repos:
exclude: \.dot$
- id: debug-statements
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.284
rev: v0.0.291
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.41.0
rev: v8.50.0
hooks:
- id: eslint
args: [--fix, --color]
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ authors:
given-names: Enke
orcid: https://orcid.org/0000-0002-2366-8316

title: Research Data Management Organizer (RDMO)
title: Research Data Management Organiser (RDMO)
doi: 10.5281/zenodo.596581
license: Apache-2.0
repository-code: https://github.com/rdmorganiser/rdmo
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 3 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies = [

[project.optional-dependencies]
allauth = [
"django-allauth~=0.56.1",
"django-allauth~=0.57.0",
]
ci = [
"coveralls~=3.3",
Expand All @@ -82,10 +82,7 @@ mysql = [
"mysqlclient~=2.2",
]
postgres = [
# once python 3.12 is officially released, the psycopg team will release a psycopg-binary for it.
# replace these two lines with "psycopg[binary]~=3.1"
"psycopg[binary]~=3.1; python_version<'3.12'",
"psycopg2-binary~=2.9; python_version>='3.12'",
"psycopg[binary]~=3.1",
]
pytest = [
"pytest~=7.4",
Expand Down Expand Up @@ -114,11 +111,6 @@ exclude = ["*assets*", "*tests*"]
[tool.setuptools.dynamic]
version = {attr = "rdmo.__version__"}

[tool.black]
line-length = 120
skip-string-normalization = true
target_version = ["py38", "py39", "py310", "py311"]

[tool.ruff]
target-version = "py38"
line-length = 120
Expand Down Expand Up @@ -201,6 +193,7 @@ filterwarnings = [

[tool.coverage.run]
source = ["rdmo"]
branch = true
parallel = true

[tool.coverage.report]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% load i18n %}

<a href="" class="close remove-set" tabindex="-1"
title="{% blocktrans with name='{$ page.verbose_name $}' %}Remove {{ name }}{% endblocktrans %}"
ng-click="service.openValueSetDeleteModal(page, valueset.set_prefix, valueset.set_index)"
ng-hide="!page.is_collection || service.project.read_only">
title="{% blocktrans with name='{$ questionset.verbose_name $}' %}Remove {{ name }}{% endblocktrans %}"
ng-click="service.openValueSetDeleteModal(questionset, valueset.set_prefix, valueset.set_index)"
ng-hide="!questionset.is_collection || service.project.read_only">

<i class="fa fa-times" aria-hidden="true"></i>
</a>
82 changes: 5 additions & 77 deletions testing/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
elif GITHUB_DB_BACKEND == 'postgres':
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'rdmo',
'USER': 'postgres_user',
'PASSWORD': 'postgres_password',
Expand Down Expand Up @@ -74,6 +74,10 @@
]
EMAIL_RECIPIENTS_INPUT = True

OPTIONSET_PROVIDERS = [
('simple', _('Simple provider'), 'rdmo.options.providers.SimpleProvider')
]

PROJECT_ISSUE_PROVIDERS = [
('github', _('GitHub'), 'rdmo.projects.providers.GitHubIssueProvider')
]
Expand All @@ -82,79 +86,3 @@
'client_id': '',
'client_secret': ''
}

'''
LOGGING
'''
LOGGING_DIR = BASE_DIR / 'log'
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
},
'require_debug_true': {
'()': 'django.utils.log.RequireDebugTrue'
}
},
'formatters': {
'default': {
'format': '[%(asctime)s] %(levelname)s: %(message)s'
},
'name': {
'format': '[%(asctime)s] %(levelname)s %(name)s: %(message)s'
},
'console': {
'format': '[%(asctime)s] %(message)s'
},
'verbose': {
'format': '%(asctime)s [%(levelname)s] %(filename)s %(lineno)d: %(message)s',
'datefmt': '%H:%M:%S'
},
'fullverbose': {
'format': '%(asctime)s [%(levelname)s] %(pathname)s %(lineno)d: %(message)s'
},
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'error_log': {
'level': 'ERROR',
'class': 'logging.FileHandler',
'filename': LOGGING_DIR / 'rdmo_error.log',
'formatter': 'default'
},
'rdmo_log': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': LOGGING_DIR / 'rdmo.log',
'formatter': 'fullverbose'
},
'console': {
'level': 'DEBUG',
'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
'formatter': 'console'
}
},
'loggers': {
'django': {
'handlers': ['console'],
'level': 'INFO',
},
'django.request': {
'handlers': ['mail_admins', 'error_log'],
'level': 'ERROR',
'propagate': True
},
'rdmo': {
'handlers': ['rdmo_log'],
'level': 'DEBUG',
'propagate': False
}
}
}

0 comments on commit 32b07ba

Please sign in to comment.