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

Add eslint and typescript checking 2 #5

Open
wants to merge 210 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 187 commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
50d4a84
adds vue linting and typescript support
chrabyrd Jan 12, 2024
25209c8
nit
chrabyrd Jan 12, 2024
c132799
nit
chrabyrd Jan 12, 2024
ac2aa32
nit
chrabyrd Jan 12, 2024
6b4fc49
nit
chrabyrd Jan 12, 2024
4b49dc5
nit
chrabyrd Jan 12, 2024
9e6ac51
nit
chrabyrd Jan 12, 2024
439c32b
nit
chrabyrd Jan 12, 2024
4113576
nit
chrabyrd Jan 12, 2024
b124806
nit
chrabyrd Jan 12, 2024
71464fc
nit
chrabyrd Jan 13, 2024
fe29f0a
nit
chrabyrd Jan 13, 2024
d21c940
nit
chrabyrd Jan 14, 2024
b00e6c5
nit
chrabyrd Jan 14, 2024
980bc92
nit
chrabyrd Jan 14, 2024
f235a34
nit
chrabyrd Jan 14, 2024
220e3c5
nit
chrabyrd Jan 14, 2024
c1c9d3d
nit
chrabyrd Jan 14, 2024
e8b6eac
nit
chrabyrd Jan 14, 2024
850c605
nit
chrabyrd Jan 14, 2024
29633dd
nit
chrabyrd Jan 14, 2024
189ad38
nit
chrabyrd Jan 15, 2024
6703f05
nit
chrabyrd Jan 15, 2024
a7c5379
nit
chrabyrd Jan 15, 2024
bac8e3a
nit
chrabyrd Apr 1, 2024
324a766
nit
chrabyrd Apr 1, 2024
8ccd0c5
nit
chrabyrd Apr 1, 2024
998e149
nit
chrabyrd Apr 1, 2024
aebf509
nit
chrabyrd Apr 1, 2024
eb072fb
nit
chrabyrd Apr 1, 2024
eb08b68
nit
chrabyrd Apr 1, 2024
12b2a26
nit
chrabyrd Apr 1, 2024
cd82cf8
nit
chrabyrd Apr 1, 2024
8eab707
nit
chrabyrd Apr 1, 2024
7b36399
nit
chrabyrd Apr 1, 2024
72571ff
nit
chrabyrd Apr 1, 2024
c454894
nit
chrabyrd Apr 1, 2024
7d0f496
nit
chrabyrd Apr 2, 2024
e7ad32a
nit
chrabyrd Apr 2, 2024
f7a4d63
Merge branch 'main' of https://github.com/archesproject/arches_rdm_ex…
chrabyrd Apr 2, 2024
25f778c
nit
chrabyrd Apr 2, 2024
78d4cc2
test coverage diff
chrabyrd Apr 2, 2024
50e7dad
nit
chrabyrd Apr 2, 2024
4ec02df
nit
chrabyrd Apr 2, 2024
ca39e9d
troubleshoot why action isn't running
chrabyrd Apr 2, 2024
88d0088
nit nit
chrabyrd Apr 2, 2024
6c734aa
nit
chrabyrd Apr 2, 2024
637f8b8
nit
chrabyrd Apr 2, 2024
3699350
nit
chrabyrd Apr 2, 2024
583480c
nit
chrabyrd Apr 2, 2024
1204ba3
nit
chrabyrd Apr 2, 2024
70ad9e5
nit
chrabyrd Apr 2, 2024
af38ccf
nit
chrabyrd Apr 2, 2024
4d766fb
nit
chrabyrd Apr 2, 2024
b76b17f
nit
chrabyrd Apr 2, 2024
7e4b430
nit
chrabyrd Apr 2, 2024
2c13bdc
nit
chrabyrd Apr 2, 2024
ec02ded
nit
chrabyrd Apr 2, 2024
fcce15b
nit
chrabyrd Apr 2, 2024
d440de7
nit
chrabyrd Apr 2, 2024
3d125de
nit
chrabyrd Apr 2, 2024
5c9c496
nit
chrabyrd Apr 2, 2024
df613f6
nit
chrabyrd Apr 2, 2024
3361e55
nit
chrabyrd Apr 2, 2024
1a9ee53
Merge branch 'main' of https://github.com/archesproject/arches_rdm_ex…
chrabyrd Apr 2, 2024
caf7e50
nit
chrabyrd Apr 2, 2024
f957e9d
nit
chrabyrd Apr 2, 2024
b34ab72
nit
chrabyrd Apr 2, 2024
1ea535d
nit
chrabyrd Apr 2, 2024
bfb39d5
nit
chrabyrd Apr 2, 2024
d884122
nit
chrabyrd Apr 2, 2024
ed84ae0
nit
chrabyrd Apr 2, 2024
296e809
nit
chrabyrd Apr 2, 2024
6ec17fc
nit
chrabyrd Apr 2, 2024
33e294c
nit
chrabyrd Apr 2, 2024
7720820
nit
chrabyrd Apr 2, 2024
2fb389f
nit
chrabyrd Apr 2, 2024
a8afe43
nit"
chrabyrd Apr 2, 2024
e362b9e
Merge a8afe43bd90472e07560fa5ebf26f73ac79fcef7 into 9ac739e9094820cf7…
chrabyrd Apr 2, 2024
1c6c842
automatically update coverage
invalid-email-address Apr 2, 2024
fbebe0f
nit
chrabyrd Apr 3, 2024
7d9683a
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 3, 2024
fd8a2a6
nit nit
chrabyrd Apr 3, 2024
d9fbaad
nit
chrabyrd Apr 3, 2024
eb7d28c
nit
chrabyrd Apr 3, 2024
ef418fc
nit
chrabyrd Apr 3, 2024
4e6e38d
nit
chrabyrd Apr 3, 2024
19af795
nit
chrabyrd Apr 3, 2024
0103f3e
nit
chrabyrd Apr 3, 2024
25d267a
nit
chrabyrd Apr 3, 2024
5982b46
Merge 25d267a926f7d5db3b510d161b411631fd6067dc into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
5dd52c5
automatically update .coverage and coverage.json
invalid-email-address Apr 3, 2024
face04d
nit nit
chrabyrd Apr 3, 2024
015d25e
Merge face04dd3036fa44714e028fad40bbfee764893c into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
1b0e175
automatically update .coverage and coverage.json
invalid-email-address Apr 3, 2024
3029710
nit nit
chrabyrd Apr 3, 2024
f10cc5c
nit
chrabyrd Apr 3, 2024
2a9953e
Merge f10cc5c28be9c2fa82c7012f785a7b8cea93586a into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
39877ad
automatically update .coverage and coverage.json
invalid-email-address Apr 3, 2024
5f9520b
test failing threshold still fails
chrabyrd Apr 3, 2024
84acf1a
nit
chrabyrd Apr 3, 2024
c07e318
nit
chrabyrd Apr 3, 2024
0446d0e
nit
chrabyrd Apr 3, 2024
6f678db
Merge 0446d0ec13ea62db94d6322f671ebad5e4e93f26 into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
12006b2
automatically update .coverage and coverage.json
invalid-email-address Apr 3, 2024
06f843a
nit
chrabyrd Apr 3, 2024
9162d76
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 3, 2024
b621c88
nit
chrabyrd Apr 3, 2024
dea5a36
Merge b621c883b963b2530a91cb693ed675e86c93f1ec into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
bb4945c
automatically update .coverage and coverage.json
invalid-email-address Apr 3, 2024
5cbf544
nit nit
chrabyrd Apr 3, 2024
4ef197d
Merge 5cbf544a91c08d11fd92b2215a580b3c81e016e2 into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
d9f5306
automatically update coverage.json
invalid-email-address Apr 3, 2024
d21cc03
nit
chrabyrd Apr 3, 2024
001f885
merge
chrabyrd Apr 3, 2024
c3954fa
nit
chrabyrd Apr 3, 2024
3c056c9
nit
chrabyrd Apr 3, 2024
589d4e4
Merge 3c056c9eaf4487f71834d0ddc1347a189784e135 into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
1c2762d
automatically update coverage.json
invalid-email-address Apr 3, 2024
0185702
nit
chrabyrd Apr 3, 2024
77ff3e8
Merge 018570230782d49b8d11d09702ee3afc97edccf8 into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
5e5d77b
automatically update coverage.json
invalid-email-address Apr 3, 2024
bc1e660
nit
chrabyrd Apr 3, 2024
60574cd
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 3, 2024
7aa9549
Merge 60574cd7aa44580d59d3d4f04af2db87470c07f6 into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
4f78e9a
automatically update coverage.json
invalid-email-address Apr 3, 2024
4f82e93
nit
chrabyrd Apr 3, 2024
f3ae1e8
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 3, 2024
2206af2
Merge f3ae1e87a9d2acbcc757c795ffeb81d4487fb168 into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
5a66030
automatically update coverage.json
invalid-email-address Apr 3, 2024
fdaf67d
nit
chrabyrd Apr 3, 2024
7372230
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 3, 2024
54695b5
nit
chrabyrd Apr 3, 2024
02f384c
Merge 54695b5edc7c72ce4f068987cbac840e78e0f28c into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
09a0e4a
automatically update coverage.json
invalid-email-address Apr 3, 2024
97b8500
nit
chrabyrd Apr 3, 2024
d90b377
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 3, 2024
6b9e238
nit
chrabyrd Apr 3, 2024
642115d
Merge 6b9e238422d7582b93fc13c15a86a8d138684d9f into 9ac739e9094820cf7…
chrabyrd Apr 3, 2024
efa350c
automatically update coverage.json
invalid-email-address Apr 3, 2024
ffc339b
nit
chrabyrd Apr 18, 2024
1425586
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 18, 2024
d6273c9
nit
chrabyrd Apr 18, 2024
3a92d64
Merge d6273c90a44bd8d55b63ca4507f31121dd07cfd0 into 9ac739e9094820cf7…
chrabyrd Apr 18, 2024
c40174b
automatically update coverage.json
invalid-email-address Apr 18, 2024
0a73342
nit
chrabyrd Apr 18, 2024
e99583a
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 18, 2024
4901e39
nit
chrabyrd Apr 18, 2024
f8d67c4
nit"
chrabyrd Apr 18, 2024
2f67af8
nit
chrabyrd Apr 18, 2024
33d1ba6
nit
chrabyrd Apr 18, 2024
fb80433
nit
chrabyrd Apr 18, 2024
d359eff
nit
chrabyrd Apr 18, 2024
209bb3a
nit
chrabyrd Apr 18, 2024
e92237a
nit
chrabyrd Apr 18, 2024
80bf98c
nit
chrabyrd Apr 18, 2024
af7d457
nit
chrabyrd Apr 18, 2024
dcb30d4
nit
chrabyrd Apr 18, 2024
5ae5583
nit
chrabyrd Apr 18, 2024
2884c35
nit
chrabyrd Apr 18, 2024
295bf14
nit
chrabyrd Apr 18, 2024
9ea2093
nit
chrabyrd Apr 18, 2024
576e5d1
nit
chrabyrd Apr 18, 2024
346d604
nit
chrabyrd Apr 18, 2024
8df8a99
nit
chrabyrd Apr 18, 2024
f142c25
nit
chrabyrd Apr 18, 2024
a03ad09
nit
chrabyrd Apr 18, 2024
2d496c2
nit
chrabyrd Apr 18, 2024
77b94a5
nit
chrabyrd Apr 18, 2024
3a57bc6
nit
chrabyrd Apr 18, 2024
113a76e
Merge branch 'main' of https://github.com/archesproject/arches_rdm_ex…
chrabyrd Apr 18, 2024
d52b531
nit
chrabyrd Apr 18, 2024
738fb1f
nit
chrabyrd Apr 18, 2024
d98349b
Merge 738fb1f706df2dfa6756d7f7189278a8ce9a86b2 into 2b782dd41de25375a…
chrabyrd Apr 18, 2024
885c709
automatically update coverage.json
invalid-email-address Apr 18, 2024
d7c3693
nit
chrabyrd Apr 18, 2024
074c2af
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 18, 2024
a80049f
Merge 074c2afd880bb1b8a0fdfde438ef3e77cd698d5f into 2b782dd41de25375a…
chrabyrd Apr 18, 2024
f2846de
automatically update coverage.json
invalid-email-address Apr 18, 2024
8b8934c
Update check-base-branch-before-merge.yml
chrabyrd Apr 18, 2024
2233c69
Merge 8b8934c0d61e5747be045f706043f989176c4180 into 2b782dd41de25375a…
chrabyrd Apr 18, 2024
7c9e55e
automatically update coverage.json
invalid-email-address Apr 18, 2024
3867fe1
nit
chrabyrd Apr 18, 2024
8c8dd90
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 18, 2024
e0c63cf
nit
chrabyrd Apr 18, 2024
d947aa5
Merge e0c63cf4670fc5ae0c08027c199a0fac62c4bc17 into 2b782dd41de25375a…
chrabyrd Apr 18, 2024
b4fac78
automatically update coverage.json
invalid-email-address Apr 18, 2024
b4dc193
nit
chrabyrd Apr 19, 2024
c368b0b
Merge branch 'add-eslint-and-typescript-checking-2' of https://github…
chrabyrd Apr 19, 2024
dcd3ac1
nit
chrabyrd Apr 19, 2024
72c3e57
nit
chrabyrd Apr 19, 2024
ef6090d
nit
chrabyrd Apr 19, 2024
70c65ed
nit
chrabyrd Apr 19, 2024
195087a
nit
chrabyrd Apr 19, 2024
41e25b0
nit
chrabyrd Apr 19, 2024
a744891
nit
chrabyrd Apr 19, 2024
52a259d
nit
chrabyrd Apr 19, 2024
00555d3
nit
chrabyrd Apr 19, 2024
345516c
nit
chrabyrd Apr 19, 2024
a179386
nit
chrabyrd Apr 19, 2024
86d1ccb
nit
chrabyrd Apr 19, 2024
5598492
nit
chrabyrd Apr 19, 2024
d4fe622
nit
chrabyrd Apr 19, 2024
1125e70
nit
chrabyrd Apr 24, 2024
538316c
nit
chrabyrd Apr 24, 2024
ff7c04a
nit
chrabyrd Apr 24, 2024
14352aa
nit
chrabyrd Apr 24, 2024
ebf8323
nit
chrabyrd Apr 24, 2024
dcf7fbc
nit
chrabyrd Apr 24, 2024
0c61a15
nit
chrabyrd Apr 24, 2024
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
Binary file removed .coverage
Binary file not shown.
34 changes: 34 additions & 0 deletions .github/workflows/check-base-branch-before-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Base Branch Before Merge

on:
pull_request_review:
types: [submitted]

jobs:
check-base-branch-before-merge:
if: github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check base branch
run: |
git fetch origin --prune

CURRENT_BRANCH=${{ github.event.pull_request.head.ref }}
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"

COMMON_ANCESTOR=$(git merge-base origin/$CURRENT_BRANCH origin/$TARGET_BRANCH)
COMMITS_BEHIND=$(git rev-list --count origin/$TARGET_BRANCH ^$COMMON_ANCESTOR)

if [ "$COMMITS_BEHIND" -eq 0 ]; then
echo "Your branch is up-to-date with the target branch."
elif [ "$COMMITS_BEHIND" -eq 1 ]; then
echo "Your branch is 1 commit behind the target branch."
exit 1
else
echo "Your branch is $COMMITS_BEHIND commits behind the target branch."
exit 1
fi
156 changes: 156 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
name: CI

on:
# push: -- just run on PRs for now
pull_request:
workflow_dispatch:

jobs:
check-base-branch:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check base branch
run: |
git fetch origin --prune

CURRENT_BRANCH=${{ github.event.pull_request.head.ref }}
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"

COMMON_ANCESTOR=$(git merge-base origin/$CURRENT_BRANCH origin/$TARGET_BRANCH)
COMMITS_BEHIND=$(git rev-list --count origin/$TARGET_BRANCH ^$COMMON_ANCESTOR)

if [ "$COMMITS_BEHIND" -eq 0 ]; then
echo "Your branch is up-to-date with the target branch."
elif [ "$COMMITS_BEHIND" -eq 1 ]; then
echo "Your branch is 1 commit behind the target branch."
exit 1
else
echo "Your branch is $COMMITS_BEHIND commits behind the target branch."
exit 1
fi

build:
needs: [check-base-branch]

runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:13-3.0
env:
POSTGRES_PASSWORD: postgis
POSTGRES_DB: ${{ github.event.repository.name }}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
check-latest: true

- name: Install Java, GDAL, and other system dependencies
run: |
sudo apt update
sudo apt-get install libxml2-dev libpq-dev openjdk-8-jdk libgdal-dev libxslt-dev
echo Postgres and ES dependencies installed

- name: Install python packages
run: |
python -m pip install --upgrade pip
pip install .
pip install -r ${{ github.event.repository.name }}/install/requirements.txt
pip install -r ${{ github.event.repository.name }}/install/requirements_dev.txt
echo Python packages installed

- uses: ankane/setup-elasticsearch@v1
with:
elasticsearch-version: 8

- name: Check for missing migrations
run: |
python manage.py makemigrations --check

- name: Run unit tests
run: |
python -W default::DeprecationWarning -m coverage run manage.py test tests --pattern="*.py" --settings="tests.test_settings"

- name: Generate report coverage
run: |
coverage json

- name: Upload coverage report as artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.json
overwrite: true

check-coverage:
needs: [check-base-branch, build]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Use the latest available version
check-latest: true

- name: Download coverage report artifact
uses: actions/download-artifact@v4
with:
name: coverage-report
path: .

- name: Report coverage
run: |
cat coverage.json

- name: Retrieve baseline coverage
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}

if ! git show ${{ github.event.pull_request.base.ref }}:coverage.json > /dev/null; then
echo "Error: coverage.json does not exist in the branch."
exit 1
fi

baseline_coverage=$(git show ${{ github.event.pull_request.base.ref }}:coverage.json | grep -o '"totals": {[^}]*' | grep -o '"percent_covered": [0-9.]*' | awk -F ': ' '{print $2}')
echo "$baseline_coverage" > .coverage_baseline

- name: Compare coverage with baseline
if: github.event_name == 'pull_request'
run: |
current_coverage=$(cat coverage.json | grep -o '"totals": {[^}]*' | grep -o '"percent_covered": [0-9.]*' | awk -F ': ' '{print $2}')
baseline_coverage=$(cat .coverage_baseline)

# Compare current coverage with baseline coverage using floating-point comparison
if awk -v current="$current_coverage" -v baseline="$baseline_coverage" 'BEGIN { exit (current < baseline) ? 0 : 1 }'; then
echo "Coverage decreased from $baseline_coverage% to $current_coverage%"
exit 1
else
echo "$baseline_coverage% == $current_coverage%, Coverage didn't decrease. Committing new coverage.json."

git config user.name github-actions
git config user.email [email protected]

git add -f coverage.json
git commit -m "automatically update coverage.json"
git push -f origin HEAD:${{ github.head_ref }}
fi
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
*.pyc
*.log
*.DS_Store
arches_rdm_example_project/logs
arches_rdm_example_project/export_deliverables
arches_rdm_example_project/cantaloupe/*
arches_rdm_example_project/staticfiles
arches_rdm_example_project/media/packages
arches_rdm_example_project/media/node_modules
arches_rdm_example_project/media/build/*
arches_rdm_example_project/media/build/
arches_rdm_example_project/uploadedfiles/*
arches_rdm_example_project/settings_local.py
arches_rdm_example_project/webpack/webpack-stats.json
arches_rdm_example_project/webpack/webpack-user-config.js
.vscode/
.coverage
coverage.*
*.egg-info
.DS_STORE
CACHE
50 changes: 35 additions & 15 deletions arches_rdm_example_project/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
module.exports = {
"extends": [
"eslint:recommended"
"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
"requireConfigFile": false,
"parser": {
"ts": "@typescript-eslint/parser"
}
},
"globals": {
"define": false,
Expand All @@ -25,20 +32,33 @@ module.exports = {
"URLSearchParams": false,
"fetch": false
},
"ignorePatterns": [".eslintrc.js", "**/media/plugins/*"],
"rules": {
"semi": ["error", "always"],
"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"}],
}
},
"overrides": [
{
"files": [ "*.vue" ],
"rules": {
"vue/html-indent": [2, 4],
"vue/this-in-template": "off"
}
},
{
"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"}],
}
}
]
};

43 changes: 43 additions & 0 deletions arches_rdm_example_project/gettext.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

module.exports = {
input: {
path: "./src", // only files in this directory are considered for extraction
include: ["**/*.vue"], // glob patterns to select files for extraction
exclude: [], // glob patterns to exclude files from extraction
jsExtractorOpts:[ // custom extractor keyword. default empty.
{
keyword: "__", // only extractor default keyword such as $gettext,use keyword to custom
options: { // see https://github.com/lukasgeiter/gettext-extractor
content: {
replaceNewLines: "\n",
},
arguments: {
text: 0,
},
},
},
{
keyword: "_n", // $ngettext
options: {
content: {
replaceNewLines: "\n",
},
arguments: {
text: 0,
textPlural: 1,
},
},
},
],
compileTemplate: false, // do not compile <template> tag when its lang is not html
},
output: {
path: "./locale", // output path of all created files
potPath: "./messages.pot", // relative to output.path, so by default "./src/language/messages.pot"
jsonPath: "./", // relative to output.path, so by default "./src/language/translations.json"
locales: ["en"],
flat: false, // don't create subdirectories for locales
linguas: false, // create a LINGUAS file
splitJson: true, // create separate json files for each locale. If used, jsonPath must end with a directory, not a file
},
};
2 changes: 1 addition & 1 deletion arches_rdm_example_project/install/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
arches~=7.5.0a1
arches~=7.5.0a1
5 changes: 5 additions & 0 deletions arches_rdm_example_project/install/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
livereload
sst
coverage
sauceclient
django-silk==5.1.0
Empty file.
5 changes: 5 additions & 0 deletions arches_rdm_example_project/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"events": {
"start": "clear"
}
}
26 changes: 18 additions & 8 deletions arches_rdm_example_project/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
{
"name": "arches_rdm_example_project",
"license": "AGPL-3.0-only",
"scripts": {
"build_production": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 NODE_ENV=production ./media/node_modules/.bin/webpack --config webpack/webpack.config.prod.js",
"build_development": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js",
"build_test": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js --env test=true",
"build_development": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js",
"build_production": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 NODE_ENV=production ./media/node_modules/.bin/webpack --config webpack/webpack.config.prod.js",
"build_test": "yarn eslint:check && yarn typescript:check && ./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js --env test=true",
"eslint:check": "./media/node_modules/.bin/eslint ./src --resolve-plugins-relative-to ./media --ext .vue,.ts --parser ./media/node_modules/vue-eslint-parser/index.js",
"eslint:watch": "./media/node_modules/.bin/nodemon --watch ./src --ext ts,vue --exec yarn --silent eslint:check",
"gettext:extract": "./media/node_modules/.bin/vue-gettext-extract",
"gettext:compile": "./media/node_modules/.bin/vue-gettext-compile",
"typescript:check": "./media/node_modules/.bin/vue-tsc --noEmit",
"typescript:watch": "./media/node_modules/.bin/vue-tsc --watch --noEmit",
"start": "./media/node_modules/.bin/cross-env NODE_PATH=./media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./media/node_modules/.bin/webpack serve --config webpack/webpack.config.dev.js"
},
"devDependencies": {
"arches-dev-dependencies": "archesproject/arches-dev-dependencies#dev/7.5.x"
"arches-dev-dependencies": "archesproject/arches-dev-dependencies#dev/7.6.x"
},
"dependencies": {
"arches": "archesproject/arches#dev/7.5.x",
"arches_rdm": "archesproject/arches-rdm#main"
"arches": "archesproject/arches#dev/7.6.x",
"arches_rdm": "archesproject/arches-rdm"
},
"nodeModulesPaths": {}
}
"nodeModulesPaths": {},
"resolutions": {
"node-gyp": "^10.0.0"
}
}
Loading