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

[WIP] Documentation overhaul #309

Open
wants to merge 92 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
4cb8a50
Replace cation mutation by distorter
aronwalsh Aug 15, 2024
02d66e6
created tutorials folder and moved SolarOxides.ipynb
ryannduma Aug 15, 2024
aeb5940
Match Pan
aronwalsh Aug 15, 2024
455459b
Merge branch 'docs_updates' of https://github.com/WMD-group/SMACT int…
aronwalsh Aug 15, 2024
f14e909
Add book theme and update requirements
Aug 15, 2024
39485bb
smact-change-ts
lits19 Aug 15, 2024
e7fdf68
tweak utils
aronwalsh Aug 15, 2024
5dc804f
Create validity.ipynb
aronwalsh Aug 15, 2024
9c1c7e0
modified the markdown for the solar oxide tutorial
ryannduma Aug 15, 2024
2f1d6e1
Add files via upload
Panyalak Aug 15, 2024
4e8f8a1
Add files via upload
Panyalak Aug 15, 2024
fa54412
Create filter.ipynb
aronwalsh Aug 15, 2024
0401e55
Merge branch 'docs_updates' of https://github.com/WMD-group/SMACT int…
aronwalsh Aug 15, 2024
9c593f4
Update oxidation_states_examples.ipynb
Panyalak Aug 15, 2024
ec4a6c3
Delete examples/Oxidation_states/oxidation_states.ipynb
Panyalak Aug 15, 2024
2c4379f
small edits to the solar oxide tutorial markdown
ryannduma Aug 15, 2024
92822a9
adding notebook compatibility
keeeto Aug 15, 2024
54cf9e7
updating docs
keeeto Aug 15, 2024
30c2eed
update docs
keeeto Aug 15, 2024
316a9c8
renaming the tutorials
ryannduma Aug 15, 2024
5f022a8
update crystal space tutorial
hspark1212 Aug 15, 2024
8d6e447
added docstrings to the validity of GNoMe tutorial
ryannduma Aug 15, 2024
4c1ed80
exmaples
keeeto Aug 15, 2024
4e76a6c
Merge branch 'docs_updates' of github.com:WMD-group/SMACT into docs_u…
keeeto Aug 15, 2024
e160658
Pan changes
aronwalsh Aug 15, 2024
ac85da2
Merge branch 'docs_updates' of https://github.com/WMD-group/SMACT int…
aronwalsh Aug 15, 2024
3ae0fb3
Add html theme options (Repo link and launch buttons)
Aug 15, 2024
91e4a0c
Update readthedocs.yaml
Aug 15, 2024
b392245
Update requirements files
Aug 15, 2024
0dd8bb1
Run pre-commit
Aug 15, 2024
4f9b176
Update readthedocs.yaml
Aug 15, 2024
ab9ad8d
Example polish #1
aronwalsh Aug 15, 2024
121247f
Crystal space -> tutorials
aronwalsh Aug 15, 2024
16ac5d7
Examples -> Examples & Tutorials
aronwalsh Aug 15, 2024
fa64f27
Update SMACT.png
aronwalsh Aug 15, 2024
589e8f6
toc and more docs
keeeto Aug 16, 2024
59fef12
Merge branch 'docs_updates' of github.com:WMD-group/SMACT into docs_u…
keeeto Aug 16, 2024
35253f4
tutorials add to docs
keeeto Aug 16, 2024
74cde3e
remove other tutorials
keeeto Aug 16, 2024
f42e33e
remove other locations of examples
keeeto Aug 16, 2024
515ce53
landing page
keeeto Aug 16, 2024
3df5b6b
Notebook updates
aronwalsh Aug 16, 2024
5bbaad6
Ruff fixes
Aug 19, 2024
c240161
Merge branch 'AntObi-ruff' into docs_updates
Aug 19, 2024
ffb334a
Merge branch 'docs_updates' of https://github.com/WMD-group/SMACT int…
AntObi Aug 19, 2024
61a97e3
Merge conflicts
AntObi Aug 19, 2024
45dfe01
Add back shebang
AntObi Aug 19, 2024
0bb4fda
Add pre-commit hook to pre-commit config
AntObi Aug 19, 2024
a0a4cac
Run pre-commit-hooks
AntObi Aug 19, 2024
35e03f1
Add markdownlint and prettier to pre-commit-config
AntObi Aug 19, 2024
d671dc2
Run pre-commit with updated config file
AntObi Aug 19, 2024
d90c625
Add nbstripout to pre-commit
AntObi Aug 20, 2024
17d09ab
Run nbstripout
AntObi Aug 20, 2024
fcf1043
Add codespell to pre-commit
AntObi Aug 20, 2024
e52c689
Fix typos
AntObi Aug 20, 2024
82eff1e
Add pyright to pre-commit
AntObi Aug 20, 2024
c47ff74
Fix errors identified by pyright
AntObi Aug 20, 2024
c616b61
Add blacken-docs to pre-commit
AntObi Aug 20, 2024
f3eaf07
Add metadata into pyproject.toml
AntObi Aug 20, 2024
b4c8c15
Add keywords to pyproject.toml
AntObi Aug 20, 2024
c1af924
Add dev and docs requirements to pyproject.toml
AntObi Aug 20, 2024
d65e640
Restrict latest pymatgen version due to windows compatability
AntObi Aug 20, 2024
217bdf1
Update requirements.txt
AntObi Aug 20, 2024
fde8fe5
Update dev requirements file
AntObi Aug 20, 2024
c7bdf4b
google colab
Panyalak Aug 22, 2024
3d34a90
google colab
Panyalak Aug 22, 2024
090159d
google colab
Panyalak Aug 22, 2024
9f5f9cf
google colab
Panyalak Aug 22, 2024
2d7a189
google colab
Panyalak Aug 22, 2024
5675d63
google colab
Panyalak Aug 22, 2024
791d6e1
Add __init__.py to utils
AntObi Aug 22, 2024
4da13cf
Add utils as a package
AntObi Aug 22, 2024
f7e80f0
Run pre-commit
AntObi Aug 22, 2024
8a80bbb
Merge branch 'develop' of https://github.com/WMD-group/SMACT into doc…
AntObi Aug 30, 2024
2369591
Pre-commit fixes
AntObi Aug 30, 2024
ce421ed
Remove vec_example.py
AntObi Aug 31, 2024
fe74f4f
Add VEC example notebook
AntObi Aug 31, 2024
cb5ead3
Update rst
AntObi Aug 31, 2024
b753b8c
Update documentation
AntObi Aug 31, 2024
0c21a6c
Update conf.py
AntObi Aug 31, 2024
fe8d565
Update conf.py to render Latex in notebooks
AntObi Aug 31, 2024
e959684
Update docs/introduction.rst
AntObi Aug 31, 2024
f81af16
Fix link
AntObi Aug 31, 2024
afcbff6
Add comments for clarity
AntObi Aug 31, 2024
44ec28d
Merge branch 'docs_updates' of https://github.com/WMD-group/SMACT int…
AntObi Sep 1, 2024
2305f2f
Move crystal space utilities into crystal_space folder
AntObi Sep 2, 2024
7e4c1d7
Update imports
AntObi Sep 2, 2024
af5c9a8
Add __init__.py in crystal_space
AntObi Sep 2, 2024
7d96a15
Ruff fix
AntObi Sep 2, 2024
a382cfd
Add test for convert_formulas
AntObi Sep 3, 2024
beb2d3b
Add optional dependencies
AntObi Sep 3, 2024
5167778
Add docstring
AntObi Sep 3, 2024
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
7 changes: 3 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ Please describe the tests that you ran to verify your changes. Provide instructi
- [ ] Test B

**Test Configuration**:
* Python version:
* Operating System:

- Python version:
- Operating System:

## Reviewers

@mention individuals who you specifically want to involve in the discussion for this pull request and mention why they are needed in the discussion/why they are needed to review the pull request.


## Checklist:
## Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
Expand Down
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ changelog:
- title: 🏥 Package Health
labels: [pkg]
- title: 🤷‍♂️ Other Changes
labels: ["*"]
labels: ["*"]
50 changes: 23 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- master

jobs:

qa:
runs-on: ubuntu-latest
steps:
Expand All @@ -19,31 +18,28 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9","3.10","3.11","3.12"]
os: [ubuntu-latest,macos-latest,windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -e .
pip install pytest-cov
- name: Run tests and collect coverage
run: python -m pytest --cov=smact --cov-report=xml -v
- name: Upload coverage reports to CodeCov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
#files: ./coverage.xml
fail_ci_if_error: False
env_vars: OS,PYTHON
verbose: true



- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -e .
pip install pytest-cov
- name: Run tests and collect coverage
run: python -m pytest --cov=smact --cov-report=xml -v
- name: Upload coverage reports to CodeCov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
#files: ./coverage.xml
fail_ci_if_error: False
env_vars: OS,PYTHON
verbose: true
22 changes: 11 additions & 11 deletions .github/workflows/combine-prs.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: 'Combine PRs'
name: "Combine PRs"

# Controls when the action will run - in this case triggered manually
on:
workflow_dispatch:
inputs:
branchPrefix:
description: 'Branch prefix to find combinable PRs based on'
description: "Branch prefix to find combinable PRs based on"
required: true
default: 'dependabot'
default: "dependabot"
mustBeGreen:
description: 'Only combine PRs that are green (status is success)'
description: "Only combine PRs that are green (status is success)"
required: true
default: true
combineBranchName:
description: 'Name of the branch to combine PRs into'
description: "Name of the branch to combine PRs into"
required: true
default: 'combine-prs-branch'
default: "combine-prs-branch"
ignoreLabel:
description: 'Exclude PRs with this label'
description: "Exclude PRs with this label"
required: true
default: 'nocombine'
default: "nocombine"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
core.setFailed('Failed to create combined branch - maybe a branch by that name already exists?');
return;
}

let combinedPRs = [];
let mergeFailedPRs = [];
for(const { branch, prString } of branchesAndPRStrings) {
Expand All @@ -133,7 +133,7 @@ jobs:
mergeFailedPRs.push(prString);
}
}

console.log('Creating combined PR');
const combinedPRsString = combinedPRs.join('\n');
let body = '✅ This PR was created by the Combine PRs action by combining the following PRs:\n' + combinedPRsString;
Expand All @@ -148,4 +148,4 @@ jobs:
head: '${{ github.event.inputs.combineBranchName }}',
base: baseBranch,
body: body
});
});
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish SMACT distributions to PyPI
on:
push:
tags:
- 'v*'
- "v*"

jobs:
build-n-publish:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ $RECYCLE.BIN/

*.swp

*.bak
*.bak
88 changes: 66 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +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.8.7"
hooks:
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==3.3.1]
args: [--py39-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
8 changes: 4 additions & 4 deletions .readthedocs.yaml
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a quick guide on how to follow best practice and contribute smoothly to

## Workflow

We follow the [GitHub flow](<https://docs.github.com/en/get-started/using-github/github-flow>), using
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:
Expand Down
Loading