Skip to content

Commit

Permalink
add conditional to only coverage report on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
metazool committed Aug 20, 2024
1 parent c81c9e7 commit c366436
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
uses: ./.github/workflows/deploy-docs.yml
with:
pages_artifact_name: ${{ needs.build-docs.outputs.pages_artifact_name }}
if: ${{ github.ref_name == 'main' || github.head_ref == 'main'}}
if: ${{ github.ref_name == 'main' || github.head_ref == 'main'}} && github.event_name != 'pull_request'
needs: [test-python, build-docs]
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,36 @@ pip install -e .[test]
pytest
```

## Run the API

This needs a set of credentials - an Access Key, a Secret Key and an Endpoint.

[Overview of obtaining these details from JASMIN](https://github.com/NERC-CEH/object_store_tutorial/?tab=readme-ov-file#an-introduction-to-object-storage)

`.env` contains variables which hold the key-value pairs, they are automatically loaded when you run the API. The key names all include `AWS` because they come originally from libraries to work with Amazon s3 storage, but JASMIN supports the same de facto standard.

Contents of `.env`:

```
AWS_ACCESS_KEY_ID="key goes here"
AWS_SECRET_ACCESS_KEY="secret goes here"
AWS_URL_ENDPOINT="url goes here"
```

### Standalone, for testing

`python src/os_api/api.py`

This will bring up the OpenAPI documentation on localhost:8080

### With uvicorn / nginx

TBD

### In docker

TBD if this proves useful - current deployment target is Posit Connect

### Automatic Versioning

This codebase is set up using [autosemver](https://autosemver.readthedocs.io/en/latest/usage.html#) a tool that uses git commit history to calculate the package version. Each time you make a commit, it increments the patch version by 1. You can increment by:
Expand Down

0 comments on commit c366436

Please sign in to comment.