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 requirement files with pyproject #6116

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
setup.py
pyproject.toml
dev-requirements.txt

- name: Get wheels
uses: actions/download-artifact@v3
Expand All @@ -172,10 +170,7 @@ jobs:

- name: Install wheel
run: |
find . -name "*.whl" -exec pip install {} \;

- name: Install dependencies
run: pip install -r dev-requirements.txt
find . -name "*.whl" -exec pip install "{}[dev]" \;

- name: Make test directory
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:

- name: Install with dependencies
run: |
pip install .
pip install -r dev-requirements.txt
pip install ".[dev]"

- name: Test GUI
if: matrix.test-type == 'gui-tests'
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/doctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ jobs:
cache-dependency-path: |
setup.py
pyproject.toml
dev-requirements.txt
- run: pip install -e .

- name: Install with dependencies
run: |
pip install -r dev-requirements.txt
- run: pip install -e ".[dev]"

- name: Test doctest
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ jobs:
cache-dependency-path: |
setup.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line was removed further up, it should not be removed here?

pyproject.toml
style-requirements.txt

- name: Install dependencies
- name: Install ERT with style dependencies
run: |
pip install -r style-requirements.txt
pip install ".[style]"

- name: Clang Format
run: ./script/clang-format --check
Expand All @@ -59,5 +58,4 @@ jobs:

- name: Run pylint
run: |
pip install . # We need the dependencies of ERT to avoid import-error
script/pylint
6 changes: 1 addition & 5 deletions .github/workflows/test_ert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
cache-dependency-path: |
setup.py
pyproject.toml
dev-requirements.txt

- name: Get wheels
uses: actions/download-artifact@v3
Expand All @@ -38,10 +37,7 @@ jobs:

- name: Install wheel
run: |
find . -name "*.whl" -exec pip install {} \;

- name: Install dependencies
run: pip install -r dev-requirements.txt
find . -name "*.whl" -exec pip install "{}[dev]" \;

- name: Test GUI
if: inputs.test-type == 'gui-test'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install ERT and dependencies
run: |
pip install .
pip install ".[dev, types]"
- name: Install dependencies
# type checking requires protobuf stubs
run: |
python -m pip install --upgrade pip
python -m pip install -r types-requirements.txt
python -m pip install -r dev-requirements.txt
python -m pip install grpcio-tools
python -m grpc_tools.protoc -I src/_ert_com_protocol --mypy_out=src/_ert_com_protocol src/_ert_com_protocol/_schema.proto
- run: echo ::add-matcher::.github/mypy-matcher.json
Expand Down
9 changes: 5 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
version: 2

python:
install:
- requirements: dev-requirements.txt
- method: pip
path: .
install:
- method: pip
path: .
extra_requirements:
- dev

sphinx:
builder: html
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ noise in the review process.

You can build the documentation after installation by running
```bash
pip install -r dev-requirements.txt
pip install "ert[dev]"
sphinx-build -n -v -E -W ./docs ./tmp/ert_docs
```
and then open the generated `./tmp/ert_docs/index.html` in a browser.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pip install --editable .
Additional development packages must be installed to run the test suite:

```sh
pip install -r dev-requirements.txt
pip install "ert[dev]"
pytest tests/
```

Expand Down
3 changes: 1 addition & 2 deletions ci/run_ert_ctests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ build_ert_clib () {

build_ert_dev () {
enable_environment
pip install ${ERT_SOURCE_ROOT}
pip install -r ${ERT_SOURCE_ROOT}/dev-requirements.txt
pip install "${ERT_SOURCE_ROOT}[dev]"
}

run_ctest () {
Expand Down
2 changes: 1 addition & 1 deletion ci/testkomodo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ copy_test_files () {
}

install_test_dependencies () {
pip install -r dev-requirements.txt
pip install "ert[dev]"
}

run_ert_with_opm () {
Expand Down
33 changes: 0 additions & 33 deletions dev-requirements.txt

This file was deleted.

142 changes: 141 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[build-system]

requires = [
"setuptools<64",
"setuptools_scm[toml]>=6.2",
Expand All @@ -12,7 +11,148 @@ requires = [
"pybind11>=2.10.0", # If this comes out of sync with the version installed by Conan please update the version in CMakeLists
"grpcio-tools",
]
build-backend = "setuptools.build_meta"

[project]
berland marked this conversation as resolved.
Show resolved Hide resolved
name = "ert"
authors = [
{name = "Equinor ASA", email = "fg_sib-scout@equinor.com"},
]
description = "Ensemble based Reservoir Tool (ERT)"
requires-python = ">=3.8"
readme = "README.md"
license = {text = "GPL-3.0"}
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Other Environment",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
]
dynamic = ["version"]
dependencies=[
"aiofiles",
"aiohttp",
"alembic",
"ansicolors==1.1.8",
"async-generator",
"beartype > 0.11",
"cloudevents>=1.6.0",
"cloudpickle",
"tqdm>=4.62.0",
"cryptography",
"cwrap",
"dask_jobqueue",
"deprecation",
"dnspython >= 2",
"ecl >= 2.14.1",
"ert-storage >= 0.3.16",
"fastapi < 0.100.0",
"filelock",
"graphlib_backport; python_version < '3.9'",
"iterative_ensemble_smoother>=0.1.1",
"typing_extensions",
"jinja2",
"lark",
"matplotlib",
"numpy<2",
"packaging",
"pandas",
"pluggy>=1.3.0",
"protobuf",
"psutil",
"pydantic >= 1.10.8, < 2",
"PyQt5",
"pyrsistent",
"python-dateutil",
"pyyaml",
"qtpy",
"requests",
"scipy >= 1.10.1",
"sqlalchemy",
"uvicorn >= 0.17.0",
"websockets",
"httpx",
"tables",
"xarray",
"xtgeo >= 3.3.0",
"netCDF4",
"sortedcontainers"
]

[project.scripts]
ert = "ert.__main__:main"
"job_dispatch.py" = "_ert_job_runner.job_dispatch:main"

[project.urls]
Repository = "https://github.com/equinor/ert"

[project.optional-dependencies]
dev = [
"click",
"decorator",
"ecl_data_io",
"furo",
"flaky",
"grpcio-tools",
"hypothesis<=6.83.0; python_version=='3.8'", # ipython pinned to 8.12.2 for python 3.8 support
"hypothesis; python_version>='3.9'",
"jsonpath_ng",
"jupytext",
"oil_reservoir_synthesizer",
"pytest-asyncio",
"pytest-benchmark",
"pytest-cov",
"pytest-memray",
"pytest-mock",
"pytest-mpl",
"pytest-qt",
"pytest-raises",
"pytest-snapshot",
"pytest-timeout",
"pytest-xdist",
"pytest>6",
"requests",
"scikit-build",
"setuptools_scm",
"sortedcontainers",
"sphinx<7.2",
"sphinx-argparse",
"sphinx-autoapi",
"sphinx-copybutton",
"sphinxcontrib-plantuml",
"sphinxcontrib.datatemplates",
"testpath",
]
style = [
"cmake-format",
"black",
"ruff",
"pylint",
"pylint-protobuf"
]
types = [
"mypy",
"mypy-protobuf<3.4",
"types-aiofiles",
"types-requests",
"types-PyYAML",
"types-python-dateutil",
"types-decorator",
"types-docutils",
"types-protobuf",
"types-tqdm",
]

[tool.setuptools]
platforms = ["all"]

[tool.pytest.ini_options]
addopts = "-ra --strict-markers"
Expand Down
Loading
Loading