Skip to content

Commit

Permalink
Merge pull request #2 from zencastr/prepare-for-release
Browse files Browse the repository at this point in the history
Prepare for Release
  • Loading branch information
ruidfigueiredo authored Jan 8, 2024
2 parents 364baa8 + a4a0c0c commit e4591e8
Show file tree
Hide file tree
Showing 20 changed files with 154 additions and 17 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
37 changes: 37 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10","3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff mypy
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with ruff
run: |
ruff .
- name: Typecheck with mypy
run: |
mypy --install-types --non-interactive message_store/
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish 📦 to PyPI

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

6 changes: 0 additions & 6 deletions .vscode/settings.json

This file was deleted.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Zencastr Message Store for Python

Message store implementation in python
Message store implementation in Python

See: https://github.com/zencastr/nats-message-store
This package implements an event sourcing model of storing application data. It is similar to [Eventide](http://docs.eventide-project.org/core-concepts/event-sourcing.html#pub-sub).

Authors:

- Rui Figueiredo (@ruidfigueiredo)
1 change: 1 addition & 0 deletions message_store/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.1"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
62 changes: 62 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "message-store"
description = "Message Store is an event sourcing implementation on top of NATS JetStream"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
keywords = []
authors = [
{ name = "Rui Figueiredo", email = "rui@zencastr.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
"nats-py",
]
dynamic = ["version"]

[project.urls]
Documentation = "https://github.com/zencastr/message-store#readme"
Issues = "https://github.com/zencastr/message-store"
Source = "https://github.com/zencastr/message-store"

[tool.hatch.version]
path = "message_store/__about__.py"

[tool.hatch.build.targets.wheel]
packages = ["message_store"]

[tool.hatch.envs.default]
dependencies = [
"pytest",
"pytest-cov",
]
[tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=message_store --cov=tests {args}"
no-cov = "cov --no-cov {args}"

[[tool.hatch.envs.test.matrix]]
python = ["310", "311"]

[tool.coverage.run]
branch = true
parallel = true
omit = [
"message_store/__about__.py",
]

[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
8 changes: 0 additions & 8 deletions pyvenv.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ed25519==1.5
nats-py==2.3.1
nats-py==2.6.0
nkeys==0.1.0

0 comments on commit e4591e8

Please sign in to comment.