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

Ensure config dir is writable #135

Merged
merged 19 commits into from
May 1, 2018
Merged

Ensure config dir is writable #135

merged 19 commits into from
May 1, 2018

Conversation

bschreck
Copy link
Contributor

Issue: on some environments (namely, some automatic CI environments) the home directory is not writable. Featuretools thus fails to install because we attempt to create a ~/.featuretools folder.

This PR resolves this problem by checking if the config folder is writable, and if not, it creates a temporary folder instead. It also allows a user to specify which folder to use for config via an environment variable ($FEATURETOOLS_DIR).

Much of this code was modified from the IPython source:

https://github.com/ipython/ipython/blob/master/IPython/utils/path.py (get_ipython_dir())

and

https://github.com/ipython/ipython/blob/master/IPython/paths.py (get_home_dir())

Lastly, it changes config_yaml.txt to a proper yaml file: config.yaml

@codecov-io
Copy link

Codecov Report

Merging #135 into master will decrease coverage by 0.08%.
The diff coverage is 72.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage   88.76%   88.68%   -0.09%     
==========================================
  Files          75       76       +1     
  Lines        7803     7845      +42     
==========================================
+ Hits         6926     6957      +31     
- Misses        877      888      +11
Impacted Files Coverage Δ
...utational_backend/test_calculate_feature_matrix.py 99.55% <100%> (+0.43%) ⬆️
featuretools/config.py 71.08% <61.76%> (-7.77%) ⬇️
featuretools/tests/utils_tests/test_config.py 93.33% <93.33%> (ø)
featuretools/utils/gen_utils.py 66.66% <0%> (+2.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03d36f1...4ce3394. Read the comment docs.

@@ -8,4 +8,4 @@ jobs:
- checkout
- run: pyenv local 2.7.13 3.5.2 3.6.0
- run: make installdeps
- run: make lint && tox && codecov
- run: tox && make lint && codecov
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason for shifting order? I'd think we want things to fail faster

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thought was that you'd want to know if your code passed the tests regardless of whether it passed linting. That is a more important indicator of how your branch is doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case in particular, the lint error was masking the actual testing error that I cared about, and was not able to reproduce locally

Copy link
Contributor

Choose a reason for hiding this comment

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

gotcha. this change makes sense to me

@kmax12
Copy link
Contributor

kmax12 commented May 1, 2018

Looks good. Merging

@kmax12 kmax12 merged commit 18a9427 into master May 1, 2018
@rwedge rwedge mentioned this pull request May 30, 2018
@rwedge rwedge deleted the writable-config-dir branch June 3, 2019 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants