Skip to content

Commit

Permalink
Merge branch 'main' into milanmlft/rm-pixl_config
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmlft authored Feb 26, 2024
2 parents 125fdfd + 5ce7f7e commit b252f31
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 21 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Ensure copyright and license header are present
run: ./.github/linters/check_headers_exist.sh

- name: Run pre-commit
uses: pre-commit/[email protected]
with:
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ repos:
entry: mypy
args: ['--config-file=setup.cfg']
additional_dependencies: ['mypy', 'types-PyYAML', 'types-requests', 'types-python-slugify', 'types-psycopg2']
- id: copyright-headers
name: copyright-headers
language: script
types_or: [python, shell, yaml, dockerfile]
entry: bin/linters/check_headers_exist.sh

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ setfacl -R -m d:g::rwX /gae/pixl_dev

### 1. Choose deployment environment

This is one of dev|test|staging|prod and referred to as `<environment>` in the docs.
This is one of `dev|test|staging|prod` and referred to as `<environment>` in the docs.

### 2. Initialise environment configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -euo pipefail

for ext in ".yml" ".yaml" ".sh" "Dockerfile" ".py"
do
# shellcheck disable=SC2044
for path in $(find . -name "*$ext")
do
if ! grep -q "Copyright" "$path"; then
echo -e "\n\e[31m»»» ⚠️ No copyright/license header in $path"
exit 1
fi
done || exit 1
for f in "$@"; do
if ! grep -q '#.*Copyright.*University College London Hospitals NHS Foundation Trust' "$f"; then
echo "No copyright notice found in $f"
exit 1
fi
if ! grep -q '#.*Licensed under the Apache License, Version 2.0' "$f"; then
echo "No licence notice found in $f"
exit 1
fi
done
4 changes: 2 additions & 2 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ management tool such as [conda](https://docs.conda.io/en/latest/) or
Then install in editable mode by running

```bash
pip install -e ../pixl_core/ .
pip install -e ../pixl_core/ -e .
```

## Usage
Expand Down Expand Up @@ -136,7 +136,7 @@ Commands:
Install locally in editable mode with the development and testing dependencies by running

```bash
pip install -e ../pixl_core/ .[test]
pip install -e ../pixl_core/ -e .[test]
```

### Running tests
Expand Down
2 changes: 1 addition & 1 deletion pixl_core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pip install -e .
## Testing

```bash
pip install -e .[test] && pip install ../pytest-pixl
pip install -e .[test] && pip install -e ../pytest-pixl
pytest
```

Expand Down
2 changes: 1 addition & 1 deletion pixl_dcmd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Specifically, the `pixl_dcmd` package provides the following functionality:
Install the Python dependencies with

```bash
pip install -e ../pixl_core/ .[test,dev]
pip install -e ../pixl_core/ -e .[test,dev]
```

## Test
Expand Down
4 changes: 2 additions & 2 deletions pixl_ehr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ On Windows, follow [these instructions](https://www.postgresqltutorial.com/postg
Then install the Python dependencies with

```bash
pip install -e ../pixl_core/ .
pip install -e ../pixl_core/ -e .
```

## Test

```bash
pip install -e ../pixl_core/ .[test]
pip install -e ../pixl_core/ -e .[test]
pytest -m "not processing"
```

Expand Down
2 changes: 1 addition & 1 deletion pixl_imaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ for the requested imaging study, if it didn't already exist.
## Installation

```bash
pip install -e ../pixl_core/ .
pip install -e ../pixl_core/ -e .
```

## Test
Expand Down

0 comments on commit b252f31

Please sign in to comment.