Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 83083f4
Author: Fernando Cervantes Sanchez <[email protected]>
Date:   Tue Jul 16 17:43:23 2024 -0400

    Added edit scale to editor

commit c94cd09
Author: Fernando Cervantes Sanchez <[email protected]>
Date:   Mon Jul 15 18:56:29 2024 -0400

    Working on adding editable scale for layers

commit 9e51908
Author: Fernando Cervantes Sanchez <[email protected]>
Date:   Fri Jul 12 17:04:44 2024 -0400

    Made torch optional and fixing mask scales

commit 17a5b91
Author: Fernando Cervantes Sanchez <[email protected]>
Date:   Thu Jul 11 17:32:56 2024 -0400

    Organized classes into modules

commit 33dc20a
Author: Fernando Cervantes Sanchez <[email protected]>
Date:   Wed Jul 10 17:03:40 2024 -0400

    Adding configurable cellpose method

commit cd80549
Author: Fernando Cervantes Sanchez <[email protected]>
Date:   Wed Jul 10 11:55:58 2024 -0400

    Testing convertion of repository into napari plugin

commit ba0ab02
Author: Fernando Cervantes Sanchez <[email protected]>
Date:   Mon Jul 8 17:56:09 2024 -0400

    Migrated code to napari cookie cutter scheme
  • Loading branch information
fercer committed Jul 16, 2024
1 parent 67f39c1 commit 8e37ca4
Show file tree
Hide file tree
Showing 29 changed files with 4,613 additions and 3,805 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: tests

on:
push:
branches:
- main
- npe2
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- main
- npe2
workflow_dispatch:

jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

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

# these libraries enable testing on Qt on linux
- uses: tlambert03/setup-qt-libs@v1

# strategy borrowed from vispy for installing opengl libs on windows
- name: Install Windows OpenGL
if: runner.os == 'Windows'
run: |
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
# note: if you need dependencies from conda, considering using
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
# and
# tox-conda: https://github.com/tox-dev/tox-conda
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools tox tox-gh-actions
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: aganders3/headless-gui@v2
with:
run: python -m tox
env:
PLATFORM: ${{ matrix.platform }}

- name: Coverage
uses: codecov/codecov-action@v3

deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools setuptools_scm wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build .
twine upload dist/*
22 changes: 18 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -158,8 +157,23 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
/data
examples.py
/.vscode
.idea/
venv/
.vscode/

# Test image files and models
*.zarr
/data
/models

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# OS
.DS_Store

# written by setuptools_scm
**/_version.py
9 changes: 9 additions & 0 deletions .napari-hub/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- This file is a placeholder for customizing description of your plugin
on the napari hub if you wish. The readme file will be used by default if
you wish not to do any customization for the napari hub listing.
If you need some help writing a good description, check out our
[guide](https://github.com/chanzuckerberg/napari-hub/wiki/Writing-the-Perfect-Description-for-your-Plugin)
-->

The developer has not yet provided a napari-hub specific description.
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: ^\.napari-hub/.*
- id: check-yaml # checks for correct yaml syntax for github actions ex.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/tlambert03/napari-plugin-checks
rev: v0.3.0
hooks:
- id: napari-plugin-checks
# https://mypy.readthedocs.io/en/stable/
# you may wish to add this as well!
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.9.0
# hooks:
# - id: mypy
5 changes: 5 additions & 0 deletions 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]
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,62 @@
# Active Learning tools for ML models fine-tuning
Active learning tools for fine-tuning ML models

[![License MIT](https://img.shields.io/pypi/l/napari-activelearning.svg?color=green)](https://github.com/fercer/napari-activelearning/raw/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/napari-activelearning.svg?color=green)](https://pypi.org/project/napari-activelearning)
[![Python Version](https://img.shields.io/pypi/pyversions/napari-activelearning.svg?color=green)](https://python.org)
[![tests](https://github.com/fercer/napari-activelearning/workflows/tests/badge.svg)](https://github.com/fercer/napari-activelearning/actions)
[![codecov](https://codecov.io/gh/fercer/napari-activelearning/branch/main/graph/badge.svg)](https://codecov.io/gh/fercer/napari-activelearning)
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-activelearning)](https://napari-hub.org/plugins/napari-activelearning)

A plugin for running a complete active learning workflow

----------------------------------

This [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.

<!--
Don't miss the full getting started guide to set up your new package:
https://github.com/napari/cookiecutter-napari-plugin#getting-started
and review the napari docs for plugin developers:
https://napari.org/stable/plugins/index.html
-->

## Installation

You can install `napari-activelearning` via [pip]:

pip install napari-activelearning




## Contributing

Contributions are very welcome. Tests can be run with [tox], please ensure
the coverage at least stays the same before you submit a pull request.

## License

Distributed under the terms of the [MIT] license,
"napari-activelearning" is free and open source software

## Issues

If you encounter any problems, please [file an issue] along with a detailed description.

[napari]: https://github.com/napari/napari
[Cookiecutter]: https://github.com/audreyr/cookiecutter
[@napari]: https://github.com/napari
[MIT]: http://opensource.org/licenses/MIT
[BSD-3]: http://opensource.org/licenses/BSD-3-Clause
[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt
[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt
[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0
[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt
[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin

[napari]: https://github.com/napari/napari
[tox]: https://tox.readthedocs.io/en/latest/
[pip]: https://pypi.org/project/pip/
[PyPI]: https://pypi.org/
2 changes: 0 additions & 2 deletions activelearning/__init__.py

This file was deleted.

69 changes: 0 additions & 69 deletions activelearning/alutils.py

This file was deleted.

Loading

0 comments on commit 8e37ca4

Please sign in to comment.