Skip to content

Commit

Permalink
Bugfix - Publish / Implement Source Build Pipeline (#23)
Browse files Browse the repository at this point in the history
* Update copyright, versioning, change directory structure

* Move source build to most recent schema

* Rewrite the package publish pipeline

Ref: #23
  • Loading branch information
sbhadr authored Feb 17, 2024
1 parent 2fcf9bc commit e74e2b8
Show file tree
Hide file tree
Showing 25 changed files with 333 additions and 330 deletions.
47 changes: 24 additions & 23 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: Upload Python Package

on:
release:
types: [created]

release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Python (3.8)
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Upgrade Pip, Build, Twine
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m pip install twine
- name: Build Source
run: |
python -m build
- name: Publish Source
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
notes.txt
*.pyc
**/__pycache__
.vscode
.vscode
.dist
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9.4
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021- Sanjay-B(Sanjay Bhadra)
Copyright (c) 2024- sbhadr (Sanjay Bhadra)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion examples/legacy/instanceGroup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import asyncio
import aiohttp
from pyblox3 import Groups_v1

# Instance your group as a variable
Expand Down
6 changes: 4 additions & 2 deletions examples/legacy/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# examples -> login.py
# pyblox
#
# By Sanjay-B(Sanjay Bhadra)
# Copyright © 2019- Sanjay-B(Sanjay Bhadra). All rights reserved.
# By sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr (Sanjay Bhadra). All rights reserved.
# THIS DOES NOT WORK. Roblox removed the ability for bots to login traditionally.
# Use an account cookie or opencloud instead.
#

from pyblox3 import *
Expand Down
29 changes: 0 additions & 29 deletions pyblox3/__init__.py

This file was deleted.

12 changes: 0 additions & 12 deletions pyblox3/src/util/cached.py

This file was deleted.

57 changes: 57 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "pyblox3"
version = "3.0-beta.6"
authors = [
{ name="Sanjay Bhadra", email="[email protected]" }
]
description = "An API wrapper for Roblox written in Python"
readme = "README.md"
license = { file="LICENSE" }
requires-python = ">=3.8"
dependencies = [
"aiohttp",
"asyncio",
"httpx",
"pytest"
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13"
]
keywords = [
"Python", "Roblox", "API", "Wrapper", "Library", "Python3", "API-Wrapper", "RobloxDev",
"Roblox-API", "Game Development", "Automation", "Scripting", "HTTP Requests",
"JSON", "Authentication", "User Management", "Asset Management", "Game Analytics",
"Server Communication", "Data Parsing", "Web Scraping", "Multiplayer Games",
"Community Engagement", "Player Data", "Game Sessions", "Inventory Management", "Platform Integration",
"Cloud Services", "Social Features", "Development Tools", "Content Creation", "Security",
"Rate Limiting", "Error Handling", "Open Source", "Collaboration", "Version Control",
"Documentation", "Tutorials", "User Support", "Performance Optimization", "Cross-platform",
"Event Handling", "Asynchronous Programming", "Dependency Management", "Unit Testing",
"Continuous Integration", "Deployment", "Community Contributions", "Licensing"
]

[project.urls]
Repository = "https://github.com/RbxAPI/Pyblox/tree/nightly_build"
Issues = "https://github.com/RbxAPI/Pyblox/issues"
Source = "https://github.com/RbxAPI/Pyblox"
Discord = "https://discord.com/invite/EDXNdAT"

[tool.hatch.build.targets.wheel]
packages = [
"src",
"pyblox3.webapi",
"pyblox3.webapi.util"
]
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

26 changes: 26 additions & 0 deletions src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# __init__.py
# pyblox
#
# By sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr (Sanjay Bhadra). All rights reserved.
#

__title__ = 'pyblox'
__author__ = 'sbhadr'
__version__ = '3.0-beta.6'
__license__ = 'MIT'
__copyright__ = 'Copyright © 2024- sbhadr (Sanjay Bhadra)'


# Parent Class Modules
from .webapi.groups import *
from .webapi.users import *
from .webapi.auth import *
from .webapi.abtesting import *
from .webapi.accountInformation import *
from .webapi.privateMessages import *
from .webapi.games import *

# Utility Modules
from .webapi.util import *
6 changes: 3 additions & 3 deletions pyblox3/src/abtesting.py → src/webapi/abtesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# abtesting.py
# pyblox
#
# By NSG (Nikita Petko) and IvanG (Ivan Gregrovnich) with Sanjay-B(Sanjay Bhadra)
# Copyright © 2019- Sanjay-B with MFD. All rights reserved.
# By NSG (Nikita Petko) and IvanG (Ivan Gregrovnich) with sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr with MFD. All rights reserved.
#

from .util import *
from .util import Req

root = "https://abtesting.roblox.com"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# accountInformation.py
# pyblox
#
# By Sanjay-B(Sanjay Bhadra)
# Copyright © 2019- Sanjay-B(Sanjay Bhadra). All rights reserved.
# By sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr (Sanjay Bhadra). All rights reserved.
#

from .util import *
from .util import Req

Req = Req()

Expand Down
8 changes: 2 additions & 6 deletions pyblox3/src/auth.py → src/webapi/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
# auth.py
# pyblox
#
# By Sanjay-B(Sanjay Bhadra)
# Copyright © 2019- Sanjay-B(Sanjay Bhadra). All rights reserved.
# By sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr (Sanjay Bhadra). All rights reserved.
#

from .util import *

Req = Req()

root = "https://auth.roblox.com"

class Auth_v2:
Expand Down
6 changes: 3 additions & 3 deletions pyblox3/src/games.py → src/webapi/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# games.py
# pyblox
#
# By Sanjay-B(Sanjay Bhadra)
# Copyright © 2019- Sanjay-B(Sanjay Bhadra). All rights reserved.
# By sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr (Sanjay Bhadra). All rights reserved.
#

from .util import *
from .util import Req

Req = Req()

Expand Down
6 changes: 3 additions & 3 deletions pyblox3/src/groups.py → src/webapi/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# groups.py
# pyblox
#
# By Sanjay-B(Sanjay Bhadra)
# Copyright © 2019- Sanjay-B(Sanjay Bhadra). All rights reserved.
# By sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr (Sanjay Bhadra). All rights reserved.
#

from .util import *
from .util import Req

Req = Req()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# privateMessages.py
# pyblox
#
# By Sanjay-B(Sanjay Bhadra)
# Copyright © 2021- Sanjay-B(Sanjay Bhadra). All rights reserved.
# By sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr (Sanjay Bhadra). All rights reserved.
#

from .util import *
from .util import Req

Req = Req()

Expand Down
6 changes: 3 additions & 3 deletions pyblox3/src/users.py → src/webapi/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# users.py
# pyblox
#
# By Sanjay-B(Sanjay Bhadra)
# Copyright © 2020- Sanjay-B(Sanjay Bhadra). All rights reserved.
# By sbhadr (Sanjay Bhadra)
# Copyright © 2024- sbhadr (Sanjay Bhadra). All rights reserved.
#

from .util import *
from .util import Req

Req = Req()

Expand Down
Loading

0 comments on commit e74e2b8

Please sign in to comment.