Skip to content

Commit cd1dba6

Browse files
authored
Remove heroku deployment and update docs and tests (#1400)
1 parent b3bf71b commit cd1dba6

File tree

6 files changed

+18
-37
lines changed

6 files changed

+18
-37
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,22 +249,22 @@ jobs:
249249
coverage run --append --source optimade optimade/client/cli.py \
250250
--filter 'nsites = 1' \
251251
--output-file test_get_async.json \
252-
https://optimade.herokuapp.com
252+
https://optimade.fly.dev
253253
test test_get_async.json
254254
255255
coverage run --append --source optimade optimade/client/cli.py \
256256
--filter 'nsites = 1' \
257257
--count \
258258
--output-file test_count.json \
259-
https://optimade.herokuapp.com
259+
https://optimade.fly.dev
260260
test test_count.json
261261
262262
coverage run --append --source optimade optimade/client/cli.py \
263263
--no-async \
264264
--filter 'nsites = 1' \
265265
--count \
266266
--output-file test_count_no_async.json \
267-
https://optimade.herokuapp.com
267+
https://optimade.fly.dev
268268
test test_count_no_async.json
269269
270270
diff test_count_no_async.json test_count.json

.github/workflows/ci_cd_updated_master.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,24 +135,6 @@ jobs:
135135
sleep: 15
136136
force: ${{ env.FORCE_PUSH }}
137137

138-
deploy-heroku:
139-
runs-on: ubuntu-latest
140-
if: github.repository_owner == 'Materials-Consortia'
141-
steps:
142-
- name: Checkout repository
143-
uses: actions/checkout@v3
144-
145-
- name: Deploy to Heroku
146-
uses: akhileshns/heroku-deploy@v3.12.12
147-
with:
148-
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
149-
heroku_app_name: "optimade"
150-
heroku_email: ${{secrets.HEROKU_EMAIL}}
151-
branch: ${{env.DEFAULT_REPO_BRANCH}}
152-
env:
153-
HD_OPTIMADE_CONFIG_FILE: /app/tests/test_config.json
154-
HD_OPTIMADE_BASE_URL: https://optimade.herokuapp.com
155-
156138
deploy-fly:
157139
env:
158140
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ OPTIMADE Python tools
3131
<td align="center">
3232
<a href="https://github.com/Materials-Consortia/optimade-python-tools/actions?query=branch%3Amaster+"><img alt="Build Status" src="https://img.shields.io/github/workflow/status/Materials-Consortia/optimade-python-tools/CI%20tests?logo=github"></a><br>
3333
<a href="https://codecov.io/gh/Materials-Consortia/optimade-python-tools"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/Materials-Consortia/optimade-python-tools?logo=codecov&logoColor=white&token=UJAtmqkZZO"></a><br>
34-
<a href="https://optimade.herokuapp.com"><img alt="Heroku App Status" src="https://heroku-shields.herokuapp.com/optimade??logo=heroku"></a>
3534
</td>
3635
<td align="center">
3736
<a href="https://github.com/Materials-Consortia/optimade-python-tools/pulse"><img alt="Commit Activity" src="https://img.shields.io/github/commit-activity/m/Materials-Consortia/optimade-python-tools?logo=github"></a><br>
@@ -50,7 +49,7 @@ This is to enable interoperability among databases that serve crystal structures
5049
This repository contains a library of tools for implementing and consuming [OPTIMADE APIs](https://www.optimade.org) using Python:
5150

5251
1. [pydantic](https://github.com/pydantic/pydantic) data models for all [OPTIMADE entry types](https://www.optimade.org/optimade-python-tools/latest/all_models/) and endpoint responses, and a [Lark](https://github.com/lark-parser/lark) [EBNF grammar](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) implementation for the OPTIMADE filter language.
53-
1. A configurable reference server implementation that can make use of either MongoDB or Elasticsearch database backends out-of-the-box, and is readily extensible to other backends. Try it out on the [demo site](https://optimade.herokuapp.com)! The OpenAPI schemas of the server are used to construct the [OPTIMADE schemas](https://schemas.optimade.org/) site.
52+
1. A configurable reference server implementation that can make use of either MongoDB or Elasticsearch database backends out-of-the-box, and is readily extensible to other backends. Try it out on the [demo site](https://optimade.fly.dev)! The OpenAPI schemas of the server are used to construct the [OPTIMADE schemas](https://schemas.optimade.org/) site.
5453
1. An [OPTIMADE client](https://www.optimade.org/optimade-python-tools/latest/getting_started/client/) (`optimade-get`) that can query multiple [OPTIMADE providers](https://optimade.org/providers-dashboard) concurrently with a given filter, at the command-line or from Python code.
5554
1. A fuzzy API validator tool, which may be called from the shell (`optimade-validator`) or used as a GitHub Action from [optimade-validator-action](https://github.com/Materials-Consortia/optimade-validator-action); this validator is used to construct the [providers dashboard](https://optimade.org/providers-dashboard).
5655

docs/concepts/validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ To run the script, simply provide an OPTIMADE URL to the script at the command-l
1212
You can use the following to validate the Heroku deployment of our reference server:
1313

1414
```shell
15-
$ optimade-validator https://optimade.herokuapp.com/
16-
Testing entire implementation at https://optimade.herokuapp.com
15+
$ optimade-validator https://optimade.fly.dev/
16+
Testing entire implementation at https://optimade.fly.dev
1717
...
1818
```
1919

docs/getting_started/client.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ We can refine the search by manually specifying some URLs:
6060

6161
=== "Command line"
6262
```shell
63-
optimade-get --output-file results.json https://optimade.herokuapp.com https://optimade.odbx.science
63+
optimade-get --output-file results.json https://optimade.fly.dev https://optimade.odbx.science
6464
```
6565

6666
=== "Python"
6767
```python
6868
from optimade.client import OptimadeClient
6969
client = OptimadeClient(
70-
base_urls=["https://optimade.herokuapp.com", "https://optimade.odbx.science"]
70+
base_urls=["https://optimade.fly.dev", "https://optimade.odbx.science"]
7171
)
7272
client.get()
7373
```
@@ -97,22 +97,22 @@ At the command-line, the results of the query will be printed to `stdout`, ready
9797
For example:
9898

9999
```shell
100-
optimade-get --filter 'nsites = 1' --output-file results.json https://optimade.herokuapp.com
100+
optimade-get --filter 'nsites = 1' --output-file results.json https://optimade.fly.dev
101101
cat results.json
102102
```
103103

104104
has the following (truncated) output:
105105

106106
```json
107-
{
107+
{
108108
// The endpoint that was queried
109-
"structures": {
109+
"structures": {
110110
// The filter applied to that endpointk
111-
"nsites = 1": {
111+
"nsites = 1": {
112112
// The base URL of the OPTIMADE API
113-
"https://optimade.herokuapp.com": {
113+
"https://optimade.fly.dev": {
114114
// The OPTIMADE API response as if called with an infinite `page_limit`
115-
"data": [
115+
"data": [
116116
{
117117
"id": "mpf_1",
118118
"type": "structures",
@@ -147,7 +147,7 @@ This is the same format as the cached results of the Python client:
147147

148148
```python
149149
from optimade.client import OptimadeClient
150-
client = OptimadeClient(base_urls="https://optimade.herokuapp.com")
150+
client = OptimadeClient(base_urls="https://optimade.fly.dev")
151151
client.get('nsites = 1')
152152
client.get('nsites = 2')
153153
print(client.all_results)
@@ -158,10 +158,10 @@ will return a dictionary with top-level keys:
158158
{
159159
"structures": {
160160
"nsites = 1": {
161-
"https://optimade.herokuapp.com": {...}
161+
"https://optimade.fly.dev": {...}
162162
},
163163
"nsites = 2": {
164-
"https://optimade.herokuapp.com": {...}
164+
"https://optimade.fly.dev": {...}
165165
}
166166
}
167167
}

tests/server/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
TEST_URLS = [
1515
"https://example.com",
1616
"https://example.org",
17-
"https://optimade.herokuapp.com",
17+
"https://optimade.fly.dev",
1818
]
1919
TEST_URL = TEST_URLS[0]
2020

0 commit comments

Comments
 (0)