Skip to content

Commit

Permalink
Merge pull request #5 from AllenInstitute/feature/modify-dependency-g…
Browse files Browse the repository at this point in the history
…roups

Create Separate optional dependency groups for formatting and typing
  • Loading branch information
rpmcginty authored Dec 6, 2024
2 parents 2ce0dbc + b8f21db commit 7f872c7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
MAJOR_VERSION: ${{ steps.get-version-and-commit-sha.outputs.MAJOR_VERSION }}
MINOR_VERSION: ${{ steps.get-version-and-commit-sha.outputs.MINOR_VERSION }}
PATCH_VERSION: ${{ steps.get-version-and-commit-sha.outputs.PATCH_VERSION }}
VERSION_TAG: ${{ steps.get-version-and-commit-sha.outputs.VERSION_TAG }}
COMMIT_SHA: ${{ steps.get-version-and-commit-sha.outputs.COMMIT_SHA }}
steps:
- name: Checkout
Expand Down Expand Up @@ -80,7 +81,8 @@ jobs:
echo "PATCH_VERSION=$patch_version" >> $GITHUB_OUTPUT
short_version="$major_version.$minor_version"
echo "SHORT_VERSION=$short_version" >> $GITHUB_OUTPUT
commit_sha=$(git rev-parse $latest_tag)
echo "VERSION_TAG=$latest_tag" >> $GITHUB_OUTPUT
commit_sha=$(git rev-list -n 1 $latest_tag)
echo "COMMIT_SHA=$commit_sha" >> $GITHUB_OUTPUT
- name: Show version
run: |
Expand All @@ -89,6 +91,7 @@ jobs:
echo MAJOR_VERSION: ${{ steps.get-version-and-commit-sha.outputs.MAJOR_VERSION }}
echo MINOR_VERSION: ${{ steps.get-version-and-commit-sha.outputs.MINOR_VERSION }}
echo PATCH_VERSION: ${{ steps.get-version-and-commit-sha.outputs.PATCH_VERSION }}
echo VERSION_TAG: ${{ steps.get-version-and-commit-sha.outputs.VERSION_TAG }}
echo COMMIT_SHA: ${{ steps.get-version-and-commit-sha.outputs.COMMIT_SHA }}
build:
Expand All @@ -99,7 +102,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.bump.outputs.COMMIT_SHA }}
ref: ${{ needs.bump.outputs.VERSION_TAG }}
- name: Set up Python ${{ github.event.inputs.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ $(PYTHON):
install: $(INSTALL_STAMP) ## Installs package dependencies
$(INSTALL_STAMP): $(PYTHON) $(DEP_FILES)
@. $(VENV_BIN)/activate;\
$(PIP) install -e .[dev];
$(PIP) install -e .[all];
@touch $(INSTALL_STAMP)

install-release: clean-install-stamp $(PYTHON) $(DEP_FILES) ## Installs package for release
@. $(VENV_BIN)/activate;\
$(PIP) install .[release]


install-force: clean-install-stamp install ## Force install package dependencies

link-packages: ## Link local packages to virtualenv
Expand Down
21 changes: 15 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build-backend = "hatchling.build"
# -----------------------------------------------------------------------------
[project]
name = "aibs-informatics-test-resources"
authors = [{ name = "AIBS Informatics Group"}]
authors = [{ name = "AIBS Informatics Group", email = "[email protected]"}]
maintainers = [{ name = "AIBS Informatics Group", email = "[email protected]"}]
description = "unit test resources for AIBS informatics packages"
readme = { file = "README.md", content-type = "text/markdown" }
Expand All @@ -19,21 +19,30 @@ dynamic = ["version"]

requires-python = ">=3.9"
dependencies = [
"black==23.11.0",
"coverage[toml]~=7.3",
"flake8~=6.1.0",
"isort~=5.10",
"mypy~=1.6",
"pytest~=7.4",
"pytest-cov",
]

[project.optional-dependencies]
all = [
"aibs-informatics-test-resources[formatting]",
"aibs-informatics-test-resources[typing]",
]

formatting = [
"black==23.11.0",
"flake8~=6.1.0",
"isort~=5.10",
]

typing = [
"mypy~=1.6",
]

release = [
"build",
"bump-my-version",
"twine",
"wheel",
]

Expand Down

0 comments on commit 7f872c7

Please sign in to comment.