ga4gh / ga4gh-schemas

Models and APIs for Genomic data. RETIRED 2018-01-24
http://ga4gh.org
Apache License 2.0
214 stars 114 forks source link

Remove process_schemas from setup.py #797

Closed dcolligan closed 7 years ago

dcolligan commented 7 years ago

Now that we are depending on ga4gh-common for process_schemas.py which is used in setup.py, the install can fail if the common package is not available before install happens (see below). The solution is to remove any references to process_schemas.py from setup.py.

(This problem is post-0.6.0a9-release, so it doesn't affect our released packages, only development.)

(server-env) $ pip install -r dev-requirements.txt -c constraints.txt --upgrade
Collecting ga4gh_common from git+git://github.com/ga4gh/ga4gh-common.git@master#egg=ga4gh_common (from -c constraints.txt (line 27))
  Cloning git://github.com/ga4gh/ga4gh-common.git (to master) to /private/var/folders/62/16flnsrx3dj9qxqtf4djg16m0000gn/T/pip-build-AJEjgG/ga4gh-common
Collecting ga4gh_schemas from git+git://github.com/ga4gh/schemas.git@master#egg=ga4gh_schemas (from -c constraints.txt (line 28))
  Cloning git://github.com/ga4gh/schemas.git (to master) to /private/var/folders/62/16flnsrx3dj9qxqtf4djg16m0000gn/T/pip-build-AJEjgG/ga4gh-schemas
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/62/16flnsrx3dj9qxqtf4djg16m0000gn/T/pip-build-AJEjgG/ga4gh-schemas/setup.py", line 10, in <module>
        import scripts.process_schemas as process_schemas
      File "scripts/process_schemas.py", line 18, in <module>
        import ga4gh.common.utils as utils
    ImportError: No module named ga4gh.common.utils
dcolligan commented 7 years ago

Example of this failure: https://travis-ci.org/ga4gh/server/builds/194838639

david4096 commented 7 years ago

Yeah, I specifically deprecated the common elements of process schemas to avoid this. I think it's OK to duplicate code if it's needed to perform installation like this.

I would keep process schemas as something simple that can run inside setup.py with no dependencies.

I also think the development interface of python setup.py develop for running process schemas to be pretty sensible and idiomatic. That will install the deps and generate pb2 files from the proto.

So maybe we keep common and use it in schemas where we can, but just not for this part.

dcolligan commented 7 years ago

Ok, this issue has now changed to: fix the install path by removing references to ga4gh-common from the install path.

dcolligan commented 7 years ago

Fixed (as it were) in #798