Comments (7)
Sounds good, I tested the Dockerfile before and it started to run fine but stalled when trying to resolve all the package conflicts.
Will test this tomorrow
from coding-for-economists.
Unfortunately this looks like a Windows issue; conda forge has pre-built binaries for MacOS and Linux only, so running the build command on Windows will fail.
More generally, the environment is a mess! This is chiefly because of the large number of packages. To make the environment more consistent and reproducible, I've thought about:
- cutting down the number of packages
- building a docker container (tried this a couple of times without success)
- having different environments for different parts of the book (not clear if this is supported by Jupyter Book though)
- using poetry instead (tried this but again little success in getting a reproducible environment)
It would be desirable to have an environment that reliably builds across Mac, Linux, and even Windows, and a pre-built Docker container that users could interact with via Binder (this option is available in the book but doesn't currently work). It looks like 1 is probably the best long-term solution—but it would be useful to know the packages that cause the inconsistency so we could work around them.
from coding-for-economists.
I've had a look at package conflicts and there are quite a lot of them (conflicts2.txt).
I tried installing in sections and also experimented with pip-compile and there doesn't seem to be a set of specific versions that avoid conflicts. As you say, it's pretty difficult / impossible to achieve this given the number of packages.
Agree with the four options you've suggested (poetry looks interesting).
I guess in the interim it's sufficient to just have contributors install an environment as close to yours as possible - given all of the packages are being used for a small set of isolated examples.
Therefore it might be good to extract the specific versions of packages you wrote the book with using bash conda list --export > package-list.txt
, so that others can sequentially install that list, and then at least the book can be tested in a Windows environment where people have sequentially installed that list. Then when new packages are added or versions are upgraded, tests can be rerun from this point. What do you reckon?
from coding-for-economists.
That is indeed quite a list of inconsistencies! I've created a package-list.txt
file now, so you should be able to see exact versions. I'll have a think about how to tackle approach 1.
from coding-for-economists.
Merging of #21 sees reproducible builds (at least for the most recent commit) arrive via a dockerfile. I've also pushed a pre-built image to the Coding for Economists dockerhub—be warned though, it's 12GB! Using Mamba, I managed to get the build time down to something quite sensible.
Can you check if you can build or alternatively pull down and run the image?
from coding-for-economists.
Success! Took about an hour
from coding-for-economists.
An hour is a long time, but a previous attempt took 6 hours to build so I'm counting this as a win on both reproducibility and build-time. There's a future question of reducing the number of packages to make everything a bit more agile (and perhaps allow dev not in a docker env...), but I'll close this as the immediate concern is addressed.
from coding-for-economists.
Related Issues (20)
- Error in Exercise Reqs HOT 2
- Website is down HOT 2
- Issue on page /vis-common-plots.html HOT 2
- Lets-Plot: geom_segment() instead of geom_path() HOT 1
- Lets-Plot: joint_plot() instead of ggmarginal() HOT 1
- Lets-Plot: geom_area() instead of geom_freqpoly() HOT 1
- Lets-Plot: add geom_area_ridges() HOT 1
- Lets-Plot: geom_contourf() instead of geom_contour() HOT 1
- Lets-Plot: notes for pyramid HOT 1
- Lets-Plot: add Lets-Plot to geo-spatial visualisation HOT 1
- Update regression page to reflect new model comparison from pyfixest
- No R2 values reported with `pyfixest` in chapter 6 HOT 3
- Zenodo store of 1st edition HOT 1
- Review of all chapters with typo and text fixes HOT 1
- Update Pyfixest and add IV table back in
- Page on sharing data: particulate matter sharer has now been disabled (change page to reflect this) HOT 1
- Add a diverging stacked bar chart to Common Plots HOT 1
- Broken matplotlib demos HOT 1
- Non-breaking API changes for `pyfixest` version `0.17.0` HOT 2
- Sharper arrowheads in the "Connected scatter plot" section.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coding-for-economists.