Skip to content

Commit

Permalink
Use pyproject.toml to define PyPI package
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncameron-wk committed Jun 20, 2023
1 parent c7e91c7 commit 5db6ccf
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 53 deletions.
1 change: 1 addition & 0 deletions .github/workflows/puppeteer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
uses: actions/[email protected]
with:
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
check-latest: true
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ jobs:
uses: actions/[email protected]
with:
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
check-latest: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
pip install .[dev]
- name: Test with nose2
run: nose2
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ ARG GIT_TAG

WORKDIR /build/

COPY requirements*.txt /build/
COPY pyproject.toml /build/
RUN pip install -U pip setuptools && \
pip install -r requirements-dev.txt
pip install .[dev]

COPY . /build/
COPY --from=node-build /build/iXBRLViewerPlugin/viewer/dist /build/iXBRLViewerPlugin/viewer/dist
Expand All @@ -69,7 +69,7 @@ RUN nose2 --plugin nose2.plugins.junitxml --junit-xml-path ../test_reports/resul

# pypi package creation
ARG BUILD_ARTIFACTS_PYPI=/build/dist/*.tar.gz
RUN python setup.py sdist
RUN python -m build

ARG BUILD_ARTIFACTS_AUDIT=/audit/*
RUN mkdir /audit/
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include README.md
include requirements.txt
graft iXBRLViewerPlugin/viewer/dist
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[build-system]
requires = ["setuptools~=65.3", "wheel~=0.37", "setuptools_scm[toml]~=7.0"]
build-backend = "setuptools.build_meta"

[project]
name = "ixbrl-viewer"
dynamic = ['version']
readme = "README.md"
license = {text = "Apache-2.0"}
description = "The Workiva iXBRL Viewer allows iXBRL reports to be viewed interactively in a web browser."
authors = [
{name = "arelle.org", email = "[email protected]"}
]
keywords = ["xbrl"]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Operating System :: OS Independent',
'Topic :: Text Processing :: Markup :: XML'
]
requires-python = ">=3.7"
dependencies = [
'arelle_release==2.4.2',
'lxml>=4.6.3,<5.0.0',
'pycountry>=20.7.3,<21.0.0'
]

[project.optional-dependencies]
dev = [
'mock>=4.0.3,<6.0.0',
'nose2>=0.12.0,<1.0.0'
]

[project.scripts]
ixbrl-viewer = "iXBRLViewerPlugin:load_plugin_url"

[project.urls]
"Homepage" = "https://arelle.org/"
"Downloads" = "https://arelle.org/arelle/pub/"
"Documentation" = "https://arelle.org/arelle/documentation/"
"Blog" = "https://arelle.org/arelle/blog/"
"Source Code" = "https://github.com/workiva/ixbrl-viewer"
"Bug Reports" = "https://github.com/workiva/ixbrl-viewer/issues/"
"Support" = "https://groups.google.com/g/arelle-users/"

[tool.setuptools]
platforms = ["any"]

[tool.setuptools.packages.find]
namespaces = false

[tool.setuptools_scm]
tag_regex = "^(?:[\\w-]+-?)?(?P<version>[vV]?\\d+(?:\\.\\d+){0,2}[^\\+]*)(?:\\+.*)?$"
write_to = "iXBRLViewerPlugin/_version.py"
7 changes: 0 additions & 7 deletions requirements-dev.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

38 changes: 0 additions & 38 deletions setup.py

This file was deleted.

0 comments on commit 5db6ccf

Please sign in to comment.