Skip to content

Commit

Permalink
Merge pull request #378 from jonasrauber/rc
Browse files Browse the repository at this point in the history
2.0.0rc0
  • Loading branch information
jonasrauber authored Oct 18, 2019
2 parents 17bac88 + 4c662a1 commit 09d2f68
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 21 deletions.
19 changes: 9 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ Installation
# Foolbox 1.8
pip install foolbox
# Foolbox 2.0 beta
# Foolbox 2.0 release candidate
pip install foolbox --pre
Foolbox requires Python 3.5 or newer (since Foolbox 2.0).

Documentation
-------------

Documentation is available on readthedocs: http://foolbox.readthedocs.io/

For the 2.0 beta, please go to https://foolbox.readthedocs.io/en/latest/
Documentation for the `latest stable version <https://foolbox.readthedocs.io/>`_ as well as
`pre-release versions <https://foolbox.readthedocs.io/en/latest/>`_ is available on ReadTheDocs.

Our paper describing Foolbox is on arXiv: https://arxiv.org/abs/1707.04131

Expand Down Expand Up @@ -136,16 +135,16 @@ Contributions welcome
----------------------

Foolbox is a work in progress and any input is welcome.

In particular, we encourage users of deep learning frameworks for which we do not yet have builtin support, e.g. Caffe, Caffe2 or CNTK, to contribute the necessary wrappers. Don't hestiate to contact us if we can be of any help.

Moreoever, attack developers are encouraged to share their reference implementation using Foolbox so that it will be available to everyone.
Foolbox is particularly well-suited to develop
`new adversarial attacks <https://foolbox.readthedocs.io/en/stable/user/development.html#new-adversarial-attacks>`_
and to support new machine learning and deep learning frameworks by simply adding a wrapper.
By adding reference implementations for adversarial attacks to Foolbox, they will automatically be applicable
to models implemented in any of the supported frameworks such as PyTorch, TensorFlow, Keras Or MxNet.

Citation
--------

If you find Foolbox useful for your scientific work, please consider citing it
in resulting publications:
If you use Foolbox for your work, please cite our paper:

.. code-block::
Expand Down
15 changes: 8 additions & 7 deletions docs/user/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ Development

To install Foolbox in editable mode, see the installation instructions under :ref:`dev-install`.

.. _development:

Running Tests
=======================

pytest
``````

To run the tests, you need to have `pytest <https://docs.pytest.org/en/latest/getting-started.html>`_ and `pytest-cov <http://pytest-cov.readthedocs.io/en/latest/readme.html#installation>`_ installed. Afterwards, you can simply run ``pytest`` in the root folder of the project. Some tests will require TensorFlow, PyTorch and the other frameworks, so to run all tests, you need to have all of them installed.

flake8
``````
Foolbox follows the `PEP 8 style guide for Python code <https://www.python.org/dev/peps/pep-0008/>`_. To check for violations, we use `flake8 <http://flake8.pycqa.org/en/latest/>`_ and run it like this:
To run the tests, you need to have `pytest <https://docs.pytest.org/en/latest/getting-started.html>`_ and `pytest-cov <http://pytest-cov.readthedocs.io/en/latest/readme.html#installation>`_ installed. Afterwards, you can simply run ``pytest`` in the root folder of the project. Some tests will require TensorFlow, PyTorch and the other frameworks, so to run all tests, you need to have all of them installed. Note however that this can take quite long (Foolbox has many tests) and installing all frameworks with the correct versions is difficult due to conflicting dependencies. You can also open a pull-request and then we will run all the tests using travis.

.. code-block:: sh
Style Guide
===========

flake8 --ignore E402,E741 .
We use `Black <https://black.readthedocs.io/>`_ to format all code in a consistent and PEP-8 conform way.
All pull-requests are checked using both ``black`` and ``flake8``. Simply install ``black`` and run ``black .`` after
all your changes or ideally even on each commit using `pre-commit <https://black.readthedocs.io/en/stable/version_control_integration.html>`_.

New Adversarial Attacks
=======================
Expand Down
17 changes: 14 additions & 3 deletions docs/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ You can install the latest stable release of Foolbox from PyPI using `pip`:
Make sure that `pip` installs packages for Python 3, otherwise you might need to use `pip3` instead of `pip`.

Pre-release versions
====================

You can install the latest stable release of Foolbox from PyPI using `pip`:

.. code-block:: bash
pip install foolbox --pre
Make sure that `pip` installs packages for Python 3, otherwise you might need to use `pip3` instead of `pip`.

Development version
===================

Expand Down Expand Up @@ -43,8 +54,8 @@ You can than add it as a remote:

.. code-block:: bash
git remote rename origin upstream
git remote add origin https://github.com/<your-github-name>/foolbox.git
git remote add fork [email protected]/<your-github-name>/foolbox.git
You can now commit your changes, push them to your fork and create a pull-request to
contribute them to Foolbox.
contribute them to Foolbox. See :ref:`development` for more information on the
necessary tools and conventions.
2 changes: 1 addition & 1 deletion foolbox/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0b0
2.0.0rc0

0 comments on commit 09d2f68

Please sign in to comment.