Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Jan 14, 2024
1 parent fe29f0a commit d21c940
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 40 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,40 @@ jobs:
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 -r arches_rdm_example_project/install/requirements.txt
pip install .
pip install -r arches/install/requirements.txt
pip install -r arches/install/requirements_dev.txt
echo Python packages installed
- name: Check for TypeScript and ESLint issues
- uses: ankane/setup-elasticsearch@v1
with:
elasticsearch-version: 8

- name: Webpack frontend files
run: |
echo "Removing yarn.lock due to yarn v1 package resolution issues"
echo "https://github.com/iarna/wide-align/issues/63"
cd arches_rdm_example_project
rm yarn.lock
yarn && yarn eslint:check && yarn typescript:check
yarn && yarn build_test
- name: Check for missing migrations
run: |
python manage.py makemigrations --check
# - name: Run Arches unit tests
# run: |
# python -W default::DeprecationWarning -m coverage run manage.py test tests --pattern="*.py" --settings="tests.test_settings"

# - name: Report coverage
# run: |
# coverage report
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"
}
}
9 changes: 5 additions & 4 deletions arches_rdm_example_project/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "arches_rdm_example_project",
"license": "AGPL-3.0-only",
"scripts": {
"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",
"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",
"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.6.x",
Expand Down
2 changes: 1 addition & 1 deletion arches_rdm_example_project/src/shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare module '*.vue';
declare module '*.ts';
declare module '*.ts';
17 changes: 13 additions & 4 deletions arches_rdm_example_project/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"noEmit": true,
"module": "ESNext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"jsx": "preserve",
"target": "ES5",
"lib": ["ES6", "DOM"],
"jsxImportSource": "vue",
"noImplicitThis": true,
"strict": true,
"verbatimModuleSyntax": true,
"target": "ESNext",
"useDefineForClassFields": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"baseUrl": "./src/",
"paths": {
"@/*": [
"*.ts",
"*.vue",
],
},
"strict": true
},
"include": [
"**/*.ts",
Expand Down
32 changes: 5 additions & 27 deletions arches_rdm_example_project/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const Path = require('path');
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const BundleTracker = require('webpack-bundle-tracker');
const ESLintPlugin = require('eslint-webpack-plugin');

const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const { spawn } = require("child_process");
Expand All @@ -15,8 +14,6 @@ const { VueLoaderPlugin } = require("vue-loader");
const { buildImageFilePathLookup } = require('./webpack-utils/build-image-filepath-lookup');
const { buildJavascriptFilepathLookup } = require('./webpack-utils/build-javascript-filepath-lookup');
const { buildTemplateFilePathLookup } = require('./webpack-utils/build-template-filepath-lookup');
const { buildVueFilePathLookup } = require('./webpack-utils/build-vue-filepath-lookup');


module.exports = () => {
return new Promise((resolve, _reject) => {
Expand Down Expand Up @@ -208,26 +205,12 @@ module.exports = () => {
// END create image filepath lookup
// BEGIN create vue filepath lookup

const coreArchesVuePathConfiguration = buildVueFilePathLookup(Path.resolve(__dirname, ROOT_DIR, 'app', 'src'), {});
const projectVuePathConfiguration = buildVueFilePathLookup(Path.resolve(__dirname, APP_ROOT, 'src'), {});

const archesApplicationsVuePaths = []
const archesApplicationsVuePathConfiguration = ARCHES_APPLICATIONS.reduce((acc, archesApplication) => {
const archesApplicationsVuePaths = ARCHES_APPLICATIONS.reduce((acc, archesApplication) => {
const path = Path.resolve(__dirname, ARCHES_APPLICATIONS_PATHS[archesApplication], 'src');
archesApplicationsVuePaths.push(path);

return {
...acc,
...buildVueFilePathLookup(path, {})
};
}, {});

// order is important! Arches core files are overwritten by arches-application files, arches-application files are overwritten by project files
const vueFilepathLookup = {
...coreArchesVuePathConfiguration,
...archesApplicationsVuePathConfiguration,
...projectVuePathConfiguration,
};
acc.push(path);

return acc;
}, []);

// END create vue filepath lookup
// BEGIN create universal constants
Expand Down Expand Up @@ -282,10 +265,6 @@ module.exports = () => {
new MiniCssExtractPlugin(),
new BundleTracker({ filename: Path.resolve(__dirname, `webpack-stats.json`) }),
new VueLoaderPlugin(),
new ESLintPlugin({
lintDirtyModulesOnly: true,
extensions: ['vue', 'ts'],
}),
],
resolveLoader: {
alias: {
Expand All @@ -298,7 +277,6 @@ module.exports = () => {
...javascriptRelativeFilepathToAbsoluteFilepathLookup,
...templateFilepathLookup,
...imageFilepathLookup,
...vueFilepathLookup,
...nodeModulesAliases,
...parsedPackageJSONFilepaths,
'@': [Path.resolve(__dirname, APP_ROOT, 'src'), ...archesApplicationsVuePaths, Path.resolve(__dirname, ROOT_DIR, 'app', 'src')]
Expand Down

0 comments on commit d21c940

Please sign in to comment.