Skip to content

Commit

Permalink
Merge pull request #74 from clarin-eric/3.0.0-Release
Browse files Browse the repository at this point in the history
Prepare 3.0.0 release
  • Loading branch information
andmor- authored Oct 3, 2023
2 parents 5707521 + 0db1ead commit 3cf8a64
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 47 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
os: linux
dist: xenial
dist: bionic
language: python
python:
- "3.9"
- "3.11"
env:
global:
- DJANGO_SETTINGS_MODULE=centre_registry_project.settings
Expand All @@ -16,10 +16,10 @@ env:
- browserName='chrome' platformName='macOS 10.14' browserVersion='latest'
- browserName='chrome' platformName='Windows 11' browserVersion='latest'
- browserName='chrome' platformName='macOS 13' browserVersion='latest'
- browserName='firefox' platformName='Windows 10' browserVersion='70'
- browserName='firefox' platformName='macOS 10.14' browserVersion='70'
- browserName='firefox' platformName='Windows 11' browserVersion='70'
- browserName='firefox' platformName='macOS 13' browserVersion='70'
- browserName='firefox' platformName='Windows 10' browserVersion='78'
- browserName='firefox' platformName='macOS 10.14' browserVersion='78'
- browserName='firefox' platformName='Windows 11' browserVersion='78'
- browserName='firefox' platformName='macOS 13' browserVersion='78'
- browserName='firefox' platformName='Windows 10' browserVersion='latest'
- browserName='firefox' platformName='macOS 10.14' browserVersion='latest'
- browserName='firefox' platformName='Windows 11' browserVersion='latest'
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
## [3.0.0] - 03.10.2023

### Changed features
- Django 2.2.25 to 4.1.6
- Upgrade UI tests to Selenium 4
- Django 2.2.25 to 4.1.11
- Other updated dependencies:
- Selenium to 4.13.0
- Jsonschema to 4.19.1
- django-test-migrations to 1.3.0
- django-debug-toolbar 4.2.0
- lxml to 4.9.3
- Build config changed from setup.py to pyproject.toml
- Build backend from setuptools to poetry

Expand Down
4 changes: 2 additions & 2 deletions Centre-Registry-config/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "Centre-Registry-config"
description = "CLARIN Centre Registry Django project configuration"
version = "3.0.0-dev"
version = "3.0.0"
license = "../LICENSE.txt"
authors = [
"Beatriz Sanchez Bribian",
Expand Down Expand Up @@ -30,4 +30,4 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
centre-registry-app = "3.0.0-dev0"
centre-registry-app = "3.0.0"
2 changes: 1 addition & 1 deletion centre-registry-app/centre_registry/templates/UI/_spf.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load utils %}
{% block title %}SPF overview{% endblock title %}
{% block content %}
<p>Please visit <a href='//www.clarin.eu/spf'>this</a> page for more information about the
<p>Please visit <a href='//www.clarin.eu/spf'>the infornation page</a> about the CLARIN
<abbr title='Service Provider Federation'>SPF</abbr>, which CLARIN maintains to enable federated access to
resources.
</p>
Expand Down
64 changes: 39 additions & 25 deletions centre-registry-app/centre_registry/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver import Remote
from selenium.webdriver.chrome.options import Options as ChromeOptions
from selenium.webdriver.edge.options import Options as EdgeOptions
from selenium.webdriver.ie.options import Options as IeOptions
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.webdriver.safari.options import Options as SafariOptions
from selenium.webdriver.common.by import By
import http.client
import base64
Expand Down Expand Up @@ -30,44 +36,52 @@ class SystemTestCase(StaticLiveServerTestCase):
port = 9999

@classmethod
def setUpClass(cls):
# TODO: Replace Travis CI & Sauce Labs with generic testing code.
def setUpClass(self):
if is_ci:
from selenium.webdriver import Remote
hub_url = ("{username:s}:{access_key:s}@ondemand.us-west-1.saucelabs.com"
.format(
username=environ["SAUCE_USERNAME"],
access_key=environ["SAUCE_ACCESS_KEY"]))
desired_capabilities = {
"browserName": environ["browserName"],
"browserVersion": environ["browserVersion"],
"platformName": environ["platformName"],
"sauce:options": {
"name": "centre-registry_" + environ["TRAVIS_JOB_NUMBER"],
"build": environ["TRAVIS_BUILD_NUMBER"],
"tags": [environ["TRAVIS_PYTHON_VERSION"], "CI"],
"tunnelName": environ["TRAVIS_JOB_NUMBER"]
}


match environ["browserName"]:
case "firefox":
options = FirefoxOptions();
case "chrome":
options = ChromeOptions();
case "MicrosoftEdge":
options = EdgeOptions();
case "internet explorer":
options = IeOptions();
case "safari":
options = SafariOptions();

options.browser_version = environ["browserVersion"]
options.platform_name = environ["platformName"]
options.headless = True

sauce_options = {
"name": "centre-registry_" + environ["TRAVIS_JOB_NUMBER"],
"build": environ["TRAVIS_BUILD_NUMBER"],
"tags": [environ["TRAVIS_PYTHON_VERSION"], "CI"],
"tunnelName": environ["TRAVIS_JOB_NUMBER"]
}
cls.selenium = Remote(
desired_capabilities=desired_capabilities,
command_executor="https://{hub_url:s}/wd/hub"
.format(hub_url=hub_url))
options.set_capability('sauce:options', sauce_options)
self.selenium = Remote(command_executor="https://{hub_url:s}/wd/hub"
.format(hub_url=hub_url), options=options)
else:
cls.selenium = webdriver.Firefox()
super(SystemTestCase, cls).setUpClass()
self.selenium = webdriver.Firefox()
super(SystemTestCase, self).setUpClass()

@classmethod
def tearDownClass(cls):
super(SystemTestCase, cls).tearDownClass()
def tearDownClass(self):
super(SystemTestCase, self).tearDownClass()

if is_ci:
print ("SESSIONID: " + cls.selenium.session_id)
print ("SESSIONID: " + self.selenium.session_id)
pass_status = environ["TRAVIS_TEST_RESULT"] == '0'
set_test_status(cls.selenium.session_id, passed=pass_status)
set_test_status(self.selenium.session_id, passed=pass_status)

cls.selenium.quit()
self.selenium.quit()

def test_admin(self):
self.selenium.get(self.live_server_url + '/admin')
Expand Down
14 changes: 7 additions & 7 deletions centre-registry-app/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "centre_registry_app"
description = "CLARIN Centre Registry, a Django application. "
version = "3.0.0-dev"
version = "3.0.0"
license = "../LICENSE.txt"
authors = [
"Beatriz Sanchez Bribian",
Expand All @@ -26,14 +26,14 @@ homepage = "https://centres.clarin.eu/"
repository = "https://github.com/clarin-eric/Centre-Registry/"

[tool.poetry.dependencies]
Django = '4.1.6'
django-debug-toolbar = '3.8.1'
Django = '4.1.11'
django-debug-toolbar = '4.2.0'

[tool.poetry.group.test.dependencies]
lxml = '4.9.2'
selenium = '4.8.2'
jsonschema = '4.17.3'
django-test-migrations = '1.2.0'
lxml = '4.9.3'
selenium = '4.13.0'
jsonschema = '4.19.1'
django-test-migrations = '1.3.0'

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
8 changes: 4 additions & 4 deletions centre-registry-app/requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lxml==4.9.2
selenium==4.8.2
jsonschema==4.17.3
django-test-migrations==1.2.0
lxml==4.9.3
selenium==4.13.0
jsonschema==4.19.1
django-test-migrations==1.3.0

0 comments on commit 3cf8a64

Please sign in to comment.