Skip to content

Commit

Permalink
update to pdm and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hhoeflin committed Jul 10, 2024
1 parent 8d5dd1d commit f6b40d2
Show file tree
Hide file tree
Showing 5 changed files with 976 additions and 144 deletions.
19 changes: 2 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
MAKEFILE_DIR=$(realpath $(dir $(firstword $(MAKEFILE_LIST))))

CONDA_ENV:=${MAKEFILE_DIR}/.conda_env
REPO_NAME:=mkreports

# ENVIRONMENT
create-base-env:
conda env create --prefix ${CONDA_ENV} --file conda_env.yaml \
&& conda run --prefix ${CONDA_ENV} flit install -s

lock-env:
conda env export --prefix ${CONDA_ENV} | grep -v ${REPO_NAME} > conda_env.lock.yaml

create-lock-env:
conda env create --prefix ${CONDA_ENV} --file conda_env.lock.yaml \
&& conda run --prefix ${CONDA_ENV} flit install -s

.ONESHELL:
.PHONY: create-mkdocs create-mkdocs-del create-site serve-mkdocs

# REPO
create-mkdocs:
Expand Down
7 changes: 1 addition & 6 deletions mkreports/md/file.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import hashlib
import importlib.resources as imp_res
import shutil
import sys
from os.path import relpath
from pathlib import Path
from typing import Optional, Set, Union

import attrs
import importlib_resources as imp_res

from .base import MdObj, NotRenderedError, RenderedMd, func_kwargs_as_set
from .md_proxy import register_md

if sys.version_info < (3, 9):
import importlib_resources as imp_res
else:
import importlib.resources as imp_res


def true_stem(path: Path) -> str:
"""True stem of a path, without all suffixes, not just last."""
Expand Down
Loading

0 comments on commit f6b40d2

Please sign in to comment.