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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
*.h5 filter=lfs diff=lfs merge=lfs -text
*.ipynb filter=lfs diff=lfs merge=lfs -text
*.min.js filter=lfs diff=lfs merge=lfs -text

# SCM syntax highlighting & preventing 3-way merges
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# SCM syntax highlighting & preventing 3-way merges
# SCM syntax highlighting & preventing 3-way merges

pixi.lock merge=binary linguist-language=YAML linguist-generated=true
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: 'poetry'
package-manager: 'pixi'
app-name: 'las_geoh5'
python-version: '3.10'
call-workflow-pytest:
name: Pytest
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-pytest.yml@main
with:
package-manager: 'poetry'
package-manager: 'pixi'
python-versions: '["3.10", "3.11", "3.12"]'
os: '["ubuntu-latest", "windows-latest"]'
cache-number: 1
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,12 @@ dmypy.json
# geoh5 locks
*.geoh5.lock

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

# not using poetry to lock, but pixi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# not using poetry to lock, but pixi
# not using poetry to lock, but pixi

poetry.lock

# pixi environments
.pixi/*
!.pixi/config.toml
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ repos:
rev: 2.1.3
hooks:
- id: poetry-check
args: [--lock, --no-plugins]
- repo: https://github.com/hadialqattan/pycln
rev: v2.5.0
hooks:
Expand Down Expand Up @@ -59,7 +58,7 @@ repos:
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
entry: pixi run --locked pylint
language: system
require_serial: true # pylint does its own parallelism
types: [python]
Expand All @@ -68,7 +67,7 @@ repos:
rev: v2.4.1
hooks:
- id: codespell
exclude: (\.lock|\.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: v6.0.0
Expand Down
39 changes: 30 additions & 9 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,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:
pre_build:
- "pip install . --no-deps"
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
build:
html:
- pixi run --frozen build-docs html $READTHEDOCS_OUTPUT
53 changes: 49 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,72 @@

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os

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

from packaging.version import Version

project = "las-geoh5"
project_copyright = "%Y, Mira Geoscience Ltd"
author = "Mira Geoscience Ltd."

# The full version.
release = version("las-geoh5")
package_name = "las-geoh5"

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 base 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

extensions = []
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: list[str] = []

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
Loading
Loading