Skip to content

Commit

Permalink
Merge pull request #19 from SciKit-Surgery/18-move-tosks
Browse files Browse the repository at this point in the history
18 move tosks
  • Loading branch information
thompson318 committed Feb 22, 2022
2 parents 2794bfb + 137f9f4 commit ae87069
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 30 deletions.
3 changes: 1 addition & 2 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
service_name: travis-ci
repo_token: BY7CsmZLxsoGVRr5MUfIHBKf80Jp4CDYp
repo_token: IttknVKD3g94z7XGhphBKd6XUgp3LorGf
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-ver: [3.6, 3.7]
python-ver: [3.7, 3.8]
experimental: [false]
include:
- python-ver: 3.8
- python-ver: 3.9
os: ubuntu-latest
experimental: true
- python-ver: 3.8
- python-ver: 3.9
os: windows-latest
experimental: true
- python-ver: 3.8
- python-ver: 3.9
os: macos-latest
experimental: true

Expand Down Expand Up @@ -53,7 +53,6 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pip-tools
pip-compile requirements.txt
pip install -r requirements-dev.txt
- name: Run tests using xvfb (Ubuntu)
Expand Down
47 changes: 47 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
cff-version: 1.2.0
message: "If you use SnappySonic, please cite it as below."
authors:
- family-names: "Thompson"
given-names: "Stephen"
orcid: "https://orcid.org/0000-0001-7286-1326"
- family-names: "Dowrick"
given-names: "Thomas"
orcid: "https://orcid.org/0000-0002-2712-4447"
- family-names: "Ahmad"
given-names: "Mian"
orcid: "https://orcid.org/0000-0002-4706-4146"
- family-names: "Clarkson"
given-names: "Matthew"
orcid: "https://orcid.org/0000-0002-5565-1252"
title: "SnappySonic"
doi: 10.5281/zenodo.3491054
url: "https://github.com/SciKit-Surgery/snappysonic"
preferred-citation:
type: article
authors:
- family-names: "Thompson"
given-names: "Stephen"
orcid: "https://orcid.org/0000-0001-7286-1326"
- family-names: "Dowrick"
given-names: "Thomas"
orcid: "https://orcid.org/0000-0002-2712-4447"
- family-names: "Xiao"
given-names: "Guofang"
- family-names: "Ramalhinho"
given-names: "Jo{\~a}o"
- family-names: "Robu"
given-names: "Maria"
- family-names: "Ahmad"
given-names: "Mian"
orcid: "https://orcid.org/0000-0002-4706-4146"
- family-names: "Taylor"
given-names: "Dan"
- family-names: "Clarkson"
given-names: "Matthew"
orcid: "https://orcid.org/0000-0002-5565-1252"
doi: 10.5334/jors.289
journal: "Journal of Open Research Software"
title: "SnappySonic: An Ultrasound Acquisition Replay Simulator"
volume: 8
issue: 1
year: 2020
44 changes: 22 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
SnappySonic
===============================

.. image:: https://github.com/UCL/snappysonic/raw/master/project-icon.png
:height: 128px
:width: 128px
:target: https://github.com/UCL/snappysonic
.. image:: https://github.com/SciKit-Surgery/snappysonic/raw/master/snappysonic.gif
:height: 134px
:target: https://github.com/SciKit-Surgery/snappysonic
:alt: Logo

.. image:: https://github.com/UCL/snappysonic/workflows/.github/workflows/ci.yml/badge.svg
:target: https://github.com/UCL/snappysonic/actions
|
.. image:: https://github.com/SciKit-Surgery/snappysonic/workflows/.github/workflows/ci.yml/badge.svg
:target: https://github.com/SciKit-Surgery/snappysonic/actions
:alt: GitHub Actions CI status

.. image:: https://coveralls.io/repos/github/UCL/snappysonic/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/UCL/snappysonic?branch=master
.. image:: https://coveralls.io/repos/github/SciKit-Surgery/snappysonic/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/SciKit-Surgery/snappysonic?branch=master
:alt: Test coverage

.. image:: https://readthedocs.org/projects/snappysonic/badge/?version=latest
Expand All @@ -23,18 +24,17 @@ SnappySonic
:target: http://doi.org/10.5334/jors.289
:alt: The SnappySonic Paper

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3491054.svg
:target: https://doi.org/10.5281/zenodo.3491054
:alt: Software DOI

.. image:: https://api.codeclimate.com/v1/badges/326c1b87863bd61bbe83/maintainability
:target: https://codeclimate.com/github/UCL/snappysonic/maintainability
.. image:: https://api.codeclimate.com/v1/badges/78440062319f61c55177/maintainability
:target: https://codeclimate.com/github/SciKit-Surgery/snappysonic/maintainability
:alt: Maintainability

.. image:: https://img.shields.io/badge/-Video%20Tutorial-blueviolet?style=flat&logo=youtube
:target: https://www.youtube.com/watch?v=BI4qyg9NEOk
:alt: Tutorial on YouTube

.. image:: https://img.shields.io/twitter/follow/scikit_surgery?style=social
:target: https://twitter.com/scikit_surgery?ref_src=twsrc%5Etfw
:alt: Follow scikit_surgery on twitter


Author: Stephen Thompson
Expand Down Expand Up @@ -90,7 +90,7 @@ You can clone the repository using the following command:

::

git clone https://github.com/UCL/snappysonic
git clone https://github.com/SciKit-Surgery/snappysonic


Running tests
Expand All @@ -112,7 +112,7 @@ You can pip install from pypi with
or You can pip install directly from the repository as follows:
::

pip install git+https://github.com/UCL/snappysonic
pip install git+https://github.com/SciKit-Surgery/snappysonic

How to Cite
-----------
Expand Down Expand Up @@ -147,14 +147,14 @@ Supported by `Wellcome`_ and `EPSRC`_.


.. _`Wellcome EPSRC Centre for Interventional and Surgical Sciences`: http://www.ucl.ac.uk/weiss
.. _`source code repository`: https://github.com/UCL/snappysonic
.. _`here`: https://github.com/UCL/snappysonic/config.json
.. _`source code repository data directory`: https://github.com/UCL/snappysonic/data
.. _`source code repository`: https://github.com/SciKit-Surgery/snappysonic
.. _`here`: https://github.com/SciKit-Surgery/snappysonic/config.json
.. _`source code repository data directory`: https://github.com/SciKit-Surgery/snappysonic/data
.. _`Documentation`: https://snappysonic.readthedocs.io
.. _`SciKit-Surgery`: https://github.com/UCL/scikit-surgery/wikis/home
.. _`SciKit-Surgery`: https://github.com/SciKit-Surgery/scikit-surgery
.. _`University College London (UCL)`: http://www.ucl.ac.uk/
.. _`Wellcome`: https://wellcome.ac.uk/
.. _`EPSRC`: https://www.epsrc.ac.uk/
.. _`contributing guidelines`: https://github.com/UCL/snappysonic/blob/master/CONTRIBUTING.rst
.. _`license file`: https://github.com/UCL/snappysonic/blob/master/LICENSE
.. _`contributing guidelines`: https://github.com/SciKit-Surgery/snappysonic/blob/master/CONTRIBUTING.rst
.. _`license file`: https://github.com/SciKit-Surgery/snappysonic/blob/master/LICENSE
.. _`SnappySonic paper`: http://doi.org/10.5334/jors.289
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
description='snappysonic provides an application to simulate an ultrasound probe moving over a body torso, it is intended for public engagement events"',
long_description=long_description,
long_description_content_type='text/x-rst',
url='https://github.com/UCL/snappysonic',
url='https://github.com/SciKit-Surgery/snappysonic',
author='Stephen Thompson',
author_email='s.thompson@ucl.ac.uk',
license='BSD-3 license',
Expand Down
51 changes: 51 additions & 0 deletions tests/test_requirements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# coding=utf-8

"""scikit-surgerynditracker tests"""

# Pytest style

def test_requirements_vs_setup():
"""
Test that the requirements.txt matches setup.py
"""

# setup=open("setup.py","r")
# setuptxt = setup.read()
# setup.close()

with open("setup.py", "r", encoding='us-ascii') as file_to_read:
searchlines = file_to_read.readlines()

install_line = -1
for i, line in enumerate(searchlines):
if "install_requires" in line:
install_line = i
break

end_line = -1
for i, line in enumerate(searchlines[install_line:]):
if "]" in line:
end_line = install_line + i
break

setup_reqs = []

for line in searchlines[install_line + 1: end_line]:
req = line.replace(',', '').replace("'", "")
req = req.replace(' ', '').replace('\n', '')
setup_reqs.append(req)


with open("requirements.txt", "r", encoding='us-ascii') as file_to_read:
searchlines = file_to_read.readlines()

reqs = []
for line in searchlines:
if "#" not in line:
reqs.append(line.replace('\n', ''))

for setup_req in setup_reqs:
assert setup_req in reqs

for req in reqs:
assert req in setup_reqs

0 comments on commit ae87069

Please sign in to comment.