Skip to content
Open
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/workflows/python_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
contents: read
pull-requests: read
with:
package-manager: 'conda'
package-manager: 'pixi'
app-name: 'grid_apps'
python-version: '3.10'
call-workflow-pre-commmit:
Expand All @@ -49,7 +49,7 @@ jobs:
contents: read
pull-requests: read
with:
package-manager: 'conda'
package-manager: 'pixi'
python-versions: '["3.10", "3.11", "3.12"]'
cache-number: 1
os: '["ubuntu-latest", "windows-latest"]'
Expand Down
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,15 @@ dmypy.json
# tempory generated files
pyproject-sha.toml

#version ignore
# auto-generated version file
grid_apps/_version.py

# not using poetry to lock, but pixi
poetry.lock

# pixi environments
.pixi/*
!.pixi/config.toml

# generated conda env files by pixi
*.pixi.conda.yml
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ repos:
hooks:
- id: pylint
name: pylint
entry: .\\devtools\\conda_env_pylint.bat
entry: pixi run --locked pylint
language: system
require_serial: true # pylint does its own parallelism
types: [python]
Expand All @@ -72,7 +72,7 @@ repos:
rev: v2.3.0
hooks:
- id: codespell
exclude: (-lock\.ya?ml|\benvironments/.*\.ya?ml|\.ipynb|^THIRD_PARTY_SOFTWARE\.rst)$
exclude: (^pixi.lock|-lock\.ya?ml|\benvironments/.*\.ya?ml|\.ipynb|^THIRD_PARTY_SOFTWARE\.rst)$
entry: codespell -I .codespellignore
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand Down
44 changes: 31 additions & 13 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
version: 2

# Set the version of Python and other tools you might need
build:
os: "ubuntu-22.04"
os: ubuntu-24.04
tools:
python: "mambaforge-22.9"
python: "3.10" # pre-install for the py310 environment of pixi
jobs:
post_checkout:
# Download and uncompress binary for the desired version of Git LFS
- |
set -e
LFS_VERSION="3.4.0"
wget "https://github.com/git-lfs/git-lfs/releases/download/v${LFS_VERSION}/git-lfs-linux-amd64-v${LFS_VERSION}.tar.gz"
tar xzf "git-lfs-linux-amd64-v${LFS_VERSION}.tar.gz" --strip-components=1 "git-lfs-${LFS_VERSION}/git-lfs"
rm "git-lfs-linux-amd64-v${LFS_VERSION}.tar.gz"
# Modify LFS config paths to point where git-lfs binary was downloaded
- git config filter.lfs.process "$(pwd)/git-lfs filter-process"
- git config filter.lfs.smudge "$(pwd)/git-lfs smudge -- %f"
- git config filter.lfs.clean "$(pwd)/git-lfs clean -- %f"
# Make LFS available in current repository
- ./git-lfs install
# Download content from remote
- ./git-lfs fetch
# Make local files to have the real content on them
- ./git-lfs checkout

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
create_environment:
- asdf plugin add pixi
- asdf install pixi latest
- asdf global pixi latest
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest

conda:
environment: docs/environment.yml

python:
install:
- method: pip
path: .
build:
html:
- pixi run --frozen build-docs html $READTHEDOCS_OUTPUT
5 changes: 0 additions & 5 deletions deps-lock-config.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions devtools/conda_env_pylint.bat

This file was deleted.

21 changes: 0 additions & 21 deletions docs/environment.yml

This file was deleted.

52 changes: 39 additions & 13 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
# '
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

import os
from datetime import datetime
from importlib.metadata import version
from importlib.metadata import version as get_version

from packaging.version import Version

Expand All @@ -26,38 +27,63 @@
author = "Mira Geoscience Ltd."
project_copyright = "%Y, Mira Geoscience Ltd"

package_name = "grid-apps"

full_version = Version(get_version(package_name))
# The full public version, including alpha/beta/rc tags
release = full_version.public
# remove the post release segment, if any
if full_version.is_postrelease:
release = release.rsplit(".post", 1)[0]
# The short X.Y.Z version.
version = full_version.base_version

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

# The full version, including alpha/beta/rc tags.
release = version("grid-apps")
# The shorter X.Y.Z version.
version = Version(release).base_version

autodoc_mock_imports = [
"numpy",
"geoh5py",
"geoapps_utils",
"pydantic",
"discretize",
]
nitpicky = True

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_issues",
"sphinxcontrib.googleanalytics",
]

intersphinx_mapping = {
# use None to auto-fetch objects.inv
"numpy": ("https://numpy.org/doc/1.26/", None),
"python": ("http://docs.python.org/3", None),
}

templates_path = ["_templates"]
exclude_patterns = []
todo_include_todos = True

googleanalytics_id = os.environ.get("GOOGLE_ANALYTICS_ID", "")
if not googleanalytics_id:
googleanalytics_enabled = False

issues_github_path = f"mirageoscience/{package_name}"

# -- Options for auto-doc ----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#module-sphinx.ext.autodoc

autodoc_typehints = "signature"

autodoc_mock_imports = [
"discretize",
"geoapps_utils",
"geoh5py",
"numpy",
"pydantic",
"scipy",
"tqdm",
]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

Expand Down
3 changes: 0 additions & 3 deletions environments/env-python-3.10.yml

This file was deleted.

3 changes: 0 additions & 3 deletions environments/env-python-3.11.yml

This file was deleted.

3 changes: 0 additions & 3 deletions environments/env-python-3.12.yml

This file was deleted.

139 changes: 0 additions & 139 deletions environments/py-3.10-linux-64-dev.conda.lock.yml

This file was deleted.

Loading
Loading