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 @@ -26,14 +26,14 @@ jobs:
name: Static analysis
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-static_analysis.yml@main
with:
package-manager: 'conda'
package-manager: 'pixi'
app-name: 'curve_apps'
python-version: '3.10'
call-workflow-pytest:
name: Pytest
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-pytest.yml@main
with:
package-manager: 'conda'
package-manager: 'pixi'
python-versions: '["3.10", "3.11", "3.12"]'
os: '["ubuntu-latest", "windows-latest"]'
cache-number: 1
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
curve_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 @@ -58,7 +58,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 @@ -67,7 +67,7 @@ repos:
rev: v2.4.1
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
59 changes: 30 additions & 29 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"
python: "3.10" # pre-install for the py310 environment of pixi
jobs:
pre_build:
# Generate on-the-fly Sphinx configuration from Jupyter Book's _config.yml
- "pip install . --no-deps"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
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

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
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

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
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.

53 changes: 39 additions & 14 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

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 @@ -15,39 +17,62 @@
author = "Mira Geoscience Ltd."
project_copyright = "%Y, Mira Geoscience Ltd"

# The full version, including alpha/beta/rc tags.
release = version("curve-apps")
package_name = "curve-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 = Version(release).base_version
version = full_version.base_version

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
autodoc_mock_imports = [
"numpy",
"geoh5py",
"scipy",
"skimage",
"geoapps_utils",
"pydantic",
"tqdm",
]

nitpicky = True

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_issues",
"sphinxcontrib.googleanalytics",
]
nitpicky = True
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: list[str] = []
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 = [
"geoapps_utils",
"geoh5py",
"numpy",
"pydantic",
"scipy",
"skimage",
"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.

Loading
Loading