Skip to content
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

pre-commit setup & code changes #241

Merged
merged 10 commits into from
Apr 27, 2023
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
4 changes: 2 additions & 2 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ This code of conduct applies to all communication: this includes IRC, the mailin
- Unwelcome sexual attention.
- Advocating for, or encouraging, any of the above behaviour.
- Repeated harassment of others. In general, if someone asks you to stop, then stop.
- When we disagree, we try to understand why. Disagreements, both social and technical, happen all the time and GPJax is no exception. It is important that we resolve disagreements and differing views constructively. Remember that we're different. The strength of GPJax comes from its varied community, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn't mean that they're wrong. Don't forget that it is human to err and blaming each other doesn't get us anywhere, rather offer to help resolving issues and to help learn from mistakes.
- When we disagree, we try to understand why. Disagreements, both social and technical, happen all the time and GPJax is no exception. It is important that we resolve disagreements and differing views constructively. Remember that we're different. The strength of GPJax comes from its varied community, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn't mean that they're wrong. Don't forget that it is human to err and blaming each other doesn't get us anywhere, rather offer to help resolving issues and to help learn from mistakes.

Text adapted from the [Speak Up! project](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html) and [Django](https://www.djangoproject.com/conduct/)
Text adapted from the [Speak Up! project](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html) and [Django](https://www.djangoproject.com/conduct/)
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ updates:
interval: weekly
versioning-strategy: lockfile-only
allow:
- dependency-type: "all"
- dependency-type: "all"
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
Please describe your changes here. If this fixes a bug, please link to the issue, if possible.

Issue Number: N/A

2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ categories:
- "build"
template: |
## Changes
$CHANGES
$CHANGES
34 changes: 27 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
minimum_pre_commit_version: 2.15.0
ci:
autofix_prs: false
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude_types: [json, binary]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
types_or: [python, markdown]
additional_dependencies: [tomli]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
exclude: examples/
- repo: local
hooks:
- id: commitizen
Expand All @@ -17,13 +42,8 @@ repos:
- id: ruff
name: ruff
entry: ruff
args: ["--fixable=ERA001,F401,F841,T201,T203"]
args: ["--exit-non-zero-on-fix"]
require_serial: true
language: system
types: [python]
- id: black
name: black
entry: black
require_serial: true
language: system
types: [python]
exclude: examples/
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ build:
- poetry install --with docs

sphinx:
configuration: docs/conf.py
configuration: docs/conf.py
2 changes: 1 addition & 1 deletion CITATION.bib
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
title: "GPJax: A Gaussian Process Framework in JAX"
issue: 75
volume: 7
year: 2022
year: 2022
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ process modelling.
> - [**Deep Kernel Regression**](https://gpjax.readthedocs.io/en/latest/examples/haiku.html)

## Guides for customisation
>
>
> - [**Custom kernels**](https://gpjax.readthedocs.io/en/latest/examples/kernels.html#Custom-Kernel)
> - [**UCI regression**](https://gpjax.readthedocs.io/en/latest/examples/yacht.html)

Expand Down Expand Up @@ -161,7 +161,7 @@ pip install gpjax
## Development version
> **Warning**
>
> This version is possibly unstable and may contain bugs.
> This version is possibly unstable and may contain bugs.

Clone a copy of the repository to your local machine and run the setup
configuration in development mode.
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ help:
.PHONY: help Makefile

%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ highly desirable.

We are making an active effort within GPJax to improve our documentation. If you
spot any areas where there is missing information within the existing
documentation, then please either raise an issue or
documentation, then please either raise an issue or
[create a pull request](https://gpjax.readthedocs.io/en/latest/contributing.html).

## An example docstring

An example docstring that adheres the principles of GPJax is given below.
The docstring contains a simple, snappy introduction with links to auxillary
components. More detail is then provided in the form of a mathematical
An example docstring that adheres the principles of GPJax is given below.
The docstring contains a simple, snappy introduction with links to auxillary
components. More detail is then provided in the form of a mathematical
description and a code example. The docstring is concluded with a description
of the objects attributes with corresponding types.

Expand Down Expand Up @@ -76,5 +76,5 @@ class Prior(AbstractPrior):

### Documentation syntax

A helpful cheatsheet for writing restructured text can be found
A helpful cheatsheet for writing restructured text can be found
[here](https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst).
2 changes: 1 addition & 1 deletion docs/_static/css/gpjax_theme.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nav .bd-links a:hover{
color: #B5121B
}
}
Loading