Skip to content

Commit

Permalink
Add testing and installation pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehsiao committed Mar 30, 2018
1 parent e56f7f8 commit f2a8e7c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 40 deletions.
32 changes: 0 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,3 @@ The [`Fonduer`
tutorials](https://github.com/hazyresearch/fonduer-tutorials) cover the
`Fonduer` workflow, showing how to extract relations from hardware datasheets
and scientific literature.

## For Developers

We are following [Semantic Versioning 2.0.0](https://semver.org/) conventions.
The maintainers will create a git tag for each release and increment the
version number found in
[fonduer/\_version.py](https://github.com/HazyResearch/fonduer/blob/master/fonduer/_version.py)
accordingly. We deploy tags to PyPI automatically using Travis-CI.

To install locally, you'll need to install `pandoc`:

```
sudo apt-get install pandoc
```

which is used to create the reStructuredText file that the setuptools expects.

### Tests

To test changes in the package, you install it in [editable
mode](https://packaging.python.org/tutorials/distributing-packages/#working-in-development-mode)
locally in your virtualenv by running:

```
make dev
```

Then you can run our tests

```
make test
```
26 changes: 26 additions & 0 deletions docs/dev/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Installation
============

We are following `Semantic Versioning 2.0.0 <https://semver.org/>`__
conventions. The maintainers will create a git tag for each release and
increment the version number found in `fonduer/\_version.py`_ accordingly. We
deploy tags to PyPI automatically using Travis-CI.

To install locally, you'll need to install ``pandoc``:

.. code:: bash
sudo apt-get install pandoc
which is used to create the reStructuredText file from the Markdown-formatted
README.md that ``setuptools`` expects.

To test changes in the package, you install it in `editable mode`_ locally in
your virtualenv by running:

.. code:: bash
make dev
.. _fonduer/\_version.py: https://github.com/HazyResearch/fonduer/blob/master/fonduer/_version.py
.. _editable mode: https://packaging.python.org/tutorials/distributing-packages/#working-in-development-mode
14 changes: 14 additions & 0 deletions docs/dev/tests.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Testing
=======

We use pytest_ to run our tests. Our tests are all located in the ``tests``
directory in the repo, and are meant to be run *after* installing_ Fonduer
locally.

.. code:: bash
make test
.. _pytest: https://docs.pytest.org/en/latest/
.. _installing: install.html
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ submit your contributions as a pull request.
:caption: Developer Documentation

dev/changelog
dev/install
dev/tests


Acknowledgements
Expand Down
16 changes: 8 additions & 8 deletions docs/user/faqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ How do I connect to PostgreSQL? I'm getting "fe\_sendauth no password supplied".
There are `four main ways`_ to deal with entering passwords when you connect to
your PostgreSQL database:

1. Set the ``PGPASSWORD`` environment variable
``PGPASSWORD=<pass> psql -h <host> -U <user>``
1. Set the ``PGPASSWORD`` environment variable ``PGPASSWORD=<pass> psql -h
<host> -U <user>``
2. Using a `.pgpass file to store the password`_.
3. Setting the users to `trust authentication`_
in the pg\_hba.conf file. This makes local development easy, but
probably isn't suitable for multiuser environments. You can find your
hba file location by running ``psql``, then querying ``SHOW hba_file;``
3. Setting the users to `trust authentication`_ in the pg\_hba.conf file. This
makes local development easy, but probably isn't suitable for multiuser
environments. You can find your hba file location by running ``psql``, then
querying ``SHOW hba_file;``
4. Put the username and password in the connection URI:
``postgres://user:pw@localhost:5432/...``

Expand Down Expand Up @@ -45,8 +45,8 @@ install ``0.53.0``:
make
sudo checkinstall
We highly recommend using at least Ubuntu 16.04 though, as we haven't
done testing on 14.04 or older.
We highly recommend using at least Ubuntu 16.04 though, as we haven't done
testing on 14.04 or older.

.. _see changelog: https://poppler.freedesktop.org/releases.html
.. _install manually: https://poppler.freedesktop.org
Expand Down

0 comments on commit f2a8e7c

Please sign in to comment.