diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 43633339..36528475 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,3 +1,5 @@ +# Bug Reporting + --- name: Bug report about: Create a report to help us improve diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 23564059..69675921 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,3 +1,5 @@ +# Feature Requests + --- name: Feature request about: Suggest an idea for this project diff --git a/.github/PULL_REQUEST_TEMPLATE/SIMPLE_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE/SIMPLE_TEMPLATE.md index a64d1038..e7088c68 100644 --- a/.github/PULL_REQUEST_TEMPLATE/SIMPLE_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE/SIMPLE_TEMPLATE.md @@ -1,4 +1,4 @@ -## Related Issues and Dependencies +# Related Issues and Dependencies … diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00ced9f7..77f9ef63 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,19 +4,15 @@ To get set up, clone and enter the repo. -``` -git clone git@github.com:os-climate/physrisk.git -cd physrisk -``` + git clone git@github.com: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 `. Or, when adding something helpful for @@ -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 @@ -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 diff --git a/README.md b/README.md index 31cc2b71..25b5f118 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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)