Skip to content

Commit

Permalink
Merge pull request #6 from shopinvader/modernize-sbi
Browse files Browse the repository at this point in the history
Modernize packaging & release
  • Loading branch information
sbidoul authored Jun 3, 2024
2 parents b5a213f + 5eafb25 commit 9736902
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 54 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
release:
types:
- published

name: release

jobs:
pypi:
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release

permissions:
# Used to authenticate to PyPI via OIDC.
id-token: write

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ">= 3.8"

- name: build
run: pipx run build

- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
138 changes: 138 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

2 changes: 0 additions & 2 deletions locomotivecms/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import requests

__version__ = '0.0.2'


class LocomotiveApiError(Exception):

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

[project]
name = "locomotivecms"
authors = [{ name = "Akretion", email = "[email protected]" }]
licence = "GNU Affero General Public License v3.0 or later"
description = "Client for locomotivecms"
dependencies = ["requests"]
readme = "README.rst"
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/shopinvader/locomotivecms-python-client/"

[tool.hatch.version]
source = "vcs"
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

32 changes: 0 additions & 32 deletions setup.py

This file was deleted.

0 comments on commit 9736902

Please sign in to comment.