From 19bb5bd27f8e4fd40f15181e3f8324e7a89805ab Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 3 Jun 2024 11:26:32 -0500 Subject: [PATCH 1/5] Fix default dist filename for release task not sure why this fix was needed, did setuptools behavior change? --- tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks.py b/tasks.py index 9dbdd44..c35e30e 100644 --- a/tasks.py +++ b/tasks.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2022 Lance Edgar +# Copyright © 2010-2024 Lance Edgar # # This file is part of Rattail. # @@ -43,5 +43,5 @@ def release(c): c.run('python setup.py sdist --formats=gztar') # upload to PyPI - filename = 'tailbone-quickbooks-{}.tar.gz'.format(__version__) + filename = f'tailbone_quickbooks-{__version__}.tar.gz' c.run('twine upload dist/{}'.format(filename)) From 6bb18b47c10f62f21f81389a94ce58260ccc1c10 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 11 Jun 2024 19:04:00 -0500 Subject: [PATCH 2/5] feat: switch from setup.cfg to pyproject.toml + hatchling --- .gitignore | 3 +++ pyproject.toml | 41 +++++++++++++++++++++++++++++++++ setup.cfg | 30 ------------------------ setup.py | 29 ----------------------- tailbone_quickbooks/_version.py | 8 ++++++- tasks.py | 14 ++++------- 6 files changed, 55 insertions(+), 70 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 2e6159c..ea1abef 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ +*~ +*.pyc +dist/ tailbone_quickbooks.egg-info/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..a37a4ec --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,41 @@ + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + + +[project] +name = "tailbone-quickbooks" +version = "0.1.7" +description = "Tailbone integration package for Quickbooks" +readme = "README.rst" +authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] +license = {text = "GNU GPL v3+"} +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Office/Business", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "rattail-quickbooks", + "Tailbone", +] + + +[project.urls] +Homepage = "https://rattailproject.org" +Repository = "https://kallithea.rattailproject.org/rattail-project/tailbone-quickbooks" +Changelog = "https://kallithea.rattailproject.org/rattail-project/tailbone-quickbooks/files/master/CHANGELOG.md" + + +[tool.commitizen] +version_provider = "pep621" +tag_format = "v$version" +update_changelog_on_bump = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 0ed94fe..0000000 --- a/setup.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8; -*- - -[metadata] -name = tailbone-quickbooks -version = attr: tailbone_quickbooks.__version__ -author = Lance Edgar -author_email = lance@edbob.org -url = https://rattailproject.org/ -description = Tailbone integration package for Quickbooks -long_description = file: README.rst -classifiers = - Development Status :: 3 - Alpha - Environment :: Web Environment - Intended Audience :: Developers - License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) - Natural Language :: English - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Topic :: Office/Business - Topic :: Software Development :: Libraries :: Python Modules - - -[options] -install_requires = - rattail-quickbooks - Tailbone - -packages = find: -include_package_data = True diff --git a/setup.py b/setup.py deleted file mode 100644 index cf9b79d..0000000 --- a/setup.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8; -*- -################################################################################ -# -# Rattail -- Retail Software Framework -# Copyright © 2010-2023 Lance Edgar -# -# This file is part of Rattail. -# -# Rattail is free software: you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. -# -# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# Rattail. If not, see . -# -################################################################################ -""" -tailbone-quickbooks setup script -""" - -from setuptools import setup - -setup() diff --git a/tailbone_quickbooks/_version.py b/tailbone_quickbooks/_version.py index 4cdc594..4905e5d 100644 --- a/tailbone_quickbooks/_version.py +++ b/tailbone_quickbooks/_version.py @@ -1,3 +1,9 @@ # -*- coding: utf-8; -*- -__version__ = '0.1.7' +try: + from importlib.metadata import version +except ImportError: + from importlib_metadata import version + + +__version__ = version('tailbone-quickbooks') diff --git a/tasks.py b/tasks.py index c35e30e..2a3f1e0 100644 --- a/tasks.py +++ b/tasks.py @@ -24,24 +24,18 @@ Tasks for tailbone-quickbooks """ -import os - from invoke import task -here = os.path.abspath(os.path.dirname(__file__)) -exec(open(os.path.join(here, 'tailbone_quickbooks', '_version.py')).read()) - - @task def release(c): """ Release a new version of tailbone-quickbooks """ - # rebuild local tar.gz file for distribution + # rebuild package + c.run('rm -rf dist') c.run('rm -rf tailbone_quickbooks.egg-info') - c.run('python setup.py sdist --formats=gztar') + c.run('python -m build --sdist') # upload to PyPI - filename = f'tailbone_quickbooks-{__version__}.tar.gz' - c.run('twine upload dist/{}'.format(filename)) + c.run('twine upload dist/*') From 38af9dd4349d3e9fead761ad68c21dd1c85ddad1 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 11 Jun 2024 19:04:09 -0500 Subject: [PATCH 3/5] =?UTF-8?q?bump:=20version=200.1.7=20=E2=86=92=200.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cd3544..72cab08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to tailbone-quickbooks will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v0.2.0 (2024-06-11) + +### Feat + +- switch from setup.cfg to pyproject.toml + hatchling + ## [0.1.7] - 2024-06-03 ### Changed - Add support for Vendor -> Quickbooks Bank Accounts field. diff --git a/pyproject.toml b/pyproject.toml index a37a4ec..dfa9369 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "tailbone-quickbooks" -version = "0.1.7" +version = "0.2.0" description = "Tailbone integration package for Quickbooks" readme = "README.rst" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] From 5016ed9e6400408a8d176f65f8e2a0f2d306c8e8 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 16 Aug 2024 15:27:42 -0500 Subject: [PATCH 4/5] fix: refactor grid usage per wuttaweb --- .../quickbooks/exportable-invoices/index.mako | 2 +- tailbone_quickbooks/views/vendors.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tailbone_quickbooks/templates/quickbooks/exportable-invoices/index.mako b/tailbone_quickbooks/templates/quickbooks/exportable-invoices/index.mako index dc6ec4f..0469f32 100644 --- a/tailbone_quickbooks/templates/quickbooks/exportable-invoices/index.mako +++ b/tailbone_quickbooks/templates/quickbooks/exportable-invoices/index.mako @@ -97,7 +97,7 @@ this.toggleRows(uuids, checked) } - TailboneGrid.methods.allChecked = function(checkedList) { + ${grid.vue_component}.methods.allChecked = function(checkedList) { // (de-)select all visible invoices when header checkbox is clicked let checked = !!checkedList.length this.toggleRows(this.allRowUUIDs(), checked) diff --git a/tailbone_quickbooks/views/vendors.py b/tailbone_quickbooks/views/vendors.py index 853dc23..0ce3230 100644 --- a/tailbone_quickbooks/views/vendors.py +++ b/tailbone_quickbooks/views/vendors.py @@ -138,8 +138,8 @@ class VendorViewSupplement(ViewSupplement): def make_accounts_grid(request): - g = grids.Grid('quickbooks_bank_accounts', - request=request, + g = grids.Grid(request, + key='quickbooks_bank_accounts', data=[], # empty data columns=[ 'store', @@ -165,12 +165,12 @@ class BankAccountsWidget(dfwidget.Widget): def serialize(self, field, cstruct, **kw): g = make_accounts_grid(self.request) - g.main_actions.append( - grids.GridAction('edit', icon='edit', + g.actions.append( + grids.GridAction(self.request, 'edit', icon='edit', click_handler='quickbooksBankAccountEdit(props.row)')) - g.main_actions.append( - grids.GridAction('delete', icon='trash', + g.actions.append( + grids.GridAction(self.request, 'delete', icon='trash', click_handler='quickbooksBankAccountDelete(props.row)')) widget = render('/vendors/quickbooks_bank_accounts_widget.mako', { From bbded3272cb6dce4253d2e2b3ed96a4c5956aa15 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 13 Sep 2024 18:06:50 -0500 Subject: [PATCH 5/5] docs: use markdown for readme file --- README.md | 11 +++++++++++ README.rst | 14 -------------- pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a0c37d --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ + +# tailbone-quickbooks + +Rattail is a retail software framework, released under the GNU General +Public License. + +This package contains software interfaces for +[Quickbooks](https://quickbooks.intuit.com/). + +Please see the [Rattail Project](https://rattailproject.org/) for more +information. diff --git a/README.rst b/README.rst deleted file mode 100644 index 343f4bf..0000000 --- a/README.rst +++ /dev/null @@ -1,14 +0,0 @@ - -tailbone-quickbooks -=================== - -Rattail is a retail software framework, released under the GNU General -Public License. - -This package contains software interfaces for `Quickbooks`_. - -.. _`Quickbooks`: https://quickbooks.intuit.com/ - -Please see the `Rattail Project`_ for more information. - -.. _`Rattail Project`: https://rattailproject.org/ diff --git a/pyproject.toml b/pyproject.toml index dfa9369..c3a0bb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "hatchling.build" name = "tailbone-quickbooks" version = "0.2.0" description = "Tailbone integration package for Quickbooks" -readme = "README.rst" +readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] license = {text = "GNU GPL v3+"} classifiers = [