Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates application structure #10

Merged
merged 14 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
[
"@babel/preset-env"
]
]
}
10 changes: 10 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[production staging]
>5%
last 2 versions
Firefox ESR
not ie < 11

[development]
last 1 chrome version
last 1 firefox version
last 1 edge version
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.eslintrc.js
63 changes: 63 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
module.exports = {
"extends": [
"eslint:recommended",
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
],
"root": true,
"env": {
"browser": true,
"es6": true,
"node": true
},
"parser": "vue-eslint-parser",
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module",
"requireConfigFile": false,
"parser": {
"ts": "@typescript-eslint/parser"
}
},
"globals": {
"define": false,
"require": false,
"window": false,
"console": false,
"history": false,
"location": false,
"Promise": false,
"setTimeout": false,
"URL": false,
"URLSearchParams": false,
"fetch": false
},
"rules": {
"semi": ["error", "always"],
},
"overrides": [
{
"files": [ "*.vue" ],
"rules": {
"vue/html-indent": [2, 4],
}
},
{
"files": [ "*.js" ],
"rules": {
"indent": ["error", 4],
"space-before-function-paren": ["error", "never"],
"no-extra-boolean-cast": 0, // 0=silence, 1=warning, 2=error
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-unused-vars': [1, {
argsIgnorePattern: '^_'
}],
"camelcase": [1, {"properties": "always"}],
}
}
]
};

17 changes: 15 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
*.egg-info
*.pyc
*.log
*.DS_Store
arches_lingo/logs
arches_lingo/export_deliverables
arches_lingo/cantaloupe/*
arches_lingo/staticfiles
arches_lingo/media/packages
arches_lingo/media/node_modules
arches_lingo/media/build/
arches_lingo/uploadedfiles/*
arches_lingo/settings_local.py
arches_lingo/webpack/webpack-stats.json
arches_lingo/webpack/webpack-user-config.js
.vscode/
*.egg-info
.DS_STORE
CACHE
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-standard"
}
2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--install.modules-folder "./arches_lingo/media/node_modules"
--add.modules-folder "./arches_lingo/media/node_modules"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
graft *
graft *
File renamed without changes.
13 changes: 13 additions & 0 deletions arches_lingo/celery.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from __future__ import absolute_import, unicode_literals
import os
from celery import Celery

import platform

if platform.system().lower() == "windows":
os.environ.setdefault("FORKED_BY_MULTIPROCESSING", "1")

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'arches_lingo.settings')
app = Celery('arches_lingo')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions arches_lingo/install/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
arches==7.6.0
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions arches_lingo/media/css/themes/_project.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// use this file to override specific colors in the application
// see https://github.com/archesproject/arches/tree/master/arches/app/media/css/themes/_default.scss
// in the arches repo for the colors that can be overridden
//
// eg:
// $link-color: red;
Binary file added arches_lingo/media/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions arches_lingo/media/js/reports/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
define([
'knockout',
'viewmodels/report',
'templates/views/report-templates/default.htm'
], function(ko, ReportViewModel, defaultReportTemplate) {
return ko.components.register('default-report', {
viewModel: function(params) {
params.configKeys = [];

ReportViewModel.apply(this, [params]);
},
template: defaultReportTemplate
});
});
File renamed without changes.
File renamed without changes.
Empty file.
10 changes: 10 additions & 0 deletions arches_lingo/search_indexes/sample_index.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from arches.app.search.base_index import BaseIndex


class SampleIndex(BaseIndex):
def prepare_index(self):
self.index_metadata = {"mappings": {"properties": {"tile_count": {"type": "keyword"}, "graph_id": {"type": "keyword"}}}}
super(SampleIndex, self).prepare_index()

def get_documents_to_index(self, resourceinstance, tiles):
return ({"tile_count": len(tiles), "graph_id": resourceinstance.graph_id}, str(resourceinstance.resourceinstanceid))
Loading