From 6d316519c4c46e9b90731aa7f410ec94ae832935 Mon Sep 17 00:00:00 2001 From: Dominik Neise Date: Mon, 20 Jul 2026 11:41:49 +0200 Subject: [PATCH 1/7] remove explicit mention of setup.py, since we are now using pyproject.toml. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bfacd25c..fb0cc9bb 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Requirements of the installation: - The current version of the package **only** runs with `python>=3.9`. Python 3.9 is recommended. Be careful as well with the versions of matplotlib and healpy, they should be the ones explicitly given in the requirements.yml, otherwise conflicts between them when plotting skymaps will arise. - Note that by creating the env from the environment.yml, the libraries and versions needed will be installed automatically. -- Note that every time we made changes to the package, you should update the installation of the package doing ```pip install .``` in the folder where the setup.py is located. The changes will be only applied to the env in which you are working. +- Note that every time we made changes to the package, you should reinstall the package by running ```pip install .``` in the project root directory. The changes will be only applied to the env in which you are working. - The package relies on 'curl' to download the localisation map of the multi-messenger events. In the case you are working in CC-Lyon, the easiest solution is to do```ccenv conda ``` and then follow the instructions given above. From 9c5574abb9f2f23ae283a36777c6fda3c7f52c43 Mon Sep 17 00:00:00 2001 From: Dominik Neise Date: Mon, 20 Jul 2026 11:56:45 +0200 Subject: [PATCH 2/7] remove old requirements.txt, since it is not needed anymore --- README.md | 4 ++-- requirements.txt | 23 ----------------------- 2 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 requirements.txt diff --git a/README.md b/README.md index fb0cc9bb..6cee8f18 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ If you prefer to avoid conda and use a virtual environment with your favorite py ``` python -m venv tilepy_venv source tilepy_venv/bin/activate -pip3 install --upgrade pip -python -m pip install -r requirements.txt +pip install --upgrade pip +pip install . ``` Requirements of the installation: diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 81343d70..00000000 --- a/requirements.txt +++ /dev/null @@ -1,23 +0,0 @@ -astropy -pytz -scipy<1.14.0 -healpy==1.16.2 -tables -ipython -matplotlib<3.9.0 -MOCpy -numpy -pandas -ephem -gdpyc -ligo.skymap>=2.0.0 -fastparquet -skyfield -ipykernel -six -mhealpy>=0.3.0,<0.4 -setuptools -requests -scikit-learn>=1.6.1 -pytest -nbmake From 85914de075320ee6c604684c26c1d9cbe5067c77 Mon Sep 17 00:00:00 2001 From: Dominik Neise Date: Mon, 20 Jul 2026 12:16:31 +0200 Subject: [PATCH 3/7] use pyproject.toml in cite_dependencies.py --- cite_dependencies.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/cite_dependencies.py b/cite_dependencies.py index e5b31234..0622d5d4 100644 --- a/cite_dependencies.py +++ b/cite_dependencies.py @@ -4,6 +4,11 @@ import requests +try: + import tomllib # Python 3.11+ +except ImportError: + import tomli as tomllib # Python 3.9, 3.10 + def get_authors_from_github(repo_path, title, url): headers = { @@ -63,28 +68,24 @@ def write_bibtex_to_file(data): file.write(bibtex_entry) -# Parse requirements.txt for package names and versions -# with open('requirements.txt', 'r') as file: -# lines = file.readlines() -# packages_and_versions = [line for line in lines] +def parse_pyproject_dependencies(file_path="pyproject.toml"): + """Parse dependencies from pyproject.toml""" + packages = [] + with open(file_path, "rb") as f: + data = tomllib.load(f) + # Extract main dependencies + dependencies = data.get("project", {}).get("dependencies", []) + for dep in dependencies: + # Remove any version specifiers and whitespace + package_name = dep.split("[")[0].strip() + if package_name and package_name.lower() != "setuptools": + packages.append(dep) -def parse_requirements(file_path): - packages = [] - with open(file_path, "r") as file: - for line in file: - # Removing any trailing whitespace and comments - package = line.split("#")[0].strip() - if package: # Only add non-empty lines - packages.append(package) return packages -# Usage -file_path = "./requirements.txt" # Replace with your file path -packages = parse_requirements(file_path) -print(packages) - +packages = parse_pyproject_dependencies("./pyproject.toml") print("requirements found: ", packages) # Regex to match GitHub URLs github_pattern = re.compile(r"https?://github\.com/([\w\-]+/[\w\-]+)") From 7d924b8730abc0a5eda22066d6b094cd87aa1d4f Mon Sep 17 00:00:00 2001 From: Dominik Neise Date: Mon, 20 Jul 2026 12:17:25 +0200 Subject: [PATCH 4/7] remove pip install -r requirements.txt from ci.yml - the deps are listed in pyproject.toml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbd93184..6938a9b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt pip install -e . pip install -e ".[tests]" From 98281c7d81c8a873c2174c5c334261b12cf7a4aa Mon Sep 17 00:00:00 2001 From: Dominik Neise Date: Mon, 20 Jul 2026 12:19:14 +0200 Subject: [PATCH 5/7] test for python 3.9, 3.10 and 3.12 --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6938a9b6..7f6faf4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: [push, pull_request] jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.9', '3.10', '3.12'] steps: - name: Checkout repository uses: actions/checkout@v3 @@ -12,7 +15,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | From edf49ebc6a82027142aabae2b4d78a5253ae6c22 Mon Sep 17 00:00:00 2001 From: Dominik Neise Date: Mon, 20 Jul 2026 12:20:40 +0200 Subject: [PATCH 6/7] relax healpy requirement - anything >=1.16.2 and <2 is fine --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4c40c41f..3b188e11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ 'astropy', 'scipy<1.14.0', 'numpy', - 'healpy==1.16.2', + 'healpy>=1.16.2,<2', 'ipython', 'matplotlib<3.9.0', 'MOCpy', @@ -177,6 +177,6 @@ ignore-words-list = """ package = true override-dependencies = [ - 'healpy>=1.17.0', + 'healpy>=1.16.2,<2', "setuptools>=64,<71", ] From 579baeecba35ffcec08963b132a6ae3f174f555c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 10:26:41 +0000 Subject: [PATCH 7/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- cite_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cite_dependencies.py b/cite_dependencies.py index 0622d5d4..47f126a8 100644 --- a/cite_dependencies.py +++ b/cite_dependencies.py @@ -7,7 +7,7 @@ try: import tomllib # Python 3.11+ except ImportError: - import tomli as tomllib # Python 3.9, 3.10 + import tomli as tomllib # Python 3.9, 3.10 def get_authors_from_github(repo_path, title, url):