Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[tool.bumpversion]
current_version = "0.1.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "🥳 Bump version 📣 – {current_version} → {new_version}"
commit_args = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []
moveable_tags = []

[[tool.bumpversion.files]]
filename = "src/autoddg/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""
37 changes: 37 additions & 0 deletions .github/workflows/automatic_versioning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Bump version

on:
workflow_dispatch:
inputs:
bump-type:
description: 'Bump type'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Bump version
id: bump
uses: callowayproject/bump-my-version@master
env:
BUMPVERSION_TAG: "true"
with:
args: ${{ inputs.bump-type }} --config-file .bumpversion.toml
github-token: ${{ secrets.GH_TOKEN }}

- name: Check
if: steps.bump.outputs.bumped == 'true'
run: |
echo "Version was bumped from ${{ steps.bump.outputs.previous-version }} to ${{ steps.bump.outputs.current-version }}!"
38 changes: 38 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Compilation Verification

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
verify:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v5
with:
version: "latest"
python-version: ${{ matrix.python-version }}

- name: Refresh dependency lockfile
run: uv lock

- name: Sync project dependencies
run: uv sync --all-groups

- name: Verify sources compile
run: uv run python -m compileall src

- name: Smoke-test the package import
run: uv run python -c "import autoddg as pkg; print(pkg.__version__)"
92 changes: 92 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Publish to PyPI

on:
push:
tags:
- 'v*'

jobs:
pre-commit-checks:
name: Run pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0

- name: Install UV and Python
uses: astral-sh/setup-uv@v5
with:
version: "latest"
python-version: "3.10"

- run: uv venv
- run: uv sync --dev

- name: Run pre-commit
uses: tox-dev/action-pre-commit-uv@v1
with:
extra_args: --all-files

build-artifacts:
name: Build distributions
runs-on: ubuntu-latest
needs: pre-commit-checks
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Install UV and Python
uses: astral-sh/setup-uv@v5
with:
version: "latest"
python-version: "3.10"

- run: uv venv
- run: uv sync --all-groups

- name: Verify sources compile
run: uv run python -m compileall src

- name: Smoke-test the package import
run: uv run python -c "import autoddg as pkg; print(pkg.__version__)"

- name: Build package
run: uv build

- name: Upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
runs-on: ubuntu-latest
needs:
- build-artifacts
permissions:
contents: read
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Install UV and Python
uses: astral-sh/setup-uv@v5
with:
version: "latest"
python-version: "3.10"

- name: Download built distributions
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Publish to PyPI
run: uv publish --token ${{ secrets.PYPI_TOKEN }}
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@

## Installation

Clone the repository and install dependencies via [uv (recommended)](https://docs.astral.sh/uv/):
Via [uv (recommended)](https://docs.astral.sh/uv/):

```bash
git clone https://github.com/VIDA-NYU/AutoDDG.git
cd AutoDDG
uv sync
uv add autoddg
# If you do not have uv installed:
# * `curl -LsSf https://astral.sh/uv/install.sh | sh`
# * or look at https://docs.astral.sh/uv/getting-started/installation/
Expand All @@ -38,12 +36,9 @@ uv run --with jupyter jupyter lab
Alternatively, install directly via pip:

```bash
pip install git+https://github.com/VIDA-NYU/AutoDDG@main
pip install autoddg
```

> [!CAUTION]
> This installation method is temporary. A **PyPI release** of `AutoDDG` will soon be available. The `git+https` method will be deprecated in favor of the PyPI index.

---

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion src/autoddg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .profiling import SemanticProfiler, profile_dataset
from .topic import DatasetTopicGenerator

__version__ = "0.1.0.dev0"
__version__ = "0.1.0"

__all__ = [
"AutoDDG",
Expand Down