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

appdirs --> platformdirs #359

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ci/310.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- scikit-learn
- seaborn
- pyarrow >=0.14.1
- appdirs
- platformdirs
- dash
- dash-bootstrap-components
- palettable
Expand All @@ -29,6 +29,7 @@ dependencies:
- versioneer
- pyproj >=3
- pandana
- pooch

# testing
- jupyter
Expand Down
3 changes: 2 additions & 1 deletion .ci/38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- scikit-learn
- seaborn
- pyarrow >=0.14.1
- appdirs
- platformdirs
- dash
- dash-bootstrap-components
- palettable
Expand All @@ -29,6 +29,7 @@ dependencies:
- versioneer
- pyproj >=3
- pandana
- pooch

# testing
- jupyter
Expand Down
3 changes: 2 additions & 1 deletion .ci/39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- seaborn
- hdbscan
- pyarrow >=0.14.1
- appdirs
- platformdirs
- dash
- dash-bootstrap-components
- palettable
Expand All @@ -29,6 +29,7 @@ dependencies:
- versioneer
- pyproj >=3
- pandana
- pooch

# testing
- jupyter
Expand Down
2 changes: 1 addition & 1 deletion docs/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This means that streaming data is relatively fast and efficient.

If you plan to make repeated queries, or you need offline access to the data, ``geosnap`` also has functions
for caching all the data locally (see the `Getting Started <https://oturns.github.io/geosnap-guide/notebooks/01_getting_started.html>`_ tutorial).
Since we store everything in parquet, local storage is still highly efficient, and ``geosnap`` will use `appdirs <https://pypi.org/project/appdirs/>`_
Since we store everything in parquet, local storage is still highly efficient, and ``geosnap`` will use `platformdirs <https://pypi.org/project/platformdirs/>`_
to determine the best place to store the data on your machine.


Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- scikit-learn
- seaborn
- pyarrow >=0.14.1
- appdirs
- platformdirs
- pip
- tqdm
- quilt3 >=3.6
Expand Down
2 changes: 1 addition & 1 deletion geosnap/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import geopandas as gpd
import pandas as pd
from appdirs import user_data_dir
from platformdirs import user_data_dir


def _fetcher(local_path, remote_path, warning_msg):
Expand Down
4 changes: 2 additions & 2 deletions geosnap/io/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import geopandas as gpd
import pandas as pd
import quilt3
from appdirs import user_data_dir
from platformdirs import user_data_dir

from .._data import DataStore
from .util import adjust_inflation
Expand Down Expand Up @@ -40,7 +40,7 @@ def store_seda(data_dir="auto", accept_eula=False):
----------
data_dir : str, optional
path to desired storage location. If "auto", geosnap will use its default data
directory provided by appdirs, by default "auto"
directory provided by platformdirs, by default "auto"
accept_eula : bool, optional
Whether the accept the EULA from SEDA, by default False
"""
Expand Down
2 changes: 1 addition & 1 deletion geosnap/io/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_census_gdb(years=None, geom_level="blockgroup", output_dir="."):
fn = f"{year}_ACS_5YR_{geom_level.capitalize()}.gdb.zip"
out_fn = f"ACS_{year}_5YR_{levels[geom_level].upper()}.gdb.zip"
pth = pathlib.PurePath(output_dir, out_fn)
url = f"https://www2.census.gov/geo/tiger/TIGER_DP/{year}ACS/{fn}"
url = f"ftp://ftp2.census.gov/geo/tiger/TIGER_DP/{year}ACS/{fn}"
pooch.retrieve(url, None, progressbar=True, path=pth)

def reformat_acs_vars(col):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mapclassify
giddy>=2.2.1
xlrd
cenpy
appdirs
platformdirs
tqdm
quilt3>=3.6
pyarrow>=0.14.1
Expand Down