Skip to content

Commit e50fc13

Browse files
Prepare 0.1.0 release (#4)
1 parent 3252cad commit e50fc13

27 files changed

+231
-801
lines changed

.github/workflows/deploypypi.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-22.04
11+
12+
steps:
13+
- name: Check out the repo
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: astral-sh/setup-uv@v4
18+
with:
19+
version: "latest"
20+
python-version: "3.12"
21+
22+
- name: Run install
23+
run: uv run make install
24+
25+
- name: Run lint
26+
run: uv run make lint
27+
28+
- name: Run tests
29+
run: uv run make test
30+
31+
- name: Publish package on PyPi
32+
run: uv publish --username __token__ --password ${{secrets.PYPI_TOKEN}}
33+
34+
# FIXME: Fails on prereleases; https://github.com/mindsers/changelog-reader-action/pull/39
35+
- name: Parse changelog
36+
id: changelog
37+
uses: mindsers/changelog-reader-action@v2
38+
with:
39+
version: ${{ github.ref_name }}
40+
41+
- name: Publish GitHub release
42+
id: create_release
43+
uses: actions/create-release@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
tag_name: ${{ github.ref_name }}
48+
release_name: ${{ steps.changelog.outputs.version }}
49+
body: |
50+
## ${{ steps.changelog.outputs.version }} - ${{ steps.changelog.outputs.date }}
51+
52+
${{ steps.changelog.outputs.changes }}
53+
draft: false
54+
prerelease: ${{ steps.changelog.outputs.status == 'prereleased' }}

.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.ref }}
4+
cancel-in-progress: true
5+
on:
6+
push:
7+
paths:
8+
- 'src/**'
9+
- 'tests/**'
10+
- 'pyproject.toml'
11+
- 'uv.lock'
12+
- '.github/workflows/test.yml'
13+
14+
jobs:
15+
test:
16+
name: Test
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
include:
21+
- os: ubuntu-latest
22+
arch: amd64
23+
python-version: "3.12"
24+
steps:
25+
- name: Check out the repo
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Python
29+
uses: astral-sh/setup-uv@v4
30+
with:
31+
version: "latest"
32+
python-version: "${{ matrix.python-version }}"
33+
34+
- name: Run install
35+
run: uv run make install
36+
37+
- name: Run lint
38+
run: uv run make lint
39+
if: contains(matrix.os, 'ubuntu') && contains(matrix.arch, 'amd64')
40+
41+
- name: Run tests
42+
run: uv run make test

.github/workflows/unittests.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.gitignore

Lines changed: 25 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,25 @@
1-
.vscode
2-
3-
# Byte-compiled / optimized / DLL files
4-
__pycache__/
5-
*.py[cod]
6-
*$py.class
7-
8-
# C extensions
9-
*.so
10-
11-
# Distribution / packaging
12-
.Python
13-
build/
14-
develop-eggs/
15-
dist/
16-
downloads/
17-
eggs/
18-
.eggs/
19-
lib/
20-
lib64/
21-
parts/
22-
sdist/
23-
var/
24-
wheels/
25-
*.egg-info/
26-
.installed.cfg
27-
*.egg
28-
MANIFEST
29-
30-
# PyInstaller
31-
# Usually these files are written by a python script from a template
32-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33-
*.manifest
34-
*.spec
35-
36-
# Installer logs
37-
pip-log.txt
38-
pip-delete-this-directory.txt
39-
40-
# Unit test / coverage reports
41-
htmlcov/
42-
.tox/
43-
.coverage
44-
.coverage.*
45-
.cache
46-
nosetests.xml
47-
coverage.xml
48-
*.cover
49-
.hypothesis/
50-
.pytest_cache/
51-
52-
# Translations
53-
*.mo
54-
*.pot
55-
56-
# Django stuff:
57-
*.log
58-
local_settings.py
59-
db.sqlite3
60-
61-
# Flask stuff:
62-
instance/
63-
.webassets-cache
64-
65-
# Scrapy stuff:
66-
.scrapy
67-
68-
# Sphinx documentation
69-
docs/_build/
70-
71-
# PyBuilder
72-
target/
73-
74-
# Jupyter Notebook
75-
.ipynb_checkpoints
76-
77-
# pyenv
78-
.python-version
79-
80-
# celery beat schedule file
81-
celerybeat-schedule
82-
83-
# SageMath parsed files
84-
*.sage.py
85-
86-
# Environments
87-
.env
88-
.venv
89-
env/
90-
venv/
91-
ENV/
92-
env.bak/
93-
venv.bak/
94-
95-
# Spyder project settings
96-
.spyderproject
97-
.spyproject
98-
99-
# Rope project settings
100-
.ropeproject
101-
102-
# mkdocs documentation
103-
/site
104-
105-
# mypy
106-
.mypy_cache/
107-
/.idea
1+
# Ignore all
2+
*
3+
!*/
4+
5+
# Add metadata and build files
6+
!.gitignore
7+
!.dockerignore
8+
!**/Dockerfile
9+
!**/Makefile
10+
!**/pyproject.toml
11+
!**/requirements*
12+
!**/uv.lock
13+
!**/README.md
14+
!**/.keep
15+
!src/**/py.typed
16+
17+
# Add Python code
18+
!src/**/*.py
19+
!examples/**/*.py
20+
!tests/**/*.py
21+
**/.*_cache
22+
**/__pycache__
23+
24+
# Docs
25+
!**/*.md

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
6+
7+
## [0.1.0] - 2024-12-02
8+
9+
Initial release; forked from `py-substrate-interface`.
10+
11+
## Changed
12+
13+
- All network-related functions and methods return coroutines now.
14+
- Optional cryptography dependencies moved to the optional `full` extra.
15+
16+
<!-- Links -->
17+
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
18+
[semantic versioning]: https://semver.org/spec/v2.0.0.html
19+
20+
<!-- Versions -->
21+
22+
[0.1.0]: https://github.com/dipdup-io/aiosubstrate/compare/57b665afdafbf06a6219e0600cdb696ae4b4bcfd...0.1.0

Makefile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
.PHONY: $(MAKECMDGOALS)
22
MAKEFLAGS += --no-print-directory
33
##
4-
## 🚧 DipDup developer tools
4+
## 🚧 aiosubstrate developer tools
55
##
66
PACKAGE=aiosubstrate
7-
TAG=latest
8-
SOURCE=aiosubstrate test examples
7+
SOURCE=src tests examples
98

109

1110
help: ## Show this help (default)
@@ -16,7 +15,7 @@ help: ## Show this help (default)
1615
##
1716

1817
install: ## Install dependencies
19-
uv sync --extra full
18+
uv sync --extra full --frozen
2019

2120
update: ## Update dependencies
2221
uv lock
@@ -28,20 +27,17 @@ update: ## Update dependencies
2827
all: ## Run an entire CI pipeline
2928
make format lint test
3029

31-
format: ## Format with all tools
32-
make black
30+
format: ## Format with ruff
31+
ruff format
3332

3433
lint: ## Lint with all tools
3534
make ruff mypy
3635

3736
test: ## Run tests
38-
COVERAGE_CORE=sysmon pytest test
37+
COVERAGE_CORE=sysmon pytest tests
3938

4039
##
4140

42-
black: ## Format with black
43-
black ${SOURCE}
44-
4541
ruff: ## Lint with ruff
4642
ruff check --fix --unsafe-fixes ${SOURCE}
4743

0 commit comments

Comments
 (0)