Updates for distribution
Browse files- .github/workflows/python-publish.yml +15 -15
- .github/workflows/testing.yml +8 -0
- README.rst +18 -6
- tests/test_loc.py +1 -1
.github/workflows/python-publish.yml
CHANGED
|
@@ -59,19 +59,19 @@ jobs:
|
|
| 59 |
with:
|
| 60 |
path: ./dist/*.tar.gz
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
|
|
|
| 59 |
with:
|
| 60 |
path: ./dist/*.tar.gz
|
| 61 |
|
| 62 |
+
upload_pypi:
|
| 63 |
+
needs: [build_wheels, build_sdist]
|
| 64 |
+
runs-on: ubuntu-latest
|
| 65 |
+
# upload to PyPI on every tag starting with 'v'
|
| 66 |
+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
|
| 67 |
+
steps:
|
| 68 |
+
- uses: actions/download-artifact@v2
|
| 69 |
+
with:
|
| 70 |
+
name: artifact
|
| 71 |
+
path: dist
|
| 72 |
|
| 73 |
+
- uses: pypa/gh-action-pypi-publish@master
|
| 74 |
+
with:
|
| 75 |
+
user: __token__
|
| 76 |
+
password: ${{ secrets.PYPI_PASSWORD }}
|
| 77 |
+
# To test: repository_url: https://test.pypi.org/legacy/
|
.github/workflows/testing.yml
CHANGED
|
@@ -51,3 +51,11 @@ jobs:
|
|
| 51 |
coverage xml html
|
| 52 |
env:
|
| 53 |
LOG_WIDTH: 120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
coverage xml html
|
| 52 |
env:
|
| 53 |
LOG_WIDTH: 120
|
| 54 |
+
|
| 55 |
+
- name: Upload coverage to Codecov
|
| 56 |
+
uses: codecov/codecov-action@v1.2.1
|
| 57 |
+
with:
|
| 58 |
+
token: ${{ secrets.CODECOV_TOKEN }}
|
| 59 |
+
files: ./_coverage/coverage.xml
|
| 60 |
+
env_vars: OS,PYTHON
|
| 61 |
+
fail_ci_if_error: true
|
README.rst
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
Wild Me ScoutBot
|
| 3 |
================
|
| 4 |
|
| 5 |
-
|Tests| |Wheel| |Docker| |ReadTheDocs| |Huggingface|
|
| 6 |
|
| 7 |
.. contents:: Quick Links
|
| 8 |
:backlinks: none
|
|
@@ -37,7 +37,7 @@ Once Anaconda is installed, you will need an environment and the following packa
|
|
| 37 |
conda install pip
|
| 38 |
|
| 39 |
pip install -r requirements.txt
|
| 40 |
-
conda install pytorch torchvision -c pytorch-nightly
|
| 41 |
|
| 42 |
How to Run
|
| 43 |
----------
|
|
@@ -56,8 +56,16 @@ The application can also be built into a Docker image and hosted on Docker Hub.
|
|
| 56 |
|
| 57 |
.. code:: bash
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
To run:
|
| 63 |
|
|
@@ -115,6 +123,10 @@ The code base has been formatted by Brunette, which is a fork and more configura
|
|
| 115 |
:target: https://github.com/WildMeOrg/scoutbot/actions/workflows/testing.yml
|
| 116 |
:alt: GitHub CI
|
| 117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
.. |Wheel| image:: https://github.com/WildMeOrg/scoutbot/actions/workflows/python-publish.yml/badge.svg
|
| 119 |
:target: https://github.com/WildMeOrg/scoutbot/actions/workflows/python-publish.yml
|
| 120 |
:alt: Python Wheel
|
|
@@ -124,9 +136,9 @@ The code base has been formatted by Brunette, which is a fork and more configura
|
|
| 124 |
:alt: Docker
|
| 125 |
|
| 126 |
.. |ReadTheDocs| image:: https://readthedocs.org/projects/scoutbot/badge/?version=latest
|
| 127 |
-
:target: https://scoutbot.readthedocs.io/en/latest/?badge=latest
|
| 128 |
:alt: ReadTheDocs
|
| 129 |
|
| 130 |
-
.. |Huggingface| image:: https://img.shields.io/badge/HuggingFace-Running-
|
| 131 |
:target: https://huggingface.co/spaces/WildMeOrg/scoutbot
|
| 132 |
:alt: Huggingface
|
|
|
|
| 2 |
Wild Me ScoutBot
|
| 3 |
================
|
| 4 |
|
| 5 |
+
|Tests| |Codecov| |Wheel| |Docker| |ReadTheDocs| |Huggingface|
|
| 6 |
|
| 7 |
.. contents:: Quick Links
|
| 8 |
:backlinks: none
|
|
|
|
| 37 |
conda install pip
|
| 38 |
|
| 39 |
pip install -r requirements.txt
|
| 40 |
+
# conda install pytorch torchvision -c pytorch-nightly
|
| 41 |
|
| 42 |
How to Run
|
| 43 |
----------
|
|
|
|
| 56 |
|
| 57 |
.. code:: bash
|
| 58 |
|
| 59 |
+
export DOCKER_BUILDKIT=1
|
| 60 |
+
export DOCKER_CLI_EXPERIMENTAL=enabled
|
| 61 |
+
|
| 62 |
+
docker buildx create --name multi-arch-builder --use
|
| 63 |
+
|
| 64 |
+
docker buildx build \
|
| 65 |
+
-t wildme/scoutbot:latest \
|
| 66 |
+
--platform linux/amd64,linux/arm64 \
|
| 67 |
+
--push \
|
| 68 |
+
.
|
| 69 |
|
| 70 |
To run:
|
| 71 |
|
|
|
|
| 123 |
:target: https://github.com/WildMeOrg/scoutbot/actions/workflows/testing.yml
|
| 124 |
:alt: GitHub CI
|
| 125 |
|
| 126 |
+
.. |Codecov| image:: https://codecov.io/gh/WildMeOrg/houston/branch/develop/graph/badge.svg?token=M8MR14ED6V
|
| 127 |
+
:target: https://codecov.io/gh/WildMeOrg/houston
|
| 128 |
+
:alt: Codecov
|
| 129 |
+
|
| 130 |
.. |Wheel| image:: https://github.com/WildMeOrg/scoutbot/actions/workflows/python-publish.yml/badge.svg
|
| 131 |
:target: https://github.com/WildMeOrg/scoutbot/actions/workflows/python-publish.yml
|
| 132 |
:alt: Python Wheel
|
|
|
|
| 136 |
:alt: Docker
|
| 137 |
|
| 138 |
.. |ReadTheDocs| image:: https://readthedocs.org/projects/scoutbot/badge/?version=latest
|
| 139 |
+
:target: https://wildme-scoutbot.readthedocs.io/en/latest/?badge=latest
|
| 140 |
:alt: ReadTheDocs
|
| 141 |
|
| 142 |
+
.. |Huggingface| image:: https://img.shields.io/badge/HuggingFace-Running-success
|
| 143 |
:target: https://huggingface.co/spaces/WildMeOrg/scoutbot
|
| 144 |
:alt: Huggingface
|
tests/test_loc.py
CHANGED
|
@@ -93,6 +93,6 @@ def test_loc_onnx_pipeline():
|
|
| 93 |
if key == 'class_label':
|
| 94 |
assert getattr(output, key) == target.get(key)
|
| 95 |
elif key == 'confidence':
|
| 96 |
-
assert abs(getattr(output, key) - target.get(key)) < 1e-
|
| 97 |
else:
|
| 98 |
assert abs(getattr(output, key) - target.get(key)) < 1e-1
|
|
|
|
| 93 |
if key == 'class_label':
|
| 94 |
assert getattr(output, key) == target.get(key)
|
| 95 |
elif key == 'confidence':
|
| 96 |
+
assert abs(getattr(output, key) - target.get(key)) < 1e-2
|
| 97 |
else:
|
| 98 |
assert abs(getattr(output, key) - target.get(key)) < 1e-1
|