Skip to content

Commit

Permalink
Add package stubs and structure
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca committed Nov 29, 2022
1 parent 75f01b1 commit c722fee
Show file tree
Hide file tree
Showing 17 changed files with 312 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: tests

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'constructor-manager/**'
- 'constructor-manager-cli/**'
workflow_dispatch:

jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies cli
run: |
cd constructor-manager-cli
python -m pip install --upgrade pip
python -m pip install setuptools tox tox-gh-actions
pip list
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
run: |
cd constructor-manager-cli
python -m tox
env:
PLATFORM: ${{ matrix.platform }}

# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
run: |
cd constructor-manager
python -m tox
env:
PLATFORM: ${{ matrix.platform }}
21 changes: 21 additions & 0 deletions constructor-manager-cli/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022, Napari

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
5 changes: 5 additions & 0 deletions constructor-manager-cli/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include LICENSE
include README.md

recursive-exclude * __pycache__
recursive-exclude * *.py[co]
3 changes: 3 additions & 0 deletions constructor-manager-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Constructor Manager Commnand line interface

Handle (conda) constructor based bundled applications from the command line.
6 changes: 6 additions & 0 deletions constructor-manager-cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = ["setuptools>=42.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 79
59 changes: 59 additions & 0 deletions constructor-manager-cli/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[metadata]
name = constructor-manager-cli
version = 0.1.0
description = TODO
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/napari/packaging/constructor-manager-cli
author = napari
author_email = TODO
license = MIT
license_files = LICENSE
classifiers =
Development Status :: 2 - Pre-Alpha
Framework :: napari
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Image Processing
project_urls =
Bug Tracker = https://github.com/napari/packaging/issues
Source Code = https://github.com/napari/packaging/constructor-manager-cli

[options]
packages = find:
install_requires =
packaging
requests
pyyaml
python_requires = >=3.8
include_package_data = True
package_dir =
=src
[options.packages.find]
where = src

[options.entry_points]
console_scripts =
constructor-manager = constructor_manager_cli.main:main

[options.extras_require]
testing =
pytest-cov
pytest>=7.0.0
mypy
typing-extensions
types-PyYAML
types-requests

[mypy]
exclude = venv|tests

[mypy-packaging.*]
ignore_missing_imports = True
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Constructor manager CLI."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Constructor manager CLI."""

import constructor_manager_cli


def test_constructor_manager():
assert constructor_manager_cli
31 changes: 31 additions & 0 deletions constructor-manager-cli/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py{38,39,310}-{linux,macos,windows}
isolated_build=true

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310

[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
macos-latest: macos
windows-latest: windows

[testenv]
platform =
macos: darwin
linux: linux
windows: win32
passenv =
CI
GITHUB_ACTIONS
DISPLAY XAUTHORITY
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
PYVISTA_OFF_SCREEN
extras =
testing
commands = pytest -v --color=yes --cov=constructor_manager_cli
21 changes: 21 additions & 0 deletions constructor-manager/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022, Napari

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
5 changes: 5 additions & 0 deletions constructor-manager/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include LICENSE
include README.md

recursive-exclude * __pycache__
recursive-exclude * *.py[co]
3 changes: 3 additions & 0 deletions constructor-manager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Constructor manager

TODO
6 changes: 6 additions & 0 deletions constructor-manager/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = ["setuptools>=42.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 79
52 changes: 52 additions & 0 deletions constructor-manager/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[metadata]
name = constructor-manager
version = 0.1.0
description = TODO
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/napari/packaging/constructor-manager
author = napari
author_email = TODO
license = MIT
license_files = LICENSE
classifiers =
Development Status :: 2 - Pre-Alpha
Framework :: napari
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Image Processing
project_urls =
Bug Tracker = https://github.com/napari/packaging/issues
Source Code = https://github.com/napari/packaging/constructor-manager

[options]
packages = find:
install_requires =
qtpy
python_requires = >=3.8
include_package_data = True
package_dir =
=src
[options.packages.find]
where = src

[options.extras_require]
testing =
pytest-cov
pytest>=7.0.0
mypy
typing-extensions
types-requests

[mypy]
exclude = venv|tests

[mypy-packaging.*]
ignore_missing_imports = True
1 change: 1 addition & 0 deletions constructor-manager/src/constructor_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Constructor manager API."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Constructor manager API."""

import constructor_manager


def test_constructor_manager():
assert constructor_manager
31 changes: 31 additions & 0 deletions constructor-manager/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py{38,39,310}-{linux,macos,windows}
isolated_build=true

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310

[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
macos-latest: macos
windows-latest: windows

[testenv]
platform =
macos: darwin
linux: linux
windows: win32
passenv =
CI
GITHUB_ACTIONS
DISPLAY XAUTHORITY
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
PYVISTA_OFF_SCREEN
extras =
testing
commands = pytest -v --color=yes --cov=constructor_manager

0 comments on commit c722fee

Please sign in to comment.