diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 9f79306..ab9e513 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -2,6 +2,7 @@ name: testing on: push: + branches: [main] pull_request: branches: [main] @@ -21,9 +22,9 @@ jobs: - name: Install dependencies & package run: | - python -m pip install --upgrade pip - pip install .[strict,tests,dev] - pip install . + python -m pip install --upgrade pip setuptools + pip freeze + pip install -e .[strict,tests,dev] - name: Lint run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 997002b..eaa3dd4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: additional_dependencies: [black] exclude: README.md - repo: https://github.com/pycqa/isort - rev: 5.11.4 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/pycqa/flake8 diff --git a/README.md b/README.md index 9a331fb..a83870d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ This is an example add-on package for [atomate2](https://github.com/materialsproject/atomate2). -It is heavily based on -the equivalent [add-on template for pymatgen](https://github.com/materialsproject/pymatgen-addon-template). +It is heavily based on the equivalent +[add-on template for pymatgen](https://github.com/materialsproject/pymatgen-addon-template). ## License diff --git a/pyproject.toml b/pyproject.toml index 0a90898..fb2dce4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,12 @@ [build-system] -requires = ["setuptools >= 42", "versioningit ~= 1.0", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling", "hatch-vcs >= 0.3.0"] +build-backend = "hatchling.build" -[tools.setuptools] -packages = ["atomate2.myaddon"] -[tools.setuptools.find] -where = ["src"] +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "_version.py" [project] name = "atomate2-myaddon" @@ -42,10 +43,6 @@ strict = ["atomate2[strict]"] [project.urls] repository = "https://github.com/matgenix/atomate2-addon-template" -[tool.versioningit.vcs] -method = "git" -default-tag = "0.0.1" - [tool.isort] profile = "black" diff --git a/src/atomate2/myaddon/__init__.py b/src/atomate2/myaddon/__init__.py index e69de29..754b350 100644 --- a/src/atomate2/myaddon/__init__.py +++ b/src/atomate2/myaddon/__init__.py @@ -0,0 +1 @@ +from atomate2.myaddon._version import __version__