Skip to content

Commit

Permalink
streamlined working with this project
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeerArsala committed Oct 2, 2024
1 parent 1d98cdf commit d000b60
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 8 deletions.
Empty file added CHANGELOG.md
Empty file.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ For now, its purpose is for opening and closing receiver servers for auth throug

**NOTE: This is designed to be installed GLOBALLY (e.g. via `pipx` or `pixi global`). This is so that users need only install it on their system one time and that's it.**

## Usage
## Installation

```bash
pipx install ranlibx
```

## Usage

```bash
ranx --help
```

## Development

Prequisites: you must have [pixi](https://pixi.sh) and [pipelight](https://pipelight.dev) installed.

```bash
# Install dependencies
pixi install -e dev
Expand All @@ -30,10 +33,10 @@ pixi shell --change-ps1=false -e dev
To do releases:
1. After committing your code changes, change the version in `pyproject.toml`
2. Run `scripts/update-version.sh`. It will make an update version commit on your behalf
3. Create a release and push your code like so:
3. Create a release by pushing your code like so:

```bash
git tag v1.2.3
git push origin main v1.2.3
```

Not abstracting requiring the v[VERSION] tag was an intentional design decision almost as a "confirmation" of whether you want to release.
2 changes: 1 addition & 1 deletion pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,36 @@ name = "ranlibx"
version = "0.0.25"
description = "Global interface for RAN"
authors = [{ name = "Ameer Arsala", email = "[email protected]" }]
readme = "README.md"
license = { file = "LICENSE" }
dependencies = [
"fastapi>=0.112.2,<0.113",
"typer>=0.12.5,<0.13",
"httpx>=0.27.2,<0.28",
"pydantic>2.0",
"uvicorn[standard]>=0.30.6,<0.31",
"email-validator>=2.2.0,<3",
"email-validator>=2.2.0,<3",
"rich>=13.8.1,<14",
]
requires-python = ">= 3.9"

[project.urls]
Repository = "https://github.com/anemo-ai/ranlibx"
Changelog = "https://github.com/anemo-ai/ranlibx/blob/main/CHANGELOG.md"
Homepage = "https://ran.so/docs"
Source = "https://github.com/anemo-ai/ranlibx"
Tracker = "https://github.com/anemo-ai/ranlibx/issues"
Twitter = "https://twitter.com/AnemoDotAI"

[project.scripts]
ranx = "ranlibx.cli.main:app"

[project.optional-dependencies]
fdev = ["hatch>=1.12.0,<2"]
fdev = [
"hatch>=1.12.0,<2",
"pytest",
"tomli"
]

[build-system]
build-backend = "hatchling.build"
Expand All @@ -33,7 +47,6 @@ ranlibx = { path = ".", editable = true }

[tool.pixi.feature.fdev.dependencies]
ruff = ">=0.6.8,<0.7"
pytest = ">=8.3.3,<9"

# [tool.pixi.tasks]
## ranx = "python3 ranlibx/cli/main.py"
Expand Down
14 changes: 14 additions & 0 deletions scripts/helpers/read-version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import sys
import tomli
from ranlibx.constants import RANLIBX_PROJECT_ROOT


if __name__ == "__main__":
# Read the new version
with open(f"{RANLIBX_PROJECT_ROOT}/pyproject.toml", 'rb') as pyproject_dot_toml_file:
pyproject_dot_toml: dict = tomli.load(pyproject_dot_toml_file)

version: str = pyproject_dot_toml["project"]["version"]

sys.stdout(version)
sys.exit(0)
5 changes: 4 additions & 1 deletion scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ git status
git add pyproject.toml
git add pixi.lock

git commit -m "[UPDATED VERSION]"
version=$(python3 scripts/helpers/read-version.py)

git tag "v$version"
git commit -m "[UPDATE] v$version"

0 comments on commit d000b60

Please sign in to comment.