Skip to content

Commit

Permalink
Merge branch 'master' into feature/search-api-datetime-format-#338
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Mar 17, 2022
2 parents 01968c0 + 464d754 commit 0fd45d0
Show file tree
Hide file tree
Showing 17 changed files with 2,266 additions and 85 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

# Prep for running the playbook
- name: Create hosts file
run: echo -e "[icatdb-minimal-hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
run: echo -e "[icatdb_minimal_hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
- name: Prepare vault pass
run: echo -e "icattravispw" > icat-ansible/vault_pass.txt
- name: Move vault to directory it'll get detected by Ansible
Expand All @@ -57,7 +57,7 @@ jobs:
# Create local instance of ICAT
- name: Run ICAT Ansible Playbook
run: |
ansible-playbook icat-ansible/icatdb-minimal-hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
ansible-playbook icat-ansible/icatdb_minimal_hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
# rootUserNames needs editing as anon/anon is used in search API and required to pass endpoint tests
- name: Add anon user to rootUserNames
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:

# Prep for running the playbook
- name: Create hosts file
run: echo -e "[icatdb-minimal-hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
run: echo -e "[icatdb_minimal_hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts
- name: Prepare vault pass
run: echo -e "icattravispw" > icat-ansible/vault_pass.txt
- name: Move vault to directory it'll get detected by Ansible
Expand All @@ -218,7 +218,7 @@ jobs:
# Create local instance of ICAT
- name: Run ICAT Ansible Playbook
run: |
ansible-playbook icat-ansible/icatdb-minimal-hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
ansible-playbook icat-ansible/icatdb_minimal_hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv
- name: Checkout DataGateway API
uses: actions/checkout@v2
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

<!--next-version-placeholder-->

## v4.2.0 (2022-02-28)
### Feature
* Create openapi endpoint for Search API #281 ([`412458c`](https://github.com/ral-facilities/datagateway-api/commit/412458cc4cc73230db0115bdbfdfe6ac815d42c1))

### Documentation
* Add openapi yaml files #281 ([`d4fc795`](https://github.com/ral-facilities/datagateway-api/commit/d4fc79564fec3dd0f128bf30937d8d70c2b03dd3))
* Add docs to `GET` Search API `CountFilesEndpoint` #281 ([`ba367a0`](https://github.com/ral-facilities/datagateway-api/commit/ba367a02f612a042c9c9d274d05b63202534de76))
* Add docs to `GET` Search API `FilesEndpoint` #281 ([`53c2f8c`](https://github.com/ral-facilities/datagateway-api/commit/53c2f8c3d2b71270a881f8ad59aac45a225daadd))
* Add docs to `GET` Search API `CountEndpoint` #281 ([`2e34d7a`](https://github.com/ral-facilities/datagateway-api/commit/2e34d7a0632429baf5c1d48f1044a0f7e979cd0e))
* Add docs to `GET` Search API `EndpointWithID` #281 ([`f211c57`](https://github.com/ral-facilities/datagateway-api/commit/f211c57d668862e469a98c1c4504781fe17e8504))
* Add docs to `GET` Search API `Endpoint` #281 ([`d407f0a`](https://github.com/ral-facilities/datagateway-api/commit/d407f0ad98a72547333f1b1ccb3930c5c39b0926))

## v4.1.5 (2022-02-28)
### Fix
* Fix `AttributeError` when running DG API on its own #345 ([`7479cc3`](https://github.com/ral-facilities/datagateway-api/commit/7479cc3e17ec046082e08b7e71e8e63eb7fa6e28))

## v4.1.4 (2022-02-28)
### Fix
* Improve error handling for search API exceptions #319 ([`935f22d`](https://github.com/ral-facilities/datagateway-api/commit/935f22d31d96c6810cf7938815b25c8822d892fb))

## v4.1.3 (2022-02-28)
### Fix
* Fix `parameters.value` WHERE filter with between operator #270 ([`3fe8dfe`](https://github.com/ral-facilities/datagateway-api/commit/3fe8dfe79ac7e070db369471859b1793e54a0852))

## v4.1.2 (2022-02-28)
### Fix
* Fix requests which include parameters and filter on them #319 ([`598bf9f`](https://github.com/ral-facilities/datagateway-api/commit/598bf9f5c9fbf71b87a3313680617b8addbe5cc9))

### Documentation
* Update README to include resolution to setuptools issue ([`4bab813`](https://github.com/ral-facilities/datagateway-api/commit/4bab813d0897e987e085260d270b0496fe8e85f3))
* Correct markdown URL #320 ([`0a9c05a`](https://github.com/ral-facilities/datagateway-api/commit/0a9c05a4e151e7bf6db5833dfa760d6de576663c))
* Add remaining suggested changes to README #320 ([`d5d358c`](https://github.com/ral-facilities/datagateway-api/commit/d5d358c1f43573be7f0f443d4a20a9bd54a7c634))
* Make suggested changes #320 ([`d04447d`](https://github.com/ral-facilities/datagateway-api/commit/d04447d835e049127ba15ef981f69a63b85ff015))
* Update docs for search API #320 ([`2daf395`](https://github.com/ral-facilities/datagateway-api/commit/2daf3956805dc0476e3d400d52b20a8b51f0e309))

## v4.1.1 (2022-02-17)
### Fix
* Ignore filters on `isPublic` fields #329 ([`d6c10d5`](https://github.com/ral-facilities/datagateway-api/commit/d6c10d56b788ff3c491feaf1fae3a6fadd634a9d))
Expand Down
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ completed smoothly:
source ~/.poetry/env
```

Before installing the API's dependencies, check the version of `setuptools`:

```bash
poetry run pip list | grep setuptools
```

If a version < 58.0.0 is not being used, changes need to be made so that a suitable
version is being used. This is because Python ICAT uses `2to3` when building itself to
ensure Python 3 import statements are used when using Python 3. 58.0.0 of setuptools
[removes support of this tool during builds](https://setuptools.pypa.io/en/latest/history.html#v58-0-0).
If a newer version of setuptools is used, you will likely face an error similar to
what's described in
[issue #99 of Python ICAT](https://github.com/icatproject/python-icat/issues/99). To use
a supported version, execute the following commands:

```bash
poetry run pip uninstall -y setuptools
poetry run pip install 'setuptools<58.0.0'
```

The dependencies for this repo are stored in `pyproject.toml`, with a more detailed
version of this data in `poetry.lock`. The lock file is used to maintain the exact
versions of dependencies from system to system. To install the dependencies, execute the
Expand Down Expand Up @@ -343,6 +363,29 @@ noted that when this setting is enabled, the API will go through the startup pro
twice. In the case of the ICAT backend, this could dramatically increase startup time if
the API is configured with a large initial client pool size.

If you get the following error when starting the API, changes need to be made to your
Poetry environment:

```python
ModuleNotFoundError: No module named 'urlparse'
```

Explanation of the cause for this issue can be found in a
[Python ICAT issue](https://github.com/icatproject/python-icat/issues/99). Essentially,
the version of `setuptools` used must be < 58.0.0
([see above](#api-dependency-management-poetry) for further details). If you have
already installed the API's dependencies (via `poetry install`), you will need to re-install `setuptools` (using a suitable version) and re-install Python ICAT so it can be rebuilt correctly. The following commands can be used for this process:

```bash
# Uninstall and re-install setuptools using a version < 58.0.0
poetry run pip uninstall -y setuptools
poetry run pip install 'setuptools<58.0.0'

# Re-install Python ICAT so it can be built properly
poetry remove python-icat
poetry add python-icat=0.21.0
```


## DataGateway API Authentication
Each request requires a valid session ID to be provided in the Authorization header.
Expand Down
Loading

0 comments on commit 0fd45d0

Please sign in to comment.