diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e5248c..271ae3d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/prepareJsons_and_Bib.ipynb b/prepareJsons_and_Bib.ipynb index 08db7d9..3d9a64a 100644 --- a/prepareJsons_and_Bib.ipynb +++ b/prepareJsons_and_Bib.ipynb @@ -14,7 +14,7 @@ "metadata": {}, "outputs": [], "source": [ - "import datetime,json\n", + "import datetime, json\n", "import pandas as pd" ] }, @@ -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", + ")" ] }, { @@ -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)" ] }, { @@ -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", @@ -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)" ]