Closed sourcenouveau closed 6 years ago
@sturzhav, @cpdean:
I saw @zcmarine's comment on #40 that he's no longer with Squarespace. Any chance that we'll be able to get this PR merged soon? I'm not able to use pgbedrock in my environment due to this dependency issue.
@emddudley
Hey! This is a good idea and I want to merge it but I need to change the Dockerfile
to use the requirements.txt so that the image we publish will be reproducible. Would you like to add that or could I lob a commit onto your PR?
Adding a copy of the requirements txt and pip install -r requirements.txt
before installing the package in the container should do the trick. I've tested this locally by making my Dockerfile look like this in your branch:
FROM python:3.6
VOLUME /opt
WORKDIR /opt
COPY setup.py /opt/
COPY requirements.txt /opt/
RUN pip install -r requirements.txt
COPY pgbedrock /opt/pgbedrock
RUN pip install .
ENTRYPOINT ["pgbedrock"]
Thanks again for submitting this PR! It will make pgbedrock easier for people to use directly and install.
other than coveralls being awful and counting non-python file lines in its code coverage calculation, this looks good!
Thanks! I will try to get a release of this out for you in a bit.
Hey @emddudley ,
The version with your changes is now live on pypi.
- ❯❯❯ pip install pgbedrock
...
- ❯❯❯ pip freeze
Cerberus==1.2
click==6.7
Jinja2==2.10
MarkupSafe==1.0
pgbedrock==0.3.2
psycopg2==2.7.5
PyYAML==3.13
Excellent, appreciate it! I'll try it out next week.
Pinned dependencies in
setup.py
make it difficult to usepgbedrock
in environments that are shared with other packages. If a user upgrades a dependency and tries to executepgbedrock
they can get apkg_resources.DistributionNotFound
error.This pull request relaxes the dependency constraints in
setup.py
and addsrequirements.txt
. The relaxed constraints insetup.py
enable the user to executepgbedrock
in more environments, while the pinning inrequirements.txt
provides users and developers with a "known good" environment.pgbedrock
seems to work correctly with the latest versions of all dependencies. I do not know whether there are any known minimum version requirements for any of the dependencies, but if there are please add them tosetup.py
.