Skip to content

Commit

Permalink
Merge pull request #1529 from UUDigitalHumanitieslab/feature/angular-17
Browse files Browse the repository at this point in the history
Feature/angular 17
  • Loading branch information
JeltevanBoheemen authored Jun 11, 2024
2 parents fe073d3 + 85e8793 commit 9d2b530
Show file tree
Hide file tree
Showing 40 changed files with 3,490 additions and 3,288 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
18.17.1
2 changes: 1 addition & 1 deletion backend/corpora/dutchannualreports/dutchannualreports.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def sources(self, start=min_date, end=max_date):
full_path = op.join(directory, filename)
file_path = op.join(rel_dir, filename)
image_path = op.join(
rel_dir, name + '.' + self.scan_image_type)
rel_dir, name + '.pdf')
if extension != '.xml':
logger.debug(self.non_xml_msg.format(full_path))
continue
Expand Down
2 changes: 1 addition & 1 deletion backend/corpora/dutchnewspapers/dutchnewspapers_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def sources(self, start=min_date, end=max_date):
self.definition_pattern.search(filename)), None)
if not definition_file:
continue
meta_dict = self.metadata_from_xml(definition_file, tags=[
meta_dict = self._metadata_from_xml(definition_file, tags=[
"title",
"date",
"publisher",
Expand Down
2 changes: 1 addition & 1 deletion backend/corpora/ecco/ecco.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def sources(self, start=min_date, end=max_date):
'Volume'
]

meta_dict = self.metadata_from_xml(
meta_dict = self._metadata_from_xml(
full_path, tags=meta_tags)
meta_dict['id'] = record_id
meta_dict['category'] = category
Expand Down
2 changes: 1 addition & 1 deletion backend/media/image_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def retrieve_pdf(path):
'''
Retrieve the pdf as a file object.
'''
pdf = PdfReader(path, 'rb')
pdf = PdfReader(path)

return pdf

Expand Down
13 changes: 9 additions & 4 deletions frontend/.browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
defaults
last 2 Chrome versions
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
125 changes: 58 additions & 67 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,60 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/no-output-on-prefix": "off",
"@angular-eslint/component-selector": [
"error",
{
"type": ["element", "attribute"],
"prefix": "ia",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "ia"
}
],
"@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "objectLiteralProperty",
"format": ["camelCase", "snake_case", "PascalCase"],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"id-blacklist": "off",
"no-underscore-dangle": "off",
"quotes": [
"warn",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
"root": true,
"ignorePatterns": ["projects/**/*"],
"plugins": ["@angular-eslint", "@typescript-eslint"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/no-output-on-prefix": "off",
"@angular-eslint/component-selector": [
"error",
{
"type": ["element", "attribute"],
"prefix": "ia",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "ia"
}
],
"@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "objectLiteralProperty",
"format": ["camelCase", "snake_case", "PascalCase"],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"id-blacklist": "off",
"no-underscore-dangle": "off",
"quotes": [
"warn",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
113 changes: 59 additions & 54 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,77 +31,82 @@
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
"namedChunks": true,
"allowedCommonJsDependencies": [
"lodash",
"moment",
"ng2-pdf-viewer",
"iv-viewer",
"smoothscroll-polyfill",
"file-saver",
"pdfjs-dist"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"git": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.git.ts"
}
]
}
},
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"git": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.git.ts"
}
]
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {},
"options": {},
"configurations": {
"production": {
"browserTarget": "frontend:build:production"
},
"development": {
"browserTarget": "frontend:build"
}
},
"defaultConfiguration": "development"
"production": {
"buildTarget": "frontend:build:production"
},
"development": {
"buildTarget": "frontend:build"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "frontend:build"
"buildTarget": "frontend:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"node_modules/primeicons/primeicons.css",
"node_modules/primeng/resources/primeng.css",
"src/styles.scss"
],
"assets": ["src/assets"]
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
}
},
"lint": {
Expand All @@ -113,7 +118,6 @@
}
}
},
"defaultProject": "frontend",
"schematics": {
"@schematics/angular:component": {
"prefix": "ia",
Expand All @@ -124,6 +128,7 @@
}
},
"cli": {
"defaultCollection": "@angular-eslint/schematics"
"schematicCollections": ["@angular-eslint/schematics"],
"analytics": false
}
}
Loading

0 comments on commit 9d2b530

Please sign in to comment.