Skip to content

Commit

Permalink
Merge pull request #164 from amarquand/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
amarquand authored Dec 16, 2023
2 parents df800f4 + 0ea26a7 commit 9ce2570
Show file tree
Hide file tree
Showing 98 changed files with 7,951 additions and 7,466 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This configuration does the following:

# It triggers the CI pipeline when code is pushed to the master branch.
# It sets up a Python environment, installs project dependencies, and runs pytest.
# Test results are uploaded as artifacts for later examination.

name: CI

on:
push:
branches:
# - master
- 147_CI-pipeline
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.13

- name: Install Dependencies
run: |
pip install -r requirements.txt
pip install pytest pytest-html pytest-cov
- name: Run Tests with coverage and save report
run: |
coverage run -m pytest pytest/ --junitxml=report.xml --html=report.html
coverage xml -o coverage.xml
continue-on-error: true # Continue to the next step even if tests fail

- name: Upload HTML Report
uses: actions/upload-artifact@v2
with:
name: test-report-html
path: report.html

- name: Upload XML Report
uses: actions/upload-artifact@v2
with:
name: test-report-xml
path: report.xml

- name: Upload Coverage Report
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: coverage.xml
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ ssh_error_log.txt
HBR_demo/*
dist/pcntoolkit-0.27-py3.11.egg


# Overrule for github folder
!.github

# Basic test functions for SHASH
tests/test_SHASH.ipynb

11 changes: 10 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ version 0.27
- Added configuration files for containerisation with Docker

version 0.28
- Updated to PyMC5 (including migrating back-end to PyTensor
- Updated to PyMC5 (including migrating back-end to PyTensor)
- Added support for longitudinal normative modelling with BLR (see Buckova-Rehak et al 2023)
- Changed default optimiser for trend surface models (for scalability)

version 0.29
- Bug fixes (e.g. HBR predict crash, normative_paralell support for .txt input)
- Added docstrings for most functions
- Fixed some problems with exception handling
- Formatted whole project with autopep8
- Addedd functionality to compute SHASH z-scores from normative.py
- Updated requirements
- Basic pytest continuous integration framework implemented
71 changes: 71 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Contributing to PCNtoolkit

First off, thanks for taking the time to contribute! 🎉👍

The following is a set of guidelines for contributing to PCNtoolkit. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

## How Can I Contribute?

### Reporting Bugs

This section guides you through submitting a bug report. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.

**Before Submitting A Bug Report**

- Check the debugging guide.
- Check the FAQs on the forum for a list of common questions and problems.
- Ensure the bug is not already reported by searching on GitHub under [Issues](https://github.com/amarquand/PCNtoolkit/issues).

**How Do I Submit A Good Bug Report?**

Bugs are tracked as [GitHub issues](https://github.com/amarquand/PCNtoolkit/issues). Create an issue and provide the following information:

- **Use a clear and descriptive title** for the issue to identify the problem.
- **Describe the exact steps which reproduce the problem** in as much detail as possible.
- **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples.

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.

**How Do I Submit A Good Enhancement Suggestion?**

Enhancement suggestions are tracked as [GitHub issues](https://github.com/amarquand/PCNtoolkit/issues). Create an issue and provide the following information:

- **Use a clear and descriptive title** for the issue to identify the suggestion.
- **Provide a step-by-step description of the suggested enhancement** in as much detail as possible.
- **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.

<!--
### Pull Requests
The process described here has several goals:
- Maintain the project's quality
- Fix problems that are important to users
- Engage the community in working toward the best possible project
- Enable a sustainable system for the project's maintainers to review contributions
Please follow these steps to have your contribution considered by the maintainers:
1. Follow all instructions in [the template](your-pull-request-template-link)
2. Follow the [styleguides](your-styleguide-link)
3. After you submit your pull request, verify that all [status checks](your-ci-link) are passing -->

## Styleguides

### Git Commit Messages

- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line

### Python Styleguide

All Python code must adhere to [PEP 8](https://www.python.org/dev/peps/pep-0008/), and we use `autopep8` for automatic code formatting. Please see the [autopep8 documentation](https://github.com/hhatto/autopep8) for more details. The autopep8 settings can be found in setup.cfg.


## Additional Notes

Feel free to propose changes to this document in a pull request.
Loading

0 comments on commit 9ce2570

Please sign in to comment.