Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify install #472

Merged
merged 14 commits into from
Mar 24, 2021
Merged

Simplify install #472

merged 14 commits into from
Mar 24, 2021

Conversation

marxide
Copy link
Contributor

@marxide marxide commented Mar 14, 2021

I went over the installation and configuration documentation and have attempted to simplify things for users. The main changes are:

  • Simplify the database installation by using a Docker image with Q3C already installed. Users no longer have to download, compile, and install Q3C.
  • Replaced the init-tools/init-db.sh script with a Python version that uses psycopg2. The original shell script required psql to be installed which is now no longer required.
  • Replaced the npm package gulp-sass with a fork that doesn't depend on the deprecated node-sass package which is difficult to install as it requires Python 2.
  • Replaced the pip requirement files containing pinned versions with pyproject.toml. This file is maintained with Poetry. There are several advantages, including: able to specify more flexible version rules (e.g. any release with the same major version); all dependencies can be specified in the same file yet still be grouped (e.g. dev, production); this is still transparent to the user - modern pip versions know what to do with pyproject.toml and will temporarily install poetry during the pip install . process; the poetry.lock file contains exact pinned versions so users can be sure they always get a set of dependencies that work.
  • Bumped the minimum required Python version to 3.7.1.
  • Added an Anaconda/Miniconda environment file requirements/environment.yml for the non-Python dependencies. The docs encourage users to use this as it's simple and cross-platform, but also indicate they can still use OS package managers for these dependencies.
  • Sets the default Dask multiprocessing context to "fork" to allow us to use versions of Dask beyond 2.16.0 when the default changed to "spawn". Spawn does not appear to work well within Django, see Dask upgrade compatibility error 2.16.0+: dask.multiprocessing.AppRegistryNotReady: Models aren't loaded yet. #454.
  • Replaced vaex with vaex-arrow since we currently only use Vaex to write arrow files and the Vaex meta package includes a lot more than that.
  • Set CREATE_MEASUREMENTS_ARROW_FILES = True in the basic association test config so that the Vaex use is tested.

marxide added 4 commits March 12, 2021 15:56
init-db.sh requires psql to be available. Replacing it with a Python script that uses psycopg relaxes this requirement.
gulp-sass depends on the deprecated node-sass which requires Python 2 to install. This replacement doesn't depend on node-sass.
Use poetry for dependency management.
Removes old pip freeze requirement files.
Adds a conda environment.yml file.
Updates installation and configuation documentation.
Replaces gulp-sass with a fork that doesn't depend on the deprecated node-sass which is now problematic to install.
dask>=2.16.0 set the default multiprocessing context to spawn which doesn't play nice with loading Django models.
This explicitly set the context back to the former default "fork".
Fixes #454.
marxide added 2 commits March 15, 2021 11:04
mypy, flake8, black
Removed references to removed requirements files from GitHub actions. Added poetry.
Docs instruct contributors to install poetry.
Updated CHANGELOG.md.
@marxide marxide marked this pull request as draft March 15, 2021 18:00
@marxide marxide marked this pull request as ready for review March 15, 2021 21:41
Currently vaex is only used to write out arrow files which is provided by the sub-package vaex-arrow.
Turned on arrow file output for the basic association test.
@marxide marxide requested a review from joshoewahp March 16, 2021 23:30
@marxide marxide self-assigned this Mar 16, 2021
@marxide marxide added cleanup Clean up code dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation labels Mar 16, 2021
@dliptai
Copy link
Contributor

dliptai commented Mar 17, 2021

Simplify the database installation by using a Docker image with Q3C already installed. Users no longer have to download, compile, and install Q3C

We should make sure the test-suite uses this same Docker image. It should be fairly straightforward, just point the docker-compose to your Docker image, rather than the Dockerfile (which we can then remove)

Copy link
Contributor

@ajstewart ajstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have a few questions really, otherwise it looks a lot cleaner!

@marxide
Copy link
Contributor Author

marxide commented Mar 17, 2021

Simplify the database installation by using a Docker image with Q3C already installed. Users no longer have to download, compile, and install Q3C

We should make sure the test-suite uses this same Docker image. It should be fairly straightforward, just point the docker-compose to your Docker image, rather than the Dockerfile (which we can then remove)

Thanks! I missed that. Fixed in cc5447b.

@marxide marxide requested a review from ajstewart March 17, 2021 20:43
Copy link
Contributor

@ajstewart ajstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question on the installation doc, after that I would be happy to approve this.

@marxide marxide requested a review from ajstewart March 24, 2021 15:50
@marxide marxide merged commit 914f891 into master Mar 24, 2021
@marxide marxide deleted the simplify-install branch March 24, 2021 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Clean up code dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants