-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvironment.yml
More file actions
176 lines (166 loc) · 4.69 KB
/
environment.yml
File metadata and controls
176 lines (166 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# -- Building, updating, and exporting an environment ------------------------
#
# To create & activate environment {name} from this file, run:
#
# (1) $ conda env create -f environment.yml
# (2) $ conda activate {name}
#
# To update (upgrade/install new/delete removed *conda*) deps from this file:
#
# $ conda env update --file environment.yml --prune
#
# To create an environment file from your loaded dependencies, run:
#
# $ conda env export --from-history > requirements_conda.yml
#
#
# -- Generating lock files ---------------------------------------------------
#
# For the most comprehensive listing including version and build information:
#
# $ conda list --export > requirements_conda.txt
#
# Then install by running:
#
# $ conda create -n {env-name} --file requirements_conda.txt
#
#
# For a complete listing of *Python* dependencies for distribution, use pip:
#
# $ pip list --format=freeze > requirements_pip.txt
#
# This filters out packages that are not:
#
# (1) installed in the currently activated (conda or pip) environment;
# (2) reqs of the installed packages (provided `--not-required` option given).
#
# Option (2) is ommitted due to potential pip vs conda discrepancies.
#
#
# -- Checking for outdated dependencies --------------------------------------
#
# To ensure all Python dependencies are updated before distribution, run:
#
# (0.0) $ python -m pip check # check for missing
# (1.0) $ python -m pip list --outdated --not-required # check for outdated
# (1.2) $ conda search --outdated --use-local
#
#
# -- Building dependency trees -----------------------------------------------
#
# To store a handy dependency tree for your environment:
#
# $ pipdeptree -r | tee requirements_pipdeptree.txt
#
#
# To investigate why a particular package is installed, run either:
#
# (1) $ python -m pip show {pkg-name}
# (2) $ pipdeptree --reverse --packages {pkg-name}
#
#
# -- Housekeeping ------------------------------------------------------------
#
# Remember to periodically update conda and brew:
#
# $ conda update -n base -c conda-forge conda
# $ brew update
#
#
# -- Basic environment management workflow -----------------------------------
#
# (1) manually update environment.yml
# (2) $ conda env update --file environment.yml --prune
#
# To manually resolve any failed uninstallations/upgrades:
#
# (1) $ conda uninstall {pkg-name} / $ conda update {pkg-name}
# (2) $ pip list --format=freeze > requirements_pip.txt
#
#
# -- Unified, automated environment management workflow ----------------------
#
# If you add or remove any dependencies from this file, also add or remove
# them to/from the appropriate requirements_*.txt file.
#
# Following any such changes or to upgrade your existing environment, run the
# (un)installation/upgrade(s) followed by CI to check forward compatibility
# and subsequently synchronize requirements_*.txt files by running:
#
# $ make upgrade-deps
#
#
# -- Scenarios ---------------------------------------------------------------
#
# I. You need to add or remove a dependency:
#
# (1) change this file and the appropriate requirements_*.txt file
# (2) $ make upgrade-deps
#
# II. A pre-commit hook reveals outdated packages (ignoring pinned versions):
# $ make upgrade-deps
#
# III. Either the `upgrade-deps` routine or a CI workflow returns an error:
#
# Pin the latest working version of the dependencies causing the
# conflict in both this file and the appropriate requirements_*.txt file
# (until the conflict is resolved for forward compatibility).
#
name: datopy
channels:
- apple
- conda-forge
dependencies:
- python=3.10
- pip>=19.0
- requests
# Data analysis
- numpy
- pandas
# Plotting
- matplotlib
# - seaborn
# data validation
- pydantic
# [Optional: API clients]
- bs4
# ensures pycurl and wptools are installed correctly
- openssl
- pycurl
# secure API key retrieval
- python-dotenv
# [Docs]
- sphinx
# [Dev]
# for inspecting the dependency tree
- pipdeptree
- pip:
# JSON data validation
- jsonschema
# [Optional: API clients]
- wptools
- cinemagoer
- spotipy
# [Build]
- setuptools
# [Dev] Typing/Testing/Linting
# run `mypy --install-types` to install missing stubs. Pandas given below.
- mypy
- pandas-stubs
- pytest
- pytest-benchmark
- coverage
- tox
# - tox-conda
# - pytest-doctestplus
- flake8
# [Docs]
# - furo
- babel
- pydata-sphinx-theme
- numpydoc
- autodoc_pydantic
# adds ER diagram support to autodoc_pydantic
# requires graphviz (also required for pipdeptree graphs)
# https://pygraphviz.github.io/documentation/stable/install.html#macos
# - erdantic