Skip to content

merge and close CoV_xml branch #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .github/workflows/hazimp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ jobs:
Hazimp:
name: Test HazImp
runs-on: ubuntu-latest
strategy:
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ['3.8', '3.9', '3.10', '3.11']
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache conda
uses: actions/cache@v2
env:
Expand All @@ -27,13 +30,15 @@ jobs:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{hashFiles('hazimp.yml') }}

- name: Set up environment
uses: conda-incubator/setup-miniconda@v2.0.0
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-version: latest
auto-update-conda: false
channels: conda-forge,defaults
mamba-version: "*"
channel-priority: true
python-version: ${{ matrix.python-version }}
activate-environment: hazimp
environment-file: hazimp.yml
auto-activate-base: false
Expand All @@ -47,13 +52,14 @@ jobs:
shell: bash -l {0}
run: |
pytest --cov-report xml:coverage.xml --cov=hazimp

- name: Upload coverage.xml as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage report
path: coverage.xml
path: coverage-${{ matrix.python-version }}.xml
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: PYTHON
files: ./coverage.xml
files: ./coverage-${{ matrix.python-version }}.xml
5 changes: 4 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

# Required
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.6"

python:
version: "3.6"
install:
- requirements: docs/requirements.txt
- method: pip
Expand Down
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

34 changes: 13 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Status
[![codecov](https://codecov.io/gh/GeoscienceAustralia/hazimp/branch/master/graph/badge.svg?token=YPcgBIMxts)](https://codecov.io/gh/GeoscienceAustralia/hazimp)

Data
====
====

All exposure and hazard data under version control is for
testing purposes only and should not be considered as realistic. The
Expand All @@ -34,7 +34,7 @@ create a new (temporary) branch, make the fix, then submit teh fix as
a pull request. Once the pull request has been approved and merged,
the temporary branch can be deleted.

The preferred way to contribute to HazImp is to fork the
The preferred way to contribute to HazImp is to fork the
[main repository](http://github.com/GeoscienceAustralia/hazimp) on GitHub:

1. Fork the [project repository](http://github.com/GeoscienceAustralia/hazimp):
Expand All @@ -50,12 +50,13 @@ The preferred way to contribute to HazImp is to fork the
$ git checkout -b my-feature

and start making changes. Never work in the ``master`` branch! We recommend
starting from the ``develop`` branch, where we do our development work.
starting from the ``develop`` branch, where we do our development work.

4. Check the code using the unit test suite. This will also run a quick check of
the code syntax using ``pycodestyle``::
the code syntax using ``pycodestyle`` and produce a test coverage report
using ``coverage``::

$ nosetests -v --exe
$ pytest --cov

If this passes with no errors, then you can commit the changes.

Expand All @@ -73,7 +74,7 @@ Finally, go to the web page of your fork of the hazimp repo,
and click 'Pull request' to send your changes to the maintainers for
review. request. This will send an email to the committers.

(If any of the above seems like magic to you, then look up the
(If any of the above seems like magic to you, then look up the
[Git documentation](http://git-scm.com/documentation) on the web.)

It is recommended to check that your contribution complies with the
Expand All @@ -94,15 +95,11 @@ following rules before submitting a pull request:
You can also check for common programming errors with the following
tools:

- Code with good unittest coverage, check with::
- Code with good unittest coverage. This will also check syntax to
ensure PEP8 conformance. Check with::

$ pip install nose coverage --user
$ nosetests --with-coverage path/to/tests_for_package

- No pyflakes warnings, check with::

$ pip install pyflakes
$ pyflakes path/to/module.py
$ pip install pytest coverage --user
$ pytest

- No PEP8 warnings, check with::

Expand All @@ -119,7 +116,7 @@ Issues

A great way to start contributing to HazImp is to pick an item
from the list of [Issues](https://github.com/GeoscienceAustralia/hazimp/issues)
in the issue tracker. (Well there are none there yet, but we will be
in the issue tracker. (Well there are none there yet, but we will be
putting some up soon!) Resolving these issues allow you to start
contributing to the project without much prior knowledge. Your
assistance in this area will be greatly appreciated by the more
Expand All @@ -129,17 +126,12 @@ other issues.
Documentation
-------------

We are in the process of creating sphinx based documentation for HazImp.
Any help in setting this up will be gratefully accepted!

At present you will find the user_manual in the docs folder.

We are glad to accept any sort of documentation: function docstrings,
reStructuredText documents (like this one), tutorials, etc.
reStructuredText documents (will) live in the source code repository under the
docs/ directory.

When you are writing documentation, it is important to keep a good
When writing documentation, it is important to keep a good
compromise between mathematical and algorithmic details, and give
intuition to the reader on what the algorithm does. It is best to always
start with a small paragraph with a hand-waving explanation of what the
Expand Down
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@

# General information about the project.
project = u'HazImp'
copyright = u'2021, Geoscience Australia'
copyright = u'2024, Geoscience Australia'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.1'
version = '1.4'
# The full version, including alpha/beta/rc tags.
release = '1.1'
release = '1.4.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Loading
Loading