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

BLD: migrate to src layout #147

Merged
merged 1 commit into from
Oct 27, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
run: |
uvx --python ${{ matrix.python-version }} \
--with-requirements=requirements/typecheck.txt --with . \
mypy cmasher
mypy src/cmasher

docs:
name: Build docs
Expand Down
8 changes: 2 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import re
import sys
from codecs import open
from importlib.metadata import version as md_version

sys.path.insert(0, os.path.abspath("../.."))

Expand All @@ -28,11 +28,7 @@
# The short X.Y version
version = "latest"
# The full version, including alpha/beta/rc tags
with open("../../cmasher/__version__.py", "r") as f:
vf = f.read()

# Obtain version from read-in __version__.py file
version = re.search(r"^_*version_* = ['\"]([^'\"]*)['\"]", vf, re.M).group(1)
version = md_version("cmasher")


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/copper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

copper
------
.. image:: ../../../../cmasher/colormaps/copper/copper.png
.. image:: ../../../../src/cmasher/colormaps/copper/copper.png
:alt: Visual representation of the *copper* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/copper/copper_viscm.png
.. image:: ../../../../src/cmasher/colormaps/copper/copper_viscm.png
:alt: Statistics of the *copper* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/emergency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

emergency
---------
.. image:: ../../../../cmasher/colormaps/emergency/emergency.png
.. image:: ../../../../src/cmasher/colormaps/emergency/emergency.png
:alt: Visual representation of the *emergency* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/emergency/emergency_viscm.png
.. image:: ../../../../src/cmasher/colormaps/emergency/emergency_viscm.png
:alt: Statistics of the *emergency* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/fusion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

fusion
------
.. image:: ../../../../cmasher/colormaps/fusion/fusion.png
.. image:: ../../../../src/cmasher/colormaps/fusion/fusion.png
:alt: Visual representation of the *fusion* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/fusion/fusion_viscm.png
.. image:: ../../../../src/cmasher/colormaps/fusion/fusion_viscm.png
:alt: Statistics of the *fusion* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/guppy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

guppy
-----
.. image:: ../../../../cmasher/colormaps/guppy/guppy.png
.. image:: ../../../../src/cmasher/colormaps/guppy/guppy.png
:alt: Visual representation of the *guppy* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/guppy/guppy_viscm.png
.. image:: ../../../../src/cmasher/colormaps/guppy/guppy_viscm.png
:alt: Statistics of the *guppy* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/holly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

holly
-----
.. image:: ../../../../cmasher/colormaps/holly/holly.png
.. image:: ../../../../src/cmasher/colormaps/holly/holly.png
:alt: Visual representation of the *holly* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/holly/holly_viscm.png
.. image:: ../../../../src/cmasher/colormaps/holly/holly_viscm.png
:alt: Statistics of the *holly* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/iceburn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

iceburn
-------
.. image:: ../../../../cmasher/colormaps/iceburn/iceburn.png
.. image:: ../../../../src/cmasher/colormaps/iceburn/iceburn.png
:alt: Visual representation of the *iceburn* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/iceburn/iceburn_viscm.png
.. image:: ../../../../src/cmasher/colormaps/iceburn/iceburn_viscm.png
:alt: Statistics of the *iceburn* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/infinity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

infinity
--------
.. image:: ../../../../cmasher/colormaps/infinity/infinity.png
.. image:: ../../../../src/cmasher/colormaps/infinity/infinity.png
:alt: Visual representation of the *infinity* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/infinity/infinity_viscm.png
.. image:: ../../../../src/cmasher/colormaps/infinity/infinity_viscm.png
:alt: Statistics of the *infinity* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/pride.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

pride
-----
.. image:: ../../../../cmasher/colormaps/pride/pride.png
.. image:: ../../../../src/cmasher/colormaps/pride/pride.png
:alt: Visual representation of the *pride* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/pride/pride_viscm.png
.. image:: ../../../../src/cmasher/colormaps/pride/pride_viscm.png
:alt: Statistics of the *pride* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/prinsenvlag.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

prinsenvlag
-----------
.. image:: ../../../../cmasher/colormaps/prinsenvlag/prinsenvlag.png
.. image:: ../../../../src/cmasher/colormaps/prinsenvlag/prinsenvlag.png
:alt: Visual representation of the *prinsenvlag* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/prinsenvlag/prinsenvlag_viscm.png
.. image:: ../../../../src/cmasher/colormaps/prinsenvlag/prinsenvlag_viscm.png
:alt: Statistics of the *prinsenvlag* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/redshift.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

redshift
--------
.. image:: ../../../../cmasher/colormaps/redshift/redshift.png
.. image:: ../../../../src/cmasher/colormaps/redshift/redshift.png
:alt: Visual representation of the *redshift* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/redshift/redshift_viscm.png
.. image:: ../../../../src/cmasher/colormaps/redshift/redshift_viscm.png
:alt: Statistics of the *redshift* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/seasons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

seasons
-------
.. image:: ../../../../cmasher/colormaps/seasons/seasons.png
.. image:: ../../../../src/cmasher/colormaps/seasons/seasons.png
:alt: Visual representation of the *seasons* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/seasons/seasons_viscm.png
.. image:: ../../../../src/cmasher/colormaps/seasons/seasons_viscm.png
:alt: Statistics of the *seasons* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/seaweed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

seaweed
-------
.. image:: ../../../../cmasher/colormaps/seaweed/seaweed.png
.. image:: ../../../../src/cmasher/colormaps/seaweed/seaweed.png
:alt: Visual representation of the *seaweed* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/seaweed/seaweed_viscm.png
.. image:: ../../../../src/cmasher/colormaps/seaweed/seaweed_viscm.png
:alt: Statistics of the *seaweed* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/viola.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

viola
-----
.. image:: ../../../../cmasher/colormaps/viola/viola.png
.. image:: ../../../../src/cmasher/colormaps/viola/viola.png
:alt: Visual representation of the *viola* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/viola/viola_viscm.png
.. image:: ../../../../src/cmasher/colormaps/viola/viola_viscm.png
:alt: Statistics of the *viola* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/waterlily.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

waterlily
---------
.. image:: ../../../../cmasher/colormaps/waterlily/waterlily.png
.. image:: ../../../../src/cmasher/colormaps/waterlily/waterlily.png
:alt: Visual representation of the *waterlily* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/waterlily/waterlily_viscm.png
.. image:: ../../../../src/cmasher/colormaps/waterlily/waterlily_viscm.png
:alt: Statistics of the *waterlily* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/watermelon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

watermelon
----------
.. image:: ../../../../cmasher/colormaps/watermelon/watermelon.png
.. image:: ../../../../src/cmasher/colormaps/watermelon/watermelon.png
:alt: Visual representation of the *watermelon* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/watermelon/watermelon_viscm.png
.. image:: ../../../../src/cmasher/colormaps/watermelon/watermelon_viscm.png
:alt: Statistics of the *watermelon* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/diverging/wildfire.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

wildfire
--------
.. image:: ../../../../cmasher/colormaps/wildfire/wildfire.png
.. image:: ../../../../src/cmasher/colormaps/wildfire/wildfire.png
:alt: Visual representation of the *wildfire* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/wildfire/wildfire_viscm.png
.. image:: ../../../../src/cmasher/colormaps/wildfire/wildfire_viscm.png
:alt: Statistics of the *wildfire* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/sequential/amber.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

amber
-----
.. image:: ../../../../cmasher/colormaps/amber/amber.png
.. image:: ../../../../src/cmasher/colormaps/amber/amber.png
:alt: Visual representation of the *amber* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/amber/amber_viscm.png
.. image:: ../../../../src/cmasher/colormaps/amber/amber_viscm.png
:alt: Statistics of the *amber* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/sequential/amethyst.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

amethyst
--------
.. image:: ../../../../cmasher/colormaps/amethyst/amethyst.png
.. image:: ../../../../src/cmasher/colormaps/amethyst/amethyst.png
:alt: Visual representation of the *amethyst* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/amethyst/amethyst_viscm.png
.. image:: ../../../../src/cmasher/colormaps/amethyst/amethyst_viscm.png
:alt: Statistics of the *amethyst* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/sequential/apple.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

apple
-----
.. image:: ../../../../cmasher/colormaps/apple/apple.png
.. image:: ../../../../src/cmasher/colormaps/apple/apple.png
:alt: Visual representation of the *apple* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/apple/apple_viscm.png
.. image:: ../../../../src/cmasher/colormaps/apple/apple_viscm.png
:alt: Statistics of the *apple* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/sequential/arctic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

arctic
------
.. image:: ../../../../cmasher/colormaps/arctic/arctic.png
.. image:: ../../../../src/cmasher/colormaps/arctic/arctic.png
:alt: Visual representation of the *arctic* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/arctic/arctic_viscm.png
.. image:: ../../../../src/cmasher/colormaps/arctic/arctic_viscm.png
:alt: Statistics of the *arctic* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/sequential/bubblegum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

bubblegum
---------
.. image:: ../../../../cmasher/colormaps/bubblegum/bubblegum.png
.. image:: ../../../../src/cmasher/colormaps/bubblegum/bubblegum.png
:alt: Visual representation of the *bubblegum* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/bubblegum/bubblegum_viscm.png
.. image:: ../../../../src/cmasher/colormaps/bubblegum/bubblegum_viscm.png
:alt: Statistics of the *bubblegum* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/sequential/chroma.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

chroma
------
.. image:: ../../../../cmasher/colormaps/chroma/chroma.png
.. image:: ../../../../src/cmasher/colormaps/chroma/chroma.png
:alt: Visual representation of the *chroma* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/chroma/chroma_viscm.png
.. image:: ../../../../src/cmasher/colormaps/chroma/chroma_viscm.png
:alt: Statistics of the *chroma* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/sequential/cosmic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

cosmic
------
.. image:: ../../../../cmasher/colormaps/cosmic/cosmic.png
.. image:: ../../../../src/cmasher/colormaps/cosmic/cosmic.png
:alt: Visual representation of the *cosmic* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/cosmic/cosmic_viscm.png
.. image:: ../../../../src/cmasher/colormaps/cosmic/cosmic_viscm.png
:alt: Statistics of the *cosmic* colormap.
:width: 100%
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user/sequential/dusk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

dusk
----
.. image:: ../../../../cmasher/colormaps/dusk/dusk.png
.. image:: ../../../../src/cmasher/colormaps/dusk/dusk.png
:alt: Visual representation of the *dusk* colormap.
:width: 100%
:align: center

.. image:: ../../../../cmasher/colormaps/dusk/dusk_viscm.png
.. image:: ../../../../src/cmasher/colormaps/dusk/dusk_viscm.png
:alt: Statistics of the *dusk* colormap.
:width: 100%
:align: center
Expand Down
Loading