diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..1490b458 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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 }} diff --git a/constructor-manager-cli/LICENSE b/constructor-manager-cli/LICENSE new file mode 100644 index 00000000..7bc580bb --- /dev/null +++ b/constructor-manager-cli/LICENSE @@ -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. diff --git a/constructor-manager-cli/MANIFEST.in b/constructor-manager-cli/MANIFEST.in new file mode 100644 index 00000000..f3155af7 --- /dev/null +++ b/constructor-manager-cli/MANIFEST.in @@ -0,0 +1,5 @@ +include LICENSE +include README.md + +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] diff --git a/constructor-manager-cli/README.md b/constructor-manager-cli/README.md new file mode 100644 index 00000000..f4cb561d --- /dev/null +++ b/constructor-manager-cli/README.md @@ -0,0 +1,3 @@ +# Constructor Manager Commnand line interface + +Handle (conda) constructor based bundled applications from the command line. diff --git a/constructor-manager-cli/pyproject.toml b/constructor-manager-cli/pyproject.toml new file mode 100644 index 00000000..a193db45 --- /dev/null +++ b/constructor-manager-cli/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = ["setuptools>=42.0.0", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 79 diff --git a/constructor-manager-cli/setup.cfg b/constructor-manager-cli/setup.cfg new file mode 100644 index 00000000..e71065d7 --- /dev/null +++ b/constructor-manager-cli/setup.cfg @@ -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 diff --git a/constructor-manager-cli/src/constructor_manager_cli/__init__.py b/constructor-manager-cli/src/constructor_manager_cli/__init__.py new file mode 100644 index 00000000..efcc84ae --- /dev/null +++ b/constructor-manager-cli/src/constructor_manager_cli/__init__.py @@ -0,0 +1 @@ +"""Constructor manager CLI.""" diff --git a/constructor-manager-cli/src/constructor_manager_cli/tests/test_main.py b/constructor-manager-cli/src/constructor_manager_cli/tests/test_main.py new file mode 100644 index 00000000..cb584462 --- /dev/null +++ b/constructor-manager-cli/src/constructor_manager_cli/tests/test_main.py @@ -0,0 +1,7 @@ +"""Constructor manager CLI.""" + +import constructor_manager_cli + + +def test_constructor_manager(): + assert constructor_manager_cli diff --git a/constructor-manager-cli/tox.ini b/constructor-manager-cli/tox.ini new file mode 100644 index 00000000..4e5403da --- /dev/null +++ b/constructor-manager-cli/tox.ini @@ -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 diff --git a/constructor-manager/LICENSE b/constructor-manager/LICENSE new file mode 100644 index 00000000..7bc580bb --- /dev/null +++ b/constructor-manager/LICENSE @@ -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. diff --git a/constructor-manager/MANIFEST.in b/constructor-manager/MANIFEST.in new file mode 100644 index 00000000..f3155af7 --- /dev/null +++ b/constructor-manager/MANIFEST.in @@ -0,0 +1,5 @@ +include LICENSE +include README.md + +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] diff --git a/constructor-manager/README.md b/constructor-manager/README.md new file mode 100644 index 00000000..96c8c0b9 --- /dev/null +++ b/constructor-manager/README.md @@ -0,0 +1,3 @@ +# Constructor manager + +TODO diff --git a/constructor-manager/pyproject.toml b/constructor-manager/pyproject.toml new file mode 100644 index 00000000..a193db45 --- /dev/null +++ b/constructor-manager/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = ["setuptools>=42.0.0", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 79 diff --git a/constructor-manager/setup.cfg b/constructor-manager/setup.cfg new file mode 100644 index 00000000..3d80485c --- /dev/null +++ b/constructor-manager/setup.cfg @@ -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 diff --git a/constructor-manager/src/constructor_manager/__init__.py b/constructor-manager/src/constructor_manager/__init__.py new file mode 100644 index 00000000..f4afbfe4 --- /dev/null +++ b/constructor-manager/src/constructor_manager/__init__.py @@ -0,0 +1 @@ +"""Constructor manager API.""" diff --git a/constructor-manager/src/constructor_manager/tests/test_main.py b/constructor-manager/src/constructor_manager/tests/test_main.py new file mode 100644 index 00000000..488bd751 --- /dev/null +++ b/constructor-manager/src/constructor_manager/tests/test_main.py @@ -0,0 +1,7 @@ +"""Constructor manager API.""" + +import constructor_manager + + +def test_constructor_manager(): + assert constructor_manager diff --git a/constructor-manager/tox.ini b/constructor-manager/tox.ini new file mode 100644 index 00000000..b1f09aa6 --- /dev/null +++ b/constructor-manager/tox.ini @@ -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