Skip to content

Commit

Permalink
Chore: Minor documentation formatting updates
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Watkins <[email protected]>
  • Loading branch information
ModeSevenIndustrialSolutions committed Nov 23, 2023
1 parent 966a22e commit b3eb94b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Bug Reporting

---
name: Bug report
about: Create a report to help us improve
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Feature Requests

---
name: Feature request
about: Suggest an idea for this project
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/SIMPLE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Related Issues and Dependencies
# Related Issues and Dependencies


Expand Down
52 changes: 20 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@

To get set up, clone and enter the repo.

```
git clone [email protected]:os-climate/physrisk.git
cd physrisk
```
git clone [email protected]:os-climate/physrisk.git
cd physrisk

We recommend using [pipenv](https://pipenv.pypa.io/en/latest/) for a
consistent working environment.

```
pip install pipenv
pipenv install
pipenv shell
```
pip install pipenv
pipenv install
pipenv shell

When adding a package for use in new or improved functionality,
`pipenv install <package-name>`. Or, when adding something helpful for
Expand All @@ -35,33 +31,27 @@ checks.
and enabling automatic formatting via [pre-commit](https://pre-commit.com/)
is recommended:

```
pre-commit install
```
pre-commit install

To ensure compliance with static check tools, developers may wish to run black and isort against modified files.

E.g.,

```
# auto-sort imports
isort .
# auto-format code
black .
```
# auto-sort imports
isort .
# auto-format code
black .

Code can then be tested using tox.

```
# run static checks and unit tests
tox
# run only tests
tox -e py3
# run only static checks
tox -e static
# run unit tests and produce an HTML code coverage report (/htmlcov)
tox -e cov
```
# run static checks and unit tests
tox
# run only tests
tox -e py3
# run only static checks
tox -e static
# run unit tests and produce an HTML code coverage report (/htmlcov)
tox -e cov

## IDE set-up

Expand All @@ -75,10 +65,8 @@ Actions are configured to release to PyPI on pushing a tag. In order to do this:
- Update VERSION
- Create new annotated tag and push

```
git tag -a v1.0.0 -m "v1.0.0"
git push --follow-tags
```
git tag -a v1.0.0 -m "v1.0.0"
git push --follow-tags

## Forking workflow

Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ Physrisk is also designed to be a hosted, e.g. to provide on-demand calculations

The library can be run locally, although access to the hazard indicator data is needed. The library is installed via:

```
pip install physrisk-lib
```
pip install physrisk-lib


Hazard indicator data is freely available. Members of the project are able to access OS-Climate S3 buckets. Credentials are available [here](https://console-openshift-console.apps.odh-cl1.apps.os-climate.org/k8s/ns/sandbox/secrets/physrisk-s3-keys). Information about the project is available via the [community-hub](https://github.com/os-climate/OS-Climate-Community-Hub). Non-members are able to download or copy hazard indicator data.

Expand All @@ -37,15 +36,11 @@ An inventory of the hazard data is maintained [here](https://github.com/os-clima

Access to hazard event data requires setting of environment variables specifying the S3 Bucket, for example:

```
OSC_S3_BUCKET=physrisk-hazard-indicators
OSC_S3_ACCESS_KEY=**********
OSC_S3_SECRET_KEY=**********
```
OSC_S3_BUCKET=physrisk-hazard-indicators
OSC_S3_ACCESS_KEY=**********
OSC_S3_SECRET_KEY=**********

For use in a Jupyter environment, it is recommended to put the environment variables in a credentials.env file and do, for example:

```
from dotenv import load_dotenv
load_dotenv(dotenv_path=dotenv_path, override=True)
```
from dotenv import load_dotenv
load_dotenv(dotenv_path=dotenv_path, override=True)

0 comments on commit b3eb94b

Please sign in to comment.