Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#11)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.6.7](astral-sh/ruff-pre-commit@v0.5.6...v0.6.7)
- [github.com/psf/black-pre-commit-mirror: 24.4.2 → 24.8.0](psf/black-pre-commit-mirror@24.4.2...24.8.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Sep 26, 2024
1 parent dbb4ca9 commit abf7f19
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ repos:
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.6"
rev: "v0.6.7"
hooks:
- id: ruff-format

- repo: https://github.com/psf/black-pre-commit-mirror
rev: "24.4.2"
rev: "24.8.0"
hooks:
- id: black

Expand Down
20 changes: 14 additions & 6 deletions prepareJsons_and_Bib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"metadata": {},
"outputs": [],
"source": [
"import datetime,json\n",
"import datetime, json\n",
"import pandas as pd"
]
},
Expand Down Expand Up @@ -52,7 +52,12 @@
"metadata": {},
"outputs": [],
"source": [
"pprint.pprint(confs.to_json(orient='records',date_format=\"iso\",))"
"pprint.pprint(\n",
" confs.to_json(\n",
" orient=\"records\",\n",
" date_format=\"iso\",\n",
" )\n",
")"
]
},
{
Expand All @@ -61,9 +66,11 @@
"metadata": {},
"outputs": [],
"source": [
"result = confs.sort_values(\"date\",ascending=False).to_json(orient=\"records\",date_format='iso')\n",
"result = confs.sort_values(\"date\", ascending=False).to_json(\n",
" orient=\"records\", date_format=\"iso\"\n",
")\n",
"parsed = json.loads(result)\n",
"json.dump(parsed,open(\"_data/sorted_confs.json\",'w'), indent=4) "
"json.dump(parsed, open(\"_data/sorted_confs.json\", \"w\"), indent=4)"
]
},
{
Expand All @@ -80,7 +87,8 @@
"outputs": [],
"source": [
"import requests\n",
"url = 'https://inspirehep.net/api/literature?sort=mostrecent&size=25&page=1&q=a Guillermo.Fidalgo.1&format=bibtex'\n",
"\n",
"url = \"https://inspirehep.net/api/literature?sort=mostrecent&size=25&page=1&q=a Guillermo.Fidalgo.1&format=bibtex\"\n",
"inspire = requests.get(url).text\n",
"# response = requests.get('https://inspirehep.net/api/literature?sort=mostrecent&size=25&page=1&q=Guillermo%20Fidalgo')\n",
"# url = response.json()['links']['bibtex']\n",
Expand Down Expand Up @@ -123,7 +131,7 @@
"metadata": {},
"outputs": [],
"source": [
"with open(\"bibfile.bib\",'w') as f:\n",
"with open(\"bibfile.bib\", \"w\") as f:\n",
" f.write(inspire)\n",
" f.write(zenodo)"
]
Expand Down

0 comments on commit abf7f19

Please sign in to comment.