Skip to content

Commit

Permalink
fix merge conflict in base-root.htm, re #11131
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisgalen committed Aug 6, 2024
2 parents 2f9488d + a4aad52 commit 38b95c6
Show file tree
Hide file tree
Showing 167 changed files with 44,276 additions and 42,634 deletions.
7 changes: 4 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ source =
arches/

omit =
*/python?.?/*
*/__init__.py
*/celery.py
*/hosts.py
*/models/migrations/*
*/python?.?/*
*/settings*.py
*/urls.py
*/wsgi.py
*/celery.py
*/__init__.py

data_file = coverage/python/.coverage

Expand Down
6 changes: 0 additions & 6 deletions .eggs/README.txt

This file was deleted.

4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Normalize line endings
3fe93f1e11e517e06884c7a10591fa99074cb0fe
# Reformat python code with black (2024)
6d519d00e752448362b880b73c3641a562ee9ee3
eea27d316c5ff975556e15ccd4c11d7c393dd95c
8de09526329685ee4d80c816c3475a66b19d46e9
9740c846eda0cc067f49d7abffdcb1a93fe3e0a9
eff6710e8b44faef5a628b0ea1373cd99cb47e9e
# Reformatting of 7.6 features under dev (2024)
9740c846eda0cc067f49d7abffdcb1a93fe3e0a9
# Relevant subset of git log --grep black
9b7e30d4499cb02dec6d17c7c99f9a7087fcdd47
b959f1139a1d789e6c116d43d8be7daa0baa6075
Expand Down
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Known binary formats
*.png binary
*.jpg binary
*.ico binary
*.gif binary
*.ttf binary
*.woff binary
*.woff2 binary
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Closes #
### Checklist
<!--- Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. -->
- I targeted one of these branches:
- [ ] dev/7.6.x (under development): features, bugfixes not covered below
- [ ] dev/7.5.x (main support): regressions, crashing bugs, security issues, major bugs in new features
- [ ] dev/8.0.x (under development): features, bugfixes not covered below
- [ ] dev/7.6.x (main support): regressions, crashing bugs, security issues, major bugs in new features
- [ ] dev/6.2.x (extended support): major security issues, data loss issues
- [ ] I added a changelog in arches/releases
- [ ] I submitted a PR to arches-docs (if appropriate)
Expand Down
109 changes: 109 additions & 0 deletions .github/actions/build-and-test-branch/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: 'Build and test branch'
description: 'Builds and tests a branch'
inputs:
branch-type:
description: 'String denoting either `target` or `feature` branch'
required: true
project-name:
description: 'String denoting the name of the project'
required: true
secrets:
description: 'Secrets from main.yml as JSON'
runs:
using: 'composite'
steps:
- 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
shell: bash

- name: Set up Elasticsearch
uses: ankane/setup-elasticsearch@v1
with:
elasticsearch-version: 8

- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
echo Python packages installed
shell: bash

- name: Ensure frontend configuration files exist
run: |
python manage.py check
shell: bash

- name: Install Arches applications
uses: ./.github/actions/install-arches-applications
with:
secrets: ${{ inputs.secrets }}

- name: Install frontend dependencies
run: |
npm install
shell: bash

- name: Webpack frontend files
run: |
npm run build_test
shell: bash

- name: Check frontend formatting with prettier
run: |
npm run prettier:check
shell: bash

- name: Check backend formatting with black
run: |
black . --check --exclude=node_modules
shell: bash

- name: Check line endings on all but ontology (.xml) files
run: |
! git ls-files --eol | grep -v '.xml' | grep 'w/crlf\|w/mixed'
shell: bash

- name: Run frontend tests
run: |
npm run vitest
mv coverage/frontend/coverage.xml ${{ inputs.branch-type }}_branch_frontend_coverage.xml
shell: bash

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

- name: Ensure previous Python coverage data is erased
run: |
coverage erase
shell: bash

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

- name: Generate Python report coverage
run: |
coverage report
coverage json
mv coverage/python/coverage.json ${{ inputs.branch-type }}_branch_python_coverage.json
shell: bash

- name: Upload frontend coverage report as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.branch-type }}-branch-frontend-coverage-report
path: ${{ inputs.branch-type }}_branch_frontend_coverage.xml
overwrite: true

- name: Upload Python coverage report as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.branch-type }}-branch-python-coverage-report
path: ${{ inputs.branch-type }}_branch_python_coverage.json
overwrite: true
29 changes: 29 additions & 0 deletions .github/actions/install-arches-applications/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Install Arches Applications'
description: 'Manually edit this file to install all Arches Applications declared in settings.py, but not declared in `pyproject.toml`'
inputs:
secrets:
description: 'Secrets from main.yml as JSON'
runs:
using: 'composite'
steps:

# Manually add any ARCHES_APPLICATIONS to this file if not already declared in `pyproject.toml`.
# Below is a template for adding an application in a private repository.
# Be sure to delete the `no-op step` if adding when updating this file.

- name: No-op step to maintain workflow structure
run: echo "No-op step"
shell: bash

# - name: Checkout ${my_arches_application_name}
# uses: actions/checkout@v4
# with:
# repository: ${my_arches_application_repository}/${my_arches_application_name}
# token: ${{ fromJSON(inputs.secrets).${my_github_personal_access_token} }}
# path: ${my_arches_application_name}

# - name: Install ${my_arches_application_name}
# run: |
# pip install ./${my_arches_application_name}
# echo ${my_arches_application_name} installed
# shell: bash
Loading

0 comments on commit 38b95c6

Please sign in to comment.