Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace setup.py with pyproject.toml #1129

Merged
merged 5 commits into from
Dec 5, 2023
Merged

Conversation

yunjunz
Copy link
Member

@yunjunz yunjunz commented Dec 4, 2023

Description of proposed changes

Reminders

  • Pass Pre-commit check (green)
  • Pass Codacy code review (green)
  • Pass Circle CI test (green)
  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • If modifying functionality, describe changes to function behavior and arguments in a comment below the function declaration.

+ add `tests/requirements.txt` file for test requirements

+ `requirements.txt`: move pre-commit into the `tests/requirements.txt` file

+ replace `setup.py` with `pyproject.toml`
@yunjunz
Copy link
Member Author

yunjunz commented Dec 4, 2023

I try to replace the old setup.py with pyproject.toml here, but testing both locally and in the Circle CI failed due to the same error as below. @avalentino @jhkennedy @scottstanie Could you take a look at the PR when you get a chance and help me find out what went wrong?

(test_mintpy) yunjunz:~>$ cd ~/tools/MintPy/
(test_mintpy) yunjunz:~/tools/MintPy>$ python -m pip install -e .
Obtaining file:///Users/yunjunz/tools/MintPy
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of mintpy to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement python>=3.6 (from mintpy) (from versions: none)
ERROR: No matching distribution found for python>=3.6

@scottstanie
Copy link
Contributor

I think the python>=3.6 part isn't install-able via pip, so it had to be removed from requirements.txt. It's enforced by having it in pyproject.toml.
(sorry I didn't mean to push directly to you branch! 😬 )

By the way, had you considered bumping up the min python version? Both 3.6 and 3.7 are now in the end-of-life stage

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
@yunjunz
Copy link
Member Author

yunjunz commented Dec 4, 2023

Thank you @scottstanie @avalentino for the quick fix and suggestions.

I just bumped the min version to 3.8 as you suggested. I will look at the new syntax of 3.7 and 3.8 on another day to see what can be simplified in the code to leverage the new version!

@yunjunz yunjunz merged commit d1b793b into insarlab:main Dec 5, 2023
7 checks passed
@yunjunz yunjunz deleted the pyproject.toml branch December 5, 2023 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants