Skip to content

Commit

Permalink
Merge branch 'topic/default/twine-upload-fluidsim-core' into 'branch/…
Browse files Browse the repository at this point in the history
…default'

Topic/default/twine upload fluidsim core

See merge request fluiddyn/fluidsim!366
  • Loading branch information
paugier committed Jan 29, 2024
2 parents 9ac6a78 + 7047736 commit 46b7e6c
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 8 deletions.
37 changes: 36 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ stages:
- report
- test-release
- doc
- build
- release

variables:
COVERAGE_DIR: .coverage_$CI_COMMIT_SHA
Expand Down Expand Up @@ -192,7 +194,7 @@ pages:
script:
- python -m venv .venv
- . .venv/bin/activate
- pip install fluidfft
- pip install fluidfft --no-deps
- pdm install -G doc -G fft -G test --no-self
- pip install . --config-settings=setup-args=-Dtransonic-backend=python --no-deps
- pdm run xvfb-run --auto-servernum sphinx-build -W -b html -d doc/_build/doctrees doc doc/_build/html
Expand All @@ -210,3 +212,36 @@ pages:
- public
expire_in: 5 days
when: always


build:package:
stage: build
before_script:
- pip install build
script:
- cd lib
- rm -rf dist
- python -m build
- ls dist
needs: []
artifacts:
when: always
paths:
- dist
expire_in: 24 hrs


# manually set TWINE_PASSWORD in web interface to your PyPI API token
release:package:
stage: release
rules:
- if: '$CI_MERGE_REQUEST_ID'
when: never
- if: '$CI_COMMIT_TAG'
when: on_success
variables:
TWINE_USERNAME: __token__
script:
- pip install twine -U
- twine upload dist
needs: [ "build:package" ]
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@
nb_execution_raise_on_error = True
nb_execution_show_tb = True
nb_merge_streams = True
nb_execution_timeout = 120

myst_enable_extensions = [
"amsmath",
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ENV CPATH=$HOME/.local/include:$CPATH
RUN mkdir -p $HOME/.config/matplotlib
RUN echo 'backend : agg' > $HOME/.config/matplotlib/matplotlibrc

RUN wget https://foss.heptapod.net/fluiddyn/fluidfft/raw/branch/default/site.cfg.files/site.cfg.docker -O ~/.fluidfft-site.cfg
RUN wget https://foss.heptapod.net/fluiddyn/fluidfft/raw/branch/default/site.cfg.files/site.cfg.docker_mpi -O ~/.fluidfft-site.cfg

RUN wget https://foss.heptapod.net/fluiddyn/fluidfft/raw/branch/default/doc/install/install_p3dfft.sh -O ./install_p3dfft.sh
RUN chmod +x install_p3dfft.sh
Expand Down
25 changes: 22 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,32 @@ def test_without_fft_and_pythran(session):
_test(session, env={"TRANSONIC_BACKEND": "python", "TRANSONIC_NO_REPLACE": "1"})


@nox.session
def test_with_fft_and_pythran(session):
def _install_fluidfft(session):
# first install fluidfft without Pythran compilation
session.install("fluidfft", env={"FLUIDFFT_TRANSONIC_BACKEND": "python"})
session.install(
"fluidfft", "--no-deps", env={"FLUIDFFT_TRANSONIC_BACKEND": "python"}
)


@nox.session
def test_with_fft_and_pythran(session):
_install_fluidfft(session)
command = "pdm sync --clean -G dev -G test -G fft -G mpi --no-self"
session.run_always(*command.split(), external=True)
session.install(".", "--no-deps", "-C", "setup-args=-Dnative=true")

_test(session)


@nox.session
def doc(session):
_install_fluidfft(session)
command = "pdm install -G doc -G fft -G test --no-self"
session.run_always(*command.split(), external=True)
session.install(
".", "--config-settings=setup-args=-Dtransonic-backend=python", "--no-deps"
)

session.chdir("doc")
session.run("make", "cleanall", external=True)
session.run("make", external=True)
3 changes: 0 additions & 3 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Issues pixi
# - install script without curl
# - should be able to read pyproject.toml [project] (name, version, description)
# - automatically adds too strict version, bad for Python library
# - optional dependencies and dev groups as PDM
# - import data from pyproject.toml: [project] and [project.optional-dependencies]

[project]
name = "fluidsim"
# version = "0.7.4"
# description = "Framework for studying fluid dynamics with simulations."
channels = ["conda-forge"]
platforms = ["linux-64", "win-64"]

Expand Down

0 comments on commit 46b7e6c

Please sign in to comment.