Skip to content

Commit

Permalink
Changed all references from AGS-Validator or python-ags-api to pyagsapi
Browse files Browse the repository at this point in the history
Name for the project and API to be changed to pyagsapi
  • Loading branch information
KoalaGeo committed Aug 20, 2021
1 parent 4e8452f commit f367518
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 524 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: python-ags-api
IMAGE_NAME: pyagsapi

jobs:
# Push image to GitHub Packages.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AGS Utilities
# pyagsapi - AGS File Utilities API

HTTP API for the [AGS Python library](https://gitlab.com/ags-data-format-wg/ags-python-library).

Expand All @@ -12,15 +12,15 @@ Additionally .ags files can be validated for submission to the [National Geoscie

## Documentation

Read the docs at https://britishgeologicalsurvey.github.io/AGS-Validator/ for full documentation.
Read the docs at https://britishgeologicalsurvey.github.io/pyagsapi/ for full documentation.


## Quick start

The simplest way to run the validation service is via Docker:

```
docker run -p 80:80 --name ags-validator ghcr.io/britishgeologicalsurvey/python-ags-api
docker run -p 80:80 --name pyagsapi ghcr.io/britishgeologicalsurvey/pyagsapi
```

Navigate to [http://localhost](http://localhost) to see the landing page or
Expand All @@ -30,8 +30,8 @@ the Swagger interface.
The `latest` tag reflects the current state of the `main` branch of the
repository.
It may have breaking changes.
Use versions from tagged [Releases](https://github.com/BritishGeologicalSurvey/AGS-Validator/releases) to fix the version in deployment pipelines.
Available tags are listed in the [Package Registry](https://github.com/BritishGeologicalSurvey/AGS-Validator/pkgs/container/python-ags-api).
Use versions from tagged [Releases](https://github.com/BritishGeologicalSurvey/pyagsapi/releases) to fix the version in deployment pipelines.
Available tags are listed in the [Package Registry](https://github.com/BritishGeologicalSurvey/AGS-Validator/pkgs/container/pyagsapi).



Expand All @@ -46,8 +46,8 @@ It runs on the [Uvicorn](https://www.uvicorn.org/) ASGI server.
Use the following commands to run the API locally:

```bash
git clone https://github.com/BritishGeologicalSurvey/AGS-validator
cd AGS-validator
git clone https://github.com/BritishGeologicalSurvey/pyagsapi
cd pyagsapi
pip install -r requirements.txt
uvicorn app.main:app --reload
```
Expand All @@ -71,6 +71,6 @@ will start an IPython debugger session in the event of test failure.

### Licence

`AGS Validator` was created by and is maintained by the British Geological Survey.
`pyagsapi` was created by and is maintained by the British Geological Survey.
It is distributed under the [LGPL v3.0 licence](LICENSE).
Copyright: © BGS / UKRI 2021
4 changes: 2 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ def custom_openapi():
if app.openapi_schema:
return app.openapi_schema
openapi_schema = get_openapi(
title="AGS Python Libary API",
title="pyagsapi and AGS Python Library API",
version="0.1.0",
description=("This OpenAPI schema, Validate or convert your AGS files here. "
"Validation is against the official AGS standard only."),
routes=app.routes,
)
openapi_schema["info"]["x-logo"] = {
"url": ("https://raw.githubusercontent.com/BritishGeologicalSurvey/AGS-Validator"
"url": ("https://raw.githubusercontent.com/BritishGeologicalSurvey/pyagsapi"
"/main/app/static/img/BGS-Logo-Pos-RGB-01.png")
}
app.openapi_schema = openapi_schema
Expand Down
16 changes: 11 additions & 5 deletions app/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<html>
<head>
<title>AGS File Utilities</title>
<title>pyagsapi</title>
<link href="{{ url_for('static', path='/css/styles.css') }}" rel="stylesheet">
</head>
<body>
<img src="{{ url_for('static', path='/img/BGS-Logo-Pos-RGB-01.png') }}" alt="BGS Logo">
<h1>AGS File Utilities</h1>
<h1>pyagsapi - AGS File Utilities API</h1>
<br>
<p>Validate or convert your AGS files here. Validation is against the official AGS standard only.</p>
<p>Validate or convert your AGS files here.</p>
<p>
<ul>
<li>Accepts multiple AGS files. (Hold down <b>Ctrl</b> key to select more than one file)</li>
Expand All @@ -17,14 +17,14 @@ <h1>AGS File Utilities</h1>
</p>
<br>
<h2>AGS Validator - Single File</h2>
<p>Select .ags file for validation (v4.x only)</p>
<p>Select .ags file for validation (v4.x only). Validation is against the official AGS standard only.</p>
<form action="/validate/" enctype="multipart/form-data" method="post">
<input name="file" type="file">
<input type="submit">
</form>
<br>
<h2>AGS Validator - Multiple Files</h2>
<p>Select .ags files for validation (v4.x only)</p>
<p>Select .ags files for validation (v4.x only). Validation is against the official AGS standard only.</p>
<form action="/validatemany/" enctype="multipart/form-data" method="post">
<input name="files" type="file" multiple>
<input type="submit">
Expand All @@ -45,6 +45,12 @@ <h2>API Definition</h2>
<a href="/openapi.json/">OpenAPI Document</a>
</p>
</section>
<section id="notice">
<p>
pyagsapi was created by and is maintained by the British Geological Survey. It is distributed under the LGPL v3.0 licence. Copyright: © BGS / UKRI 2021
</p>
</section>

<img src="{{ url_for('static', path='/img/UKRI_NER_Council-Logo_Horiz-RGB.png') }}" alt="UKRI Logo">
</body>
</html>
54 changes: 25 additions & 29 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# AGS Utilities
# pyagsapi - AGS File Validation and Conversion

## Introduction

BGS AGS Utilities App offers a FastAPI implementation of the [AGS Python library](https://gitlab.com/ags-data-format-wg/ags-python-library).
BGS pyagsapi offers a FastAPI implementation of the [AGS Python library](https://gitlab.com/ags-data-format-wg/ags-python-library).

## Features

- Validate AGS files to v4.x of the AGS data format standard.
- Convert AGS files .ags<>.xlsx
- Convert AGS files .ags<-->.xlsx

### Future Features

Expand All @@ -26,30 +26,30 @@ This will check:
- LAT/LON coordinates should be in the LOCA_LAT and LOCA_LON columns(or HOLE equivalent)
- Local coordinates should not be duplicated in the BNG columns as this would indicate they have not been converted

## How AGS Utilities Works
## How pyagsapi Works

AGS Utilities is a python-based http server implementation of the [AGS Python library](https://gitlab.com/ags-data-format-wg/ags-python-library).
pyagsapi is a python-based http server implementation of the [AGS Python library](https://gitlab.com/ags-data-format-wg/ags-python-library).

It is built on the FastAPI framework, using the official FastAPI docker image as it's base.

The core Python API provides the functionality to validate and convert AGS geotechnical data. From here, standard Python web frameworks like Uvicorn and Starlette provide the web API/wrapper atop the core Python API.

## Install

AGS Utilities is easy to install on numerous evironments.
pyagsapi is easy to install on numerous environments.

### Requirements & Dependancies
### Requirements & Dependencies

AGS Utilities runs on Python 3 .
pyagsapi runs on Python 3.

### From Source

```python
python -m venv agsutilities
cd agsutilities
python -m venv pyagsapi
cd pyagsapi
. bin/activate
git clone https://github.com/BritishGeologicalSurvey/AGS-Validator.git
cd AGS-Validator
git clone https://github.com/BritishGeologicalSurvey/pyagsapi.git
cd pyagsapi
pip install -r requirements.txt
uvicorn app.main:app
```
Expand All @@ -58,11 +58,11 @@ uvicorn app.main:app

Container packages are published to GitHub, main branch is tagged `latest`, tagged releases use their version number `1,0-alpha`

[Container Registry](https://github.com/BritishGeologicalSurvey/AGS-Validator/pkgs/container/ags_utilities)
[Container Registry](https://github.com/BritishGeologicalSurvey/AGS-Validator/pkgs/container/pyagsapi)


```bash
docker run -d --name mycontainer -p 80:80 ghcr.io/britishgeologicalsurvey/ags_utilities:latest
docker run -d --name mycontainer -p 80:80 ghcr.io/britishgeologicalsurvey/pyagsapi:latest
```

## Configuration
Expand All @@ -72,58 +72,54 @@ docker run -d --name mycontainer -p 80:80 ghcr.io/britishgeologicalsurvey/ags_ut
To ammend the GUI HTML we recommend running via `Docker` using your own `Dockerfile` like the below.

```
FROM ghcr.io/britishgeologicalsurvey/ags_utilities:latest
FROM ghcr.io/britishgeologicalsurvey/pyagsapi:latest
# Add images to static
COPY cusomisation/logo.png app/app/static/logo.png
COPY customisation/logo.png app/app/static/logo.png
# Add index.html
COPY cusomisation/index.html app/app/templates/index.html
COPY customisation/index.html app/app/templates/index.html
```
## Deployment

### Docker

AGS Utilities provides an official Docker image which is made available on the GitHub Container Registry.
pyagsapi provides an official Docker image which is made available on the GitHub Container Registry.

#### The Basics

The official AGS Utilities Docker image will start a pygeoapi Docker container using FastAPI on internal port 80.
The official pyagsapi Docker image will start a pyagsapi Docker container using FastAPI on internal port 80.

To run :

```
docker run -d --name mycontainer -p 80:80 ghcr.io/britishgeologicalsurvey/ags_utilities:latest
docker run -d --name mycontainer -p 80:80 ghcr.io/britishgeologicalsurvey/pyagsapi:latest
```
## Development

The main repo for this project is https://github.com/BritishGeologicalSurvey/AGS-Validator/.
The main repo for this project is https://github.com/BritishGeologicalSurvey/pyagsapi/.

Please raise any feature requests, issues or pull requests against this repository.

### Container Registry

Containers for the application are hosted in the GitHub Container Registry

Every push to `Main` branch commits builds `ags_utilities:latest`
Pushed Tagged Releases with v* (v* == v0.1.0-alpha) builds `ags_utilities:0.1.0-alpha` (the "v" gets dropped for the tag)
Every push to `Main` branch commits builds `pyagsapi:latest`
Pushed Tagged Releases with v* (v* == v0.1.0-alpha) builds `pyagsapi:0.1.0-alpha` (the "v" gets dropped for the tag)

> Making tagged release via the GitHub.com gui does not build a container, developers need to create a tag locally then `git push origin v0.1.0-test`
## Have a specific question?

* Use the search bar in the top left to search this documentation
* Check the [FAQ section](other/faq)

## Have an issue?

Raise an issue on GitHub [Issue Tracker](https://github.com/BritishGeologicalSurvey/AGS-Validator/issues)
Raise an issue on GitHub [Issue Tracker](https://github.com/BritishGeologicalSurvey/pyagsapi/issues)


## Documenting the Documentation

This documentation is written in Markdown built & hosted on GitHub
pages, built using [Docsify](https://docsify.js.org).



pages, built using [Docsify](https://docsify.js.org).
6 changes: 0 additions & 6 deletions docs/_navbar.md

This file was deleted.

18 changes: 5 additions & 13 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
---

- [Home](/#introduction)

---

- [FAQ](other/faq.md)
- [Changelog](other/changelog.md)

---

- [![Code](https://icongr.am/feather/code.svg?size=16&color=808080) Markdown Cheatsheet](https://jhildenbiddle.github.io/docsify-themeable/#/markdown)
- [![Github](https://icongram.jgog.in/simple/github.svg?color=808080&size=16) Documentation on GitHub](https://github.com/BritishGeologicalSurvey/AGS-Validator)
- [![Github](https://icongram.jgog.in/simple/github.svg?color=808080&size=16) Raise Issue on GitHub](https://github.com/BritishGeologicalSurvey/AGS-Validator/issues)
- [![Email Feedback](https://icongr.am/fontawesome/envelope.svg?size=16&color=808080)Email Feedback](mailto:[email protected])

- [Features](/#features)
- [Install](/#install)
- [Configuration](/#configuration)
- [Deployment](/#deployment)
---
Loading

0 comments on commit f367518

Please sign in to comment.