Skip to content

Commit

Permalink
Use hatch as project manager
Browse files Browse the repository at this point in the history
  • Loading branch information
aleixalcacer committed Nov 24, 2022
1 parent 9a6b1b5 commit 18eb5fb
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 2,776 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install hatch
- name: Install package
run: |
poetry install
hatch env create dev
- name: Test with pytest
run: |
poetry run pytest
hatch -e dev run pytest tests
- name: Run pre-commit
run: |
poetry run pre-commit install
poetry run pre-commit run --all-files
hatch -e dev run pre-commit install
hatch -e dev run pre-commit run --all-files
6 changes: 3 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install hatch
- name: Build and publish
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}"
poetry publish --build
hatch build
hatch publish -u token -a ${{ secrets.PYPI_API_TOKEN }}
4 changes: 1 addition & 3 deletions archetypes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import importlib.metadata

from .algorithms import AA, BiAA, furthest_sum
from .visualization import simplex

__all__ = ["AA", "BiAA", "furthest_sum", "simplex"]

__version__ = importlib.metadata.version("archetypes")
__version__ = "0.3.0"
1 change: 0 additions & 1 deletion archetypes/version.py

This file was deleted.

6 changes: 3 additions & 3 deletions docs/development/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ A guide for developers who are doing a Archetypes release.
1. Bump the version of the project using a valid bump rule (`patch`, `minor`, `major`)
according to the release commits:

poetry version [bump rule]
hatch version [bump rule]

2. Commit the changes:

git commit -a -m "Getting ready for release $(poetry version -s)"
git commit -a -m "Getting ready for release $(hatch version)"
git push

3. Create a tag from `main` and push it to the Github repo. Use the next message:

git tag -a v$(poetry version -s) -m "Tagging version $(poetry version -s)"
git tag -a v$(hatch version) -m "Tagging version $(hatch version)"
git push --tags

4. [Create a release](https://github.com/aleixalcacer/archetypes/releases) on Github.
Loading

0 comments on commit 18eb5fb

Please sign in to comment.