From 14ecdf3ed46e24f3073e307d367d201e80d41b45 Mon Sep 17 00:00:00 2001 From: shimwell Date: Mon, 31 Oct 2022 21:28:44 +0000 Subject: [PATCH 1/2] moved to pyproject.yml --- .github/workflows/ci_with_install.yml | 6 +++--- Dockerfile | 4 ---- conda/meta.yaml | 2 +- pyproject.toml | 25 ++++++++++++++++++++++--- setup.cfg | 22 ---------------------- setup.py | 4 ---- 6 files changed, 26 insertions(+), 37 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.github/workflows/ci_with_install.yml b/.github/workflows/ci_with_install.yml index 3fc14f057..dd8946258 100644 --- a/.github/workflows/ci_with_install.yml +++ b/.github/workflows/ci_with_install.yml @@ -37,9 +37,9 @@ jobs: - name: Run tests run: | - pytest tests/tests_units -v --cov=paramak --cov-append --cov-report term --cov-report xml - pytest tests/tests_examples -v --cov=paramak --cov-append --cov-report term --cov-report xml - pytest tests/tests_show -v --cov=paramak --cov-append --cov-report term --cov-report xml + pytest tests/tests_units -v --cov=src/paramak --cov-append --cov-report term --cov-report xml + pytest tests/tests_examples -v --cov=src/paramak --cov-append --cov-report term --cov-report xml + pytest tests/tests_show -v --cov=src/paramak --cov-append --cov-report term --cov-report xml - name: Upload to codecov uses: codecov/codecov-action@v2 diff --git a/Dockerfile b/Dockerfile index 91748c453..763e70d3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,11 +72,7 @@ ARG paramak_version=develop COPY run_tests.sh run_tests.sh COPY src src/ COPY examples examples/ - COPY tests tests/ - -COPY setup.py setup.py -COPY setup.cfg setup.cfg COPY pyproject.toml pyproject.toml COPY README.md README.md diff --git a/conda/meta.yaml b/conda/meta.yaml index d2a6dcde5..2d0a71d8e 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -9,7 +9,7 @@ source: build: number: 0 - script: python setup.py install --single-version-externally-managed --record=record.txt + script: python -m pip install --no-deps --ignore-installed . requirements: build: diff --git a/pyproject.toml b/pyproject.toml index e6e9e9077..483ba30e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ - "setuptools >= 65.4.1", - "setuptools_scm[toml] >= 7.0.5", + "setuptools>=65.4.1", + "setuptools_scm[toml]>=7.0.5" ] build-backend = "setuptools.build_meta" @@ -20,6 +20,7 @@ authors = [ ] license = {file = "LICENSE.txt"} requires-python = ">=3.8" +keywords = ["python", "geometry", "reactor", "model", "cad", "fusion", "parametric", "dagmc", "openmc"] dependencies = [ "plotly>=5.1.0", "scipy>=1.7.0", @@ -27,10 +28,11 @@ dependencies = [ "numpy>=1.21.1", "matplotlib>=3.4.2", "plasmaboundaries>=0.1.8", - "jupyter-client < 7", + "jupyter-client<7", "jupyter-cadquery>=3.2.0", "brep_part_finder>=0.5.0", "brep_to_h5m>=0.4.0", + "setuptools_scm[toml]>=7.0.5" ] [project.urls] @@ -41,6 +43,23 @@ dependencies = [ [tool.setuptools_scm] write_to = "src/_version.py" +[project.optional-dependencies] +tests = [ + "pytest>=5.4.3", + "pytest-cov>=2.12.1", + "pytest-runner>=5.3.1", + "dagmc_h5m_file_inspector>=0.5.0" +] +docs = [ + "sphinx>=4.1.2", + "sphinx_rtd_theme", + "sphinx_autodoc_typehints", + "sphinxcadquery" +] + +[tool.setuptools.packages.find] +where = ["paramak"] + [tool.black] line-length = 120 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 4e430fe1c..000000000 --- a/setup.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[metadata] -version = attr: paramak.__version__ -author = The Paramak Development Team -author_email = mail@jshimwell.com -long_description = file: README.md -long_description_content_type = text/markdown - - -[options.extras_require] -tests = - pytest >= 5.4.3 - pytest-cov>=2.12.1 - pytest-runner>=5.3.1 - dagmc_h5m_file_inspector>=0.5.0 -docs = - sphinx >= 4.1.2 - sphinx_rtd_theme - sphinx_autodoc_typehints - sphinxcadquery - -[flake8] -per-file-ignores = __init__.py:F401 diff --git a/setup.py b/setup.py deleted file mode 100644 index 1abbd068c..000000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -import setuptools - -if __name__ == "__main__": - setuptools.setup() From eb13cde2e19bbe2729bbffe88e00dbdffbc40090 Mon Sep 17 00:00:00 2001 From: shimwell Date: Tue, 1 Nov 2022 00:06:37 +0000 Subject: [PATCH 2/2] removed find where --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 483ba30e5..f79f34f21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools>=65.4.1", + "setuptools>=65.5.0", "setuptools_scm[toml]>=7.0.5" ] build-backend = "setuptools.build_meta" @@ -57,9 +57,6 @@ docs = [ "sphinxcadquery" ] -[tool.setuptools.packages.find] -where = ["paramak"] - [tool.black] line-length = 120