diff --git a/README.md b/README.md index c5f48c072..49a79921e 100644 --- a/README.md +++ b/README.md @@ -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 -``` diff --git a/docs/dev/install.rst b/docs/dev/install.rst new file mode 100644 index 000000000..a25b2abd3 --- /dev/null +++ b/docs/dev/install.rst @@ -0,0 +1,26 @@ +Installation +============ + +We are following `Semantic Versioning 2.0.0 `__ +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 diff --git a/docs/dev/tests.rst b/docs/dev/tests.rst new file mode 100644 index 000000000..f69581b88 --- /dev/null +++ b/docs/dev/tests.rst @@ -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 diff --git a/docs/index.rst b/docs/index.rst index af6d1fcba..800e76039 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,8 @@ submit your contributions as a pull request. :caption: Developer Documentation dev/changelog + dev/install + dev/tests Acknowledgements diff --git a/docs/user/faqs.rst b/docs/user/faqs.rst index 06b882e85..92df3054f 100644 --- a/docs/user/faqs.rst +++ b/docs/user/faqs.rst @@ -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= psql -h -U `` +1. Set the ``PGPASSWORD`` environment variable ``PGPASSWORD= psql -h + -U `` 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/...`` @@ -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