Skip to content

Commit 0cd95e5

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into ci/testing-env
2 parents 287ee5b + a027753 commit 0cd95e5

File tree

13 files changed

+278
-243
lines changed

13 files changed

+278
-243
lines changed

.github/workflows/docs-preview.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@ jobs:
2222
with:
2323
auto-update-conda: true
2424
miniforge-variant: Mambaforge
25-
environment-file: mkdocs/environment.yaml
25+
environment-file: environment-dev.yml
2626
use-mamba: true
2727

2828
- name: Build docs
2929
run: |
3030
pip install .
3131
mkdocs build
3232
33+
- uses: actions/upload-artifact@v3
34+
with:
35+
name: website
36+
path: site/
37+
3338
- name: Deploy docs preview to Netlify
3439
uses: nwtgck/[email protected]
3540
with:

.requirements/all.txt

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ attrs==21.4.0
1515
backcall==0.2.0
1616
# via ipython
1717
biopython==1.79
18-
# via -r .requirements/biology.in
18+
# via -r biology.in
1919
black==22.1.0
20-
# via -r .requirements/dev.in
20+
# via -r dev.in
2121
cfgv==3.3.1
2222
# via pre-commit
2323
click==8.0.4
@@ -31,7 +31,7 @@ colorama==0.4.4
3131
coverage[toml]==6.3.2
3232
# via pytest-cov
3333
darglint==1.8.1
34-
# via -r .requirements/dev.in
34+
# via -r dev.in
3535
decorator==5.1.1
3636
# via ipython
3737
distlib==0.3.4
@@ -44,26 +44,24 @@ filelock==3.6.0
4444
# via virtualenv
4545
flake8==4.0.1
4646
# via
47-
# -r .requirements/dev.in
47+
# -r dev.in
4848
# pandas-vet
4949
ghp-import==2.0.2
5050
# via mkdocs
5151
hypothesis==6.39.3
52-
# via -r .requirements/testing.in
52+
# via -r testing.in
5353
identify==2.4.11
5454
# via pre-commit
5555
importlib-metadata==4.11.2
56-
# via
57-
# markdown
58-
# mkdocs
56+
# via mkdocs
5957
iniconfig==1.1.1
6058
# via pytest
6159
interrogate==1.5.0
62-
# via -r .requirements/testing.in
60+
# via -r testing.in
6361
ipython==8.1.1
64-
# via -r .requirements/docs.in
62+
# via -r docs.in
6563
isort==5.10.1
66-
# via -r .requirements/dev.in
64+
# via -r dev.in
6765
jedi==0.18.1
6866
# via ipython
6967
jinja2==3.0.3
@@ -90,26 +88,26 @@ mergedeep==1.3.4
9088
# via mkdocs
9189
mkdocs==1.2.3
9290
# via
93-
# -r .requirements/docs.in
91+
# -r docs.in
9492
# mkdocs-autorefs
9593
# mkdocs-material
9694
# mkdocstrings
9795
mkdocs-autorefs==0.4.1
9896
# via mkdocstrings
9997
mkdocs-material==8.2.5
100-
# via -r .requirements/docs.in
98+
# via -r docs.in
10199
mkdocs-material-extensions==1.0.3
102100
# via mkdocs-material
103101
mkdocstrings==0.17.0
104-
# via -r .requirements/docs.in
102+
# via -r docs.in
105103
mpmath==1.2.1
106104
# via sympy
107105
multipledispatch==0.6.0
108-
# via -r .requirements/base.in
106+
# via -r base.in
109107
mypy-extensions==0.4.3
110108
# via black
111109
natsort==8.1.0
112-
# via -r .requirements/base.in
110+
# via -r base.in
113111
nodeenv==1.6.0
114112
# via pre-commit
115113
numpy==1.22.3
@@ -129,9 +127,9 @@ pandas==1.4.1
129127
# pandas-flavor
130128
# xarray
131129
pandas-flavor==0.2.0
132-
# via -r .requirements/base.in
130+
# via -r base.in
133131
pandas-vet==0.2.3
134-
# via -r .requirements/testing.in
132+
# via -r testing.in
135133
parso==0.8.3
136134
# via jedi
137135
pathspec==0.9.0
@@ -143,15 +141,15 @@ pexpect==4.8.0
143141
pickleshare==0.7.5
144142
# via ipython
145143
pip-tools==6.5.1
146-
# via -r .requirements/dev.in
144+
# via -r dev.in
147145
platformdirs==2.5.1
148146
# via
149147
# black
150148
# virtualenv
151149
pluggy==1.0.0
152150
# via pytest
153151
pre-commit==2.17.0
154-
# via -r .requirements/dev.in
152+
# via -r dev.in
155153
prompt-toolkit==3.0.28
156154
# via ipython
157155
ptyprocess==0.7.0
@@ -160,11 +158,11 @@ pure-eval==0.2.2
160158
# via stack-data
161159
py==1.11.0
162160
# via
163-
# -r .requirements/testing.in
161+
# -r testing.in
164162
# interrogate
165163
# pytest
166164
# pytest-forked
167-
py4j==0.10.9.3
165+
py4j==0.10.9.5
168166
# via pyspark
169167
pycodestyle==2.8.0
170168
# via flake8
@@ -180,20 +178,20 @@ pymdown-extensions==9.2
180178
# mkdocstrings
181179
pyparsing==3.0.7
182180
# via packaging
183-
pyspark==3.2.1
184-
# via -r .requirements/spark.in
181+
pyspark==3.2.2
182+
# via -r spark.in
185183
pytest==7.0.1
186184
# via
187-
# -r .requirements/testing.in
185+
# -r testing.in
188186
# pytest-cov
189187
# pytest-forked
190188
# pytest-xdist
191189
pytest-cov==3.0.0
192-
# via -r .requirements/testing.in
190+
# via -r testing.in
193191
pytest-forked==1.4.0
194192
# via pytest-xdist
195193
pytest-xdist==2.5.0
196-
# via -r .requirements/testing.in
194+
# via -r testing.in
197195
python-dateutil==2.8.2
198196
# via
199197
# ghp-import
@@ -210,7 +208,7 @@ pyyaml==6.0
210208
pyyaml-env-tag==0.1
211209
# via mkdocs
212210
scipy==1.8.0
213-
# via -r .requirements/base.in
211+
# via -r base.in
214212
six==1.16.0
215213
# via
216214
# asttokens
@@ -236,15 +234,13 @@ tomli==2.0.1
236234
# pep517
237235
# pytest
238236
tqdm==4.63.0
239-
# via -r .requirements/chemistry.in
237+
# via -r chemistry.in
240238
traitlets==5.1.1
241239
# via
242240
# ipython
243241
# matplotlib-inline
244-
typing-extensions==4.1.1
245-
# via black
246242
unyt==2.8.0
247-
# via -r .requirements/engineering.in
243+
# via -r engineering.in
248244
virtualenv==20.13.3
249245
# via pre-commit
250246
watchdog==2.1.6

.requirements/docs.txt

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ asttokens==2.0.5
99
backcall==0.2.0
1010
# via ipython
1111
biopython==1.79
12-
# via -r .requirements/biology.in
12+
# via -r biology.in
1313
click==8.0.4
1414
# via mkdocs
1515
decorator==5.1.1
@@ -19,11 +19,9 @@ executing==0.8.3
1919
ghp-import==2.0.2
2020
# via mkdocs
2121
importlib-metadata==4.11.2
22-
# via
23-
# markdown
24-
# mkdocs
22+
# via mkdocs
2523
ipython==8.1.1
26-
# via -r .requirements/docs.in
24+
# via -r docs.in
2725
jedi==0.18.1
2826
# via ipython
2927
jinja2==3.0.3
@@ -48,18 +46,18 @@ mergedeep==1.3.4
4846
# via mkdocs
4947
mkdocs==1.2.3
5048
# via
51-
# -r .requirements/docs.in
49+
# -r docs.in
5250
# mkdocs-autorefs
5351
# mkdocs-material
5452
# mkdocstrings
5553
mkdocs-autorefs==0.4.1
5654
# via mkdocstrings
5755
mkdocs-material==8.2.5
58-
# via -r .requirements/docs.in
56+
# via -r docs.in
5957
mkdocs-material-extensions==1.0.3
6058
# via mkdocs-material
6159
mkdocstrings==0.17.0
62-
# via -r .requirements/docs.in
60+
# via -r docs.in
6361
mpmath==1.2.1
6462
# via sympy
6563
numpy==1.22.3
@@ -80,7 +78,7 @@ ptyprocess==0.7.0
8078
# via pexpect
8179
pure-eval==0.2.2
8280
# via stack-data
83-
py4j==0.10.9.3
81+
py4j==0.10.9.5
8482
# via pyspark
8583
pygments==2.11.2
8684
# via
@@ -92,8 +90,8 @@ pymdown-extensions==9.2
9290
# mkdocstrings
9391
pyparsing==3.0.7
9492
# via packaging
95-
pyspark==3.2.1
96-
# via -r .requirements/spark.in
93+
pyspark==3.2.2
94+
# via -r spark.in
9795
python-dateutil==2.8.2
9896
# via ghp-import
9997
pytkdocs==0.16.1
@@ -113,13 +111,13 @@ stack-data==0.2.0
113111
sympy==1.10
114112
# via unyt
115113
tqdm==4.63.0
116-
# via -r .requirements/chemistry.in
114+
# via -r chemistry.in
117115
traitlets==5.1.1
118116
# via
119117
# ipython
120118
# matplotlib-inline
121119
unyt==2.8.0
122-
# via -r .requirements/engineering.in
120+
# via -r engineering.in
123121
watchdog==2.1.6
124122
# via mkdocs
125123
wcwidth==0.2.5

.requirements/spark.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# pip-compile .requirements/spark.in
66
#
7-
py4j==0.10.9.3
7+
py4j==0.10.9.5
88
# via pyspark
9-
pyspark==3.2.1
10-
# via -r .requirements/spark.in
9+
pyspark==3.2.2
10+
# via -r spark.in

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
- [INF] Update `mkdocstrings` version and to fit its new coming features. PR #1138 @Zeroto521
1818
- [BUG] Force `math.softmax` returning `Series`. PR #1139 @Zeroto521
1919
- [INF] Set independent environment for building documentation. PR #1141 @Zeroto521
20+
- [DOC] Add local documentation preview via github action artifact. PR #1149 @Zeroto521
21+
- [ENH] Enabel `encode_categorical` handle 2 (or more ) dimensions array. PR #1153 @Zeroto521
2022

2123
## [v0.23.1] - 2022-05-03
2224

environment-dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ dependencies:
2222
- make
2323
- mkdocs
2424
- mkdocs-material
25-
- mkdocstrings-python
25+
- mkdocstrings=0.18.1
26+
- mkdocstrings-python-legacy=0.2.2
2627
- missingno
2728
- multipledispatch
2829
- mypy

janitor/biology.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,32 +41,32 @@ def join_fasta(
4141
4242
Method chaining usage example:
4343
44-
>>> import tempfile
45-
>>> import pandas as pd
46-
>>> import janitor.biology
47-
48-
>>> tf = tempfile.NamedTemporaryFile()
49-
>>> tf.write('''>SEQUENCE_1
50-
... MTEITAAMVKELRESTGAGMMDCK
51-
... >SEQUENCE_2
52-
... SATVSEINSETDFVAKN'''.encode('utf8'))
53-
66
54-
>>> tf.seek(0)
55-
0
56-
57-
>>> df = pd.DataFrame({"sequence_accession":
58-
... ["SEQUENCE_1", "SEQUENCE_2", ]})
59-
60-
>>> df = df.join_fasta(
61-
... filename=tf.name,
62-
... id_col='sequence_accession',
63-
... column_name='sequence',
64-
... )
65-
66-
>>> df.sequence
67-
0 MTEITAAMVKELRESTGAGMMDCK
68-
1 SATVSEINSETDFVAKN
69-
Name: sequence, dtype: object
44+
>>> import tempfile
45+
>>> import pandas as pd
46+
>>> import janitor.biology
47+
48+
>>> tf = tempfile.NamedTemporaryFile()
49+
>>> tf.write('''>SEQUENCE_1
50+
... MTEITAAMVKELRESTGAGMMDCK
51+
... >SEQUENCE_2
52+
... SATVSEINSETDFVAKN'''.encode('utf8'))
53+
66
54+
>>> tf.seek(0)
55+
0
56+
57+
>>> df = pd.DataFrame({"sequence_accession":
58+
... ["SEQUENCE_1", "SEQUENCE_2", ]})
59+
60+
>>> df = df.join_fasta(
61+
... filename=tf.name,
62+
... id_col='sequence_accession',
63+
... column_name='sequence',
64+
... )
65+
66+
>>> df.sequence
67+
0 MTEITAAMVKELRESTGAGMMDCK
68+
1 SATVSEINSETDFVAKN
69+
Name: sequence, dtype: object
7070
7171
:param df: A pandas DataFrame.
7272
:param filename: Path to the FASTA file.

0 commit comments

Comments
 (0)