-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into oxidationstates24
- Loading branch information
Showing
136 changed files
with
109,056 additions
and
7,919 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ changelog: | |
- title: 🏥 Package Health | ||
labels: [pkg] | ||
- title: 🤷♂️ Other Changes | ||
labels: ["*"] | ||
labels: ["*"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Publish SMACT distributions to PyPI | |
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
- "v*" | ||
|
||
jobs: | ||
build-n-publish: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,4 +224,4 @@ $RECYCLE.BIN/ | |
|
||
*.swp | ||
|
||
*.bak | ||
*.bak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,67 @@ | ||
repos: | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: "5.12.0" | ||
hooks: | ||
- id: isort | ||
additional_dependencies: [toml] | ||
args: ["--profile", "black", "--filter-files","--line-length=80"] | ||
- repo: https://github.com/psf/black | ||
rev: "23.1.0" | ||
hooks: | ||
- id: black-jupyter | ||
args: [--line-length=80] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
- repo: https://github.com/nbQA-dev/nbQA | ||
rev: "1.6.1" | ||
hooks: | ||
- id: nbqa-pyupgrade | ||
additional_dependencies: [pyupgrade==3.3.1] | ||
args: [--py38-plus] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.1 | ||
hooks: | ||
# Run the linting tool | ||
- id: ruff | ||
types_or: [python, pyi] | ||
args: [--fix] | ||
# Run the formatter | ||
- id: ruff-format | ||
types_or: [python, pyi] # TODO: Fix notebooks to remove this | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.41.0 | ||
hooks: | ||
- id: markdownlint | ||
# MD013: line too long | ||
# MD024: Multiple headings with the same content | ||
# MD033: no inline HTML | ||
# MD041: first line in a file should be a top-level heading | ||
# MD025: single title | ||
args: | ||
[ | ||
--ignore, | ||
"dev_docs/design_docs/*", | ||
--disable, | ||
MD013, | ||
MD024, | ||
MD025, | ||
MD033, | ||
MD041, | ||
"--", | ||
] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v4.0.0-alpha.8 | ||
hooks: | ||
- id: prettier | ||
args: [--write] # edit files in-place | ||
additional_dependencies: | ||
- prettier | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.7.1 | ||
hooks: | ||
- id: nbstripout | ||
args: [--drop-empty-cells, --keep-output] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
stages: [commit, commit-msg] | ||
args: [--toml, pyproject.toml] | ||
additional_dependencies: | ||
- tomli | ||
- repo: https://github.com/RobertCraigie/pyright-python | ||
rev: v1.1.376 | ||
hooks: | ||
- id: pyright | ||
args: [--level, error] | ||
- repo: https://github.com/adamchainz/blacken-docs | ||
rev: 1.18.0 | ||
hooks: | ||
- id: blacken-docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
version: 2 | ||
|
||
build: | ||
os: "ubuntu-20.04" | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.8" | ||
python: "3.10" | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
configuration: docs/conf.py | ||
|
||
# Explicitly set the version of Python and its requirements | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
- requirements: docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Contributing | ||
|
||
This is a quick guide on how to follow best practice and contribute smoothly to `SMACT`. | ||
|
||
## Workflow | ||
|
||
We follow the [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow), using | ||
branches for new work and pull requests for verifying the work. | ||
|
||
The steps for a new piece of work can be summarised as follows: | ||
|
||
1. Push up or create [an issue](https://github.com/WMD-group/SMACT/issues). | ||
2. Create a branch from main, with a sensible name that relates to the issue. | ||
3. Do the work and commit changes to the branch. Push the branch | ||
regularly to GitHub to make sure no work is accidentally lost. | ||
4. Write or update unit tests for the code you work on. | ||
5. When you are finished with the work, ensure that all of the unit | ||
tests pass on your own machine. | ||
6. Open a pull request [on the pull request page](https://github.com/WMD-group/SMACT/pulls). | ||
7. If nobody acknowledges your pull request promptly, feel free to poke one of the main developers into action. | ||
|
||
## Pull requests | ||
|
||
For a general overview of using pull requests on GitHub look [in the GitHub docs](https://help.github.com/en/articles/about-pull-requests). | ||
|
||
When creating a pull request you should: | ||
|
||
- Ensure that the title succinctly describes the changes so it is easy to read on the overview page | ||
- Reference the issue which the pull request is closing | ||
|
||
Recommended reading: [How to Write the Perfect Pull Request](https://github.blog/2015-01-21-how-to-write-the-perfect-pull-request/) | ||
|
||
## Dev requirements | ||
|
||
When developing locally, it is recommended to install the python packages in `requirements-dev.txt`. | ||
|
||
```bash | ||
pip install -r requirements-dev.txt | ||
``` | ||
|
||
This will allow you to run the tests locally with pytest as described in the main README, | ||
as well as run pre-commit hooks to automatically format python files with isort and black. | ||
To install the pre-commit hooks (only needs to be done once): | ||
|
||
```bash | ||
pre-commit install | ||
pre-commit run --all-files # optionally run hooks on all files | ||
``` | ||
|
||
Pre-commit hooks will check all files when you commit changes, automatically fixing any files which are not formatted correctly. Those files will need to be staged again before re-attempting the commit. |
Oops, something went wrong.