Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBoothroyd committed Oct 20, 2024
1 parent 7cdd5c8 commit c5b057e
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 759 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
absolv/_version.py export-subst
.git_archival.txt export-subst
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
make env
make lint
make test
make docs-build
make docs
- name: CodeCov
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v4.1.1
with:
file: ./coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 0 additions & 6 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
fi
- name: Build and Deploy Documentation
env:
INSIDER_DOCS_TOKEN: ${{ secrets.INSIDER_DOCS_TOKEN }}
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
Expand All @@ -46,8 +44,4 @@ jobs:
git fetch --all --prune
make env
sed -i 's/# extensions/extensions/' mkdocs.yml
make docs-insiders INSIDER_DOCS_TOKEN="${INSIDER_DOCS_TOKEN}"
make docs-deploy VERSION="$VERSION"
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONDA_ENV_RUN=conda run --no-capture-output --name $(PACKAGE_NAME)

TEST_ARGS := -v --cov=$(PACKAGE_NAME) --cov-report=term --cov-report=xml --junitxml=unit.xml --color=yes

.PHONY: env lint format test docs-build docs-deploy docs-insiders
.PHONY: env lint format test docs docs-deploy

env:
mamba create --name $(PACKAGE_NAME)
Expand All @@ -22,15 +22,11 @@ format:
test:
$(CONDA_ENV_RUN) pytest -v $(TEST_ARGS) $(PACKAGE_NAME)/tests/

docs-build:
docs:
$(CONDA_ENV_RUN) mkdocs build

docs-deploy:
ifndef VERSION
$(error VERSION is not set)
endif
$(CONDA_ENV_RUN) mike deploy --push --update-aliases $(VERSION)

docs-insiders:
$(CONDA_ENV_RUN) pip install git+https://$(INSIDER_DOCS_TOKEN)@github.com/SimonBoothroyd/mkdocstrings-python.git \
git+https://$(INSIDER_DOCS_TOKEN)@github.com/SimonBoothroyd/griffe-pydantic.git@fix-inheritence-static
8 changes: 6 additions & 2 deletions absolv/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"""Absolute solvation free energy calculations using OpenMM"""

from . import _version
import importlib.metadata

try:
__version__ = importlib.metadata.version("absolv")
except importlib.metadata.PackageNotFoundError:
__version__ = "0+unknown"

__version__ = _version.get_versions()["version"]
__all__ = ["__version__"]
Loading

0 comments on commit c5b057e

Please sign in to comment.