Skip to content
Snippets Groups Projects
Commit 894ba9b9 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

add check, update readme

parent 516c2a7d
No related branches found
No related tags found
1 merge request!4Database
......@@ -26,17 +26,45 @@ See [Poetry installation](https://python-poetry.org/docs/) instructions for more
pip install --user poetry
```
#### Poetry Version
Ensure you are running Poetry version 1.0 with:
## Usage
### Install Dependenices
```bash
poetry self update 1
poetry install
```
## Usage
### Install GeoPhys Database
The following will install the GeoPhys database only:
```bash
poetry run database --GeoPhys
```
### Install Dependenices and Database
To download all databases:
```bash
poetry run setup
poetry run database
```
The output directory for the database can be specified using the `--output` argument:
```bash
poetry run database --output="/path/to/database"
# Example
poetry run database --output="~/NCM_DATA"
```
The output directory can additionally be specified using the environmental variable
`NCM_DATABASE_PATH`:
```bash
export NCM_DATABASE_PATH="/path/to/database"
# Example
export NCM_DATABASE_PATH="~/NCM_DATA"
```
### Remove Database
To remove database directory:
```bash
poetry run database --clean
```
### Examples
......@@ -69,7 +97,17 @@ The GeoPhys project contains githooks on pre-commit and pre-push that
will check the Python code format using [Black](https://github.com/psf/black),
check the import sorting using [isort](https://github.com/timothycrosley/isort), and
lints the code using [Flake8](https://gitlab.com/pycqa/flake8).
The GitHooks are configured when using the `poetry run setup` command.
The GitHooks are configured with:
```
poetry run setup
```
### Checking the Format
To check the format of the code against Black and isort run:
```
poetry run format_check
```
### Formatting the Code
To automatically format the code using Black and isort run:
......
......@@ -6,6 +6,8 @@ import time
import numpy as np
from ncm_database import check_geo_phys_database
import geophys.geo_phys as gp
......@@ -83,6 +85,7 @@ parser.add_argument(
def main():
check_geo_phys_database()
t1 = time.time()
args = parser.parse_args()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment