Skip to content
Merged
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
18 changes: 0 additions & 18 deletions .run/Unit Tests.run.xml

This file was deleted.

20 changes: 20 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Deploying to PyPI

1. Create an API key on PyPI
2. Create a `.pypirc` file in your home directory with the following content:
```bash
[distutils]
index-servers =
lumino

[lumino]
repository = https://upload.pypi.org/legacy/
username = __token__
password = <API_KEY>
```

3. Make sure the `VERSION` file is updated
4. Run the following command:
```bash
./scripts/push-to-pypi.sh
```
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.3
0.10.0
Empty file removed requirements-test.txt
Empty file.
43 changes: 43 additions & 0 deletions scripts/push-to-pypi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# Exit immediately if a command exits with a non-zero status
set -e

# Check if twine is installed, if not, install it
if ! command -v twine &> /dev/null; then
echo "twine not found, please install it with 'pip install twine'"
exit
fi

# Check if a ~/.pypirc file exists, if not, error out
if [ ! -f ~/.pypirc ]; then
echo "Please create a ~/.pypirc file with your PyPI API token; example:"
echo "Example:"
echo "[distutils]"
echo " index-servers ="
echo " lumino"
echo ""
echo "[lumino]"
echo " repository = https://upload.pypi.org/legacy/"
echo " username = __token__"
echo " password = pypi-......"
exit
fi

# Remove any old distributions
echo "Removing old distributions..."
rm -rf dist/*

# Create source distribution and wheel
echo "Building the package..."
python setup.py sdist bdist_wheel

# Upload the package to PyPI
echo "Uploading the package to PyPI..."
twine upload --repository lumino dist/*

# Clean up
echo "Cleaning up build files..."
rm -rf build dist *.egg-info

echo "Package successfully uploaded to PyPI!"
15 changes: 9 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
from setuptools import setup, find_packages

# Read README.md file for long description
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

# Read version from VERSION file
with open("VERSION", "r", encoding="utf-8") as fh:
version = fh.read()

# Read requirements from requirements.txt file
with open("requirements.txt", "r", encoding="utf-8") as fh:
requirements = fh.read().splitlines()

# Setup configuration
setup(
name="lumino",
version=version,
Expand All @@ -18,10 +25,6 @@
url="https://github.com/luminolabs/lumino-sdk-python",
packages=find_packages(where="src"),
package_dir={"": "src"},
python_requires=">=3.7",
install_requires=[
"aiohttp",
"pydantic",
"pydantic[email]",
],
python_requires=">=3.10",
install_requires=requirements,
)
1 change: 0 additions & 1 deletion tests/test_sdk.py

This file was deleted.