Skip to content

Commit

Permalink
Merge pull request #232 from snek5000/fix-non-editable-install
Browse files Browse the repository at this point in the history
Try to use non editable installations.
  • Loading branch information
paugier committed Dec 5, 2022
2 parents d092424 + cd32ac9 commit 34312fd
Show file tree
Hide file tree
Showing 17 changed files with 181 additions and 167 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ deprecations.

### Deprecated

- {func}`snek5000.params._complete_params_from_par_file` (renamed as
{func}`snek5000.params.complete_params_from_par_file`).
- {func}`snek5000.util.restart.prepare_for_restart`
- Passing rules as iterables to {meth}`snek5000.make.Make.exec`. Pass positional
parameters instead.
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def root(module):
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_inline_tabs",
"IPython.sphinxext.ipython_console_highlighting",
# "recommonmark",
# "myst_parser",
"myst_nb",
Expand Down
1 change: 0 additions & 1 deletion docs/dev/params.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Inspection
Input / Output
--------------

.. autofunction:: snek5000.params._complete_params_from_par_file
.. autofunction:: snek5000.params._complete_params_from_xml_file
.. autofunction:: snek5000.params._save_recorded_user_params
.. autofunction:: snek5000.params._load_recorded_user_params
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/snek5000-canonical/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ snek5000.solvers =
where=src

[options.package_data]
snek5000_canonical = templates/*.j2, *.usr.f, Snakefile, etc/*.yml
snek5000_canonical = templates/*.j2, *.usr.f, *.par.cfg, Snakefile, etc/*.yml
2 changes: 1 addition & 1 deletion docs/examples/snek5000-tgv/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ snek5000.solvers =
where=src

[options.package_data]
snek5000_tgv = templates/*.j2, *.usr.f, Snakefile, etc/*.yml
snek5000_tgv = templates/*.j2, *.usr.f, *.par.cfg, Snakefile, etc/*.yml
4 changes: 2 additions & 2 deletions docs/examples/snek5000-tgv/src/snek5000_tgv/solver.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from math import pi

from snek5000.info import InfoSolverMake
from snek5000.params import _complete_params_from_par_file
from snek5000.params import complete_params_from_par_file
from snek5000.solvers.base import SimulNek


Expand Down Expand Up @@ -49,7 +49,7 @@ def create_default_params(cls):
info_solver = cls.info_solver # cls.InfoSolver()
output_cls = info_solver.import_classes()["Output"]
root = output_cls.get_root()
_complete_params_from_par_file(
complete_params_from_par_file(
params, root / f"{info_solver.short_name}.par.cfg"
)

Expand Down
2 changes: 1 addition & 1 deletion docs/tuto_phill_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ looks like. To get started, we install everything we need:
```sh
python -m venv venv
source venv/bin/activate
pip install -e "snek5000-phill @ git+https://github.com/snek5000/snek5000-phill.git"
pip install "snek5000-phill @ git+https://github.com/snek5000/snek5000-phill.git"
```

```{note}
Expand Down
5 changes: 5 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ def pip_compile(session, extra):
session.log(f"Removing absolute paths from {out_file}")
packages = out_file.read_text()
rel_path_packages = packages.replace("file://" + str(Path.cwd().resolve()), ".")

# special cases for snek5000-canonical and snek5000-tgv
for package in ("snek5000-canonical", "snek5000-tgv"):
rel_path_packages = rel_path_packages.replace(f"{package} @ ", "")

if extra == "tests":
tests_editable = out_file.parent / out_file.name.replace(
"tests", "tests-editable"
Expand Down
84 changes: 41 additions & 43 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --extra=dev --output-file=requirements/dev.txt --resolver=backtracking requirements/vcs_packages.in setup.cfg
#
Expand All @@ -11,10 +11,6 @@
# snek5000-cbox
# snek5000-phill
# snek5000-tgv
-e ./docs/examples/snek5000-canonical
# via -r requirements/vcs_packages.in
-e ./docs/examples/snek5000-tgv
# via -r requirements/vcs_packages.in
alabaster==0.7.12
# via sphinx
anyio==3.6.2
Expand All @@ -27,7 +23,7 @@ argon2-cffi==21.3.0
# via jupyter-server
argon2-cffi-bindings==21.2.0
# via argon2-cffi
asttokens==2.1.0
asttokens==2.2.1
# via stack-data
attrs==22.1.0
# via
Expand Down Expand Up @@ -83,13 +79,13 @@ coverage[toml]==6.5.0
# via
# pytest-cov
# snek5000 (setup.cfg)
cryptography==38.0.3
cryptography==38.0.4
# via secretstorage
cycler==0.11.0
# via matplotlib
datrie==0.8.2
# via snakemake
debugpy==1.6.3
debugpy==1.6.4
# via ipykernel
decorator==5.1.1
# via ipython
Expand All @@ -99,7 +95,7 @@ distlib==0.3.6
# via virtualenv
distro==1.8.0
# via fluiddyn
docstring-to-markdown==0.10
docstring-to-markdown==0.11
# via python-lsp-server
docutils==0.17.1
# via
Expand All @@ -109,19 +105,19 @@ docutils==0.17.1
# snakemake
# snek5000 (setup.cfg)
# sphinx
dpath==2.0.6
dpath==2.1.2
# via yte
entrypoints==0.4
# via jupyter-client
exceptiongroup==1.0.1
exceptiongroup==1.0.4
# via pytest
executing==1.2.0
# via stack-data
fancycompleter==0.9.1
# via pdbpp
fastjsonschema==2.16.2
# via nbformat
filelock==3.8.0
filelock==3.8.1
# via
# snek5000
# snek5000 (setup.cfg)
Expand All @@ -141,29 +137,29 @@ fortran-language-server==1.12.0
# via snek5000 (setup.cfg)
furo==2022.9.29
# via snek5000 (setup.cfg)
gitdb==4.0.9
gitdb==4.0.10
# via gitpython
gitpython==3.1.29
# via
# nbdime
# snakemake
greenlet==2.0.1
# via sqlalchemy
h5netcdf==1.0.2
h5netcdf==1.1.0
# via fluiddyn
h5py==3.7.0
# via
# fluiddyn
# h5netcdf
identify==2.5.8
identify==2.5.9
# via pre-commit
idna==3.4
# via
# anyio
# requests
imagesize==1.4.1
# via sphinx
importlib-metadata==5.0.0
importlib-metadata==5.1.0
# via
# fluidsim-core
# jupyter-cache
Expand All @@ -180,14 +176,14 @@ iniconfig==1.1.1
# via pytest
ipykernel==6.17.1
# via myst-nb
ipython==8.6.0
ipython==8.7.0
# via
# ipykernel
# myst-nb
# snek5000 (setup.cfg)
jaraco-classes==3.2.3
# via keyring
jedi==0.18.1
jedi==0.18.2
# via
# ipython
# python-lsp-server
Expand All @@ -205,24 +201,24 @@ jinja2==3.1.2
# snek5000
# snek5000 (setup.cfg)
# sphinx
jsonschema==4.17.0
jsonschema==4.17.3
# via
# nbformat
# snakemake
jupyter-cache==0.5.0
# via myst-nb
jupyter-client==7.4.5
jupyter-client==7.4.7
# via
# ipykernel
# jupyter-server
# nbclient
jupyter-core==5.0.0
jupyter-core==5.1.0
# via
# jupyter-client
# jupyter-server
# nbconvert
# nbformat
jupyter-server==1.23.1
jupyter-server==1.23.3
# via
# jupyter-server-mathjax
# nbdime
Expand Down Expand Up @@ -271,7 +267,7 @@ nbclient==0.5.13
# jupyter-cache
# myst-nb
# nbconvert
nbconvert==7.2.4
nbconvert==7.2.5
# via jupyter-server
nbdime==3.1.1
# via snek5000 (setup.cfg)
Expand All @@ -291,9 +287,9 @@ nest-asyncio==1.5.6
# nbclient
nodeenv==1.7.0
# via pre-commit
nox==2022.8.7
nox==2022.11.21
# via snek5000 (setup.cfg)
numpy==1.23.4
numpy==1.23.5
# via
# contourpy
# fluiddyn
Expand All @@ -317,7 +313,7 @@ packaging==21.3
# setuptools-scm
# sphinx
# xarray
pandas==1.5.1
pandas==1.5.2
# via
# snek5000
# snek5000 (setup.cfg)
Expand All @@ -336,11 +332,11 @@ pickleshare==0.7.5
# via ipython
pillow==9.3.0
# via matplotlib
pkginfo==1.8.3
pkginfo==1.9.2
# via twine
plac==1.3.5
# via yte
platformdirs==2.5.3
platformdirs==2.5.4
# via
# jupyter-core
# virtualenv
Expand All @@ -352,7 +348,7 @@ pre-commit==2.20.0
# via snek5000 (setup.cfg)
prometheus-client==0.15.0
# via jupyter-server
prompt-toolkit==3.0.32
prompt-toolkit==3.0.33
# via ipython
psutil==5.9.4
# via
Expand All @@ -367,8 +363,6 @@ pulp==2.7.0
# via snakemake
pure-eval==0.2.2
# via stack-data
py==1.11.0
# via nox
pycparser==2.21
# via cffi
pygments==2.13.0
Expand Down Expand Up @@ -477,10 +471,14 @@ snakemake==7.18.2
# via
# snek5000
# snek5000 (setup.cfg)
./docs/examples/snek5000-canonical
# via -r requirements/vcs_packages.in
snek5000-cbox @ git+https://github.com/snek5000/snek5000-cbox.git
# via -r requirements/vcs_packages.in
snek5000-phill @ git+https://github.com/snek5000/snek5000-phill.git
# via -r requirements/vcs_packages.in
./docs/examples/snek5000-tgv
# via -r requirements/vcs_packages.in
sniffio==1.3.0
# via anyio
snowballstemmer==2.2.0
Expand All @@ -502,7 +500,7 @@ sphinx-autobuild==2021.3.14
# via snek5000 (setup.cfg)
sphinx-basic-ng==1.0.0b1
# via furo
sphinx-copybutton==0.5.0
sphinx-copybutton==0.5.1
# via snek5000 (setup.cfg)
sphinx-inline-tabs==2022.1.2b11
# via snek5000 (setup.cfg)
Expand All @@ -518,9 +516,9 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
sqlalchemy==1.4.43
sqlalchemy==1.4.44
# via jupyter-cache
stack-data==0.6.0
stack-data==0.6.2
# via ipython
stopit==1.1.2
# via snakemake
Expand All @@ -530,7 +528,7 @@ tabulate==0.9.0
# snakemake
terminado==0.17.0
# via jupyter-server
throttler==1.2.1
throttler==1.2.2
# via snakemake
tinycss2==1.2.1
# via nbconvert
Expand All @@ -553,7 +551,7 @@ tornado==6.2
# livereload
# nbdime
# terminado
traitlets==5.5.0
traitlets==5.6.0
# via
# ipykernel
# ipython
Expand All @@ -564,7 +562,7 @@ traitlets==5.5.0
# nbclient
# nbconvert
# nbformat
twine==4.0.1
twine==4.0.2
# via snek5000 (setup.cfg)
typing-extensions==4.4.0
# via
Expand All @@ -573,15 +571,15 @@ typing-extensions==4.4.0
# setuptools-scm
uc-micro-py==1.0.1
# via linkify-it-py
ujson==5.5.0
ujson==5.6.0
# via
# python-lsp-jsonrpc
# python-lsp-server
urllib3==1.26.12
urllib3==1.26.13
# via
# requests
# twine
virtualenv==20.16.6
virtualenv==20.17.0
# via
# nox
# pre-commit
Expand All @@ -597,11 +595,11 @@ wmctrl==0.4
# via pdbpp
wrapt==1.14.1
# via snakemake
xarray==2022.11.0
xarray==2022.12.0
# via pymech
yte==1.5.1
# via snakemake
zipp==3.10.0
zipp==3.11.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down

0 comments on commit 34312fd

Please sign in to comment.