diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4d0de76a..52030312 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -2,10 +2,16 @@ version: 2 sphinx: - configuration: generated-docs/out/conf.py + configuration: generated-docs/out/conf.py -# Optionally set the version of Python and requirements required to build your docs python: - version: 3.7 - install: - - requirements: generated-docs/out/requirements.pip \ No newline at end of file + install: + - requirements: generated-docs/out/requirements.txt + +build: + os: ubuntu-22.04 + tools: + python: "3.7" + nodejs: "18" # not sure if needed but better to fix its version + rust: "1.64" # not sure if needed but better to fix its version + golang: "1.19" # not sure if needed but better to fix its version diff --git a/README.md b/README.md index f14aaccb..910e52d1 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ [![Gitter](https://badges.gitter.im/softwaremill/diffx.svg)](https://gitter.im/softwaremill/diffx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/softwaremill/diffx&style=flat)](https://mergify.io) [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-brightgreen.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org) +[![Documentation Status](https://readthedocs.org/projects/diffx-scala/badge/?version=latest)](https://diffx-scala.readthedocs.io/en/latest/?badge=latest) ## Documentation diff --git a/docs-sources/conf.py b/docs-sources/conf.py index 53a552c9..540d5539 100644 --- a/docs-sources/conf.py +++ b/docs-sources/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# sttp documentation build configuration file, created by +# diffx documentation build configuration file, created by # sphinx-quickstart on Thu Oct 12 15:51:09 2017. # # This file is execfile()d with the current directory set to its @@ -42,7 +42,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = ['myst_parser', 'sphinx_rtd_theme'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -54,8 +54,10 @@ from recommonmark.parser import CommonMarkParser from recommonmark.transform import AutoStructify -source_parsers = { - '.md': CommonMarkParser, +source_suffix = { + '.rst': 'restructuredtext', + '.txt': 'markdown', + '.md': 'markdown', } source_suffix = ['.rst', '.md'] diff --git a/docs-sources/flake.lock b/docs-sources/flake.lock new file mode 100644 index 00000000..ec82605a --- /dev/null +++ b/docs-sources/flake.lock @@ -0,0 +1,128 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "mach-nix": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs", + "pypi-deps-db": "pypi-deps-db" + }, + "locked": { + "lastModified": 1694857725, + "narHash": "sha256-Ob4gMVo5uiSRhdDAD6k85jy5ys7dbc/KC4DPdSZm9Rc=", + "owner": "davhau", + "repo": "mach-nix", + "rev": "0fb2c80ad2a74261315939849e1e8bf4278b7178", + "type": "github" + }, + "original": { + "owner": "davhau", + "repo": "mach-nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1643805626, + "narHash": "sha256-AXLDVMG+UaAGsGSpOtQHPIKB+IZ0KSd9WS77aanGzgc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "554d2d8aa25b6e583575459c297ec23750adb6cb", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1695360818, + "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pypi-deps-db": { + "flake": false, + "locked": { + "lastModified": 1685526402, + "narHash": "sha256-V0SXx0dWlUBL3E/wHWTszrkK2dOnuYYnBc7n6e0+NQU=", + "owner": "DavHau", + "repo": "pypi-deps-db", + "rev": "ba35683c35218acb5258b69a9916994979dc73a9", + "type": "github" + }, + "original": { + "owner": "DavHau", + "repo": "pypi-deps-db", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "mach-nix": "mach-nix", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/docs-sources/flake.nix b/docs-sources/flake.nix new file mode 100644 index 00000000..071feb85 --- /dev/null +++ b/docs-sources/flake.nix @@ -0,0 +1,54 @@ +{ + description = "Python shell flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + + mach-nix.url = "github:davhau/mach-nix"; + }; + + outputs = { self, nixpkgs, mach-nix, flake-utils, ... }: + let + pythonVersion = "python37"; + in + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + mach = mach-nix.lib.${system}; + + pythonEnv = mach.mkPython { + python = pythonVersion; + requirements = builtins.readFile ./requirements.txt; + }; + watchDocs = + let + name = "watchDocs"; + src = pkgs.writeShellScript name '' + sphinx-autobuild . _build/html + ''; + in + pkgs.stdenv.mkDerivation + { + inherit name src; + + phases = [ "installPhase" "patchPhase" ]; + + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/${name} + chmod +x $out/bin/${name} + ''; + }; + in + { + devShells.default = pkgs.mkShellNoCC { + packages = [ pythonEnv watchDocs ]; + + shellHook = '' + export PYTHONPATH="${pythonEnv}/bin/python" + ''; + }; + } + ); +} diff --git a/docs-sources/requirements.pip b/docs-sources/requirements.pip deleted file mode 100644 index cb4b2b97..00000000 --- a/docs-sources/requirements.pip +++ /dev/null @@ -1,4 +0,0 @@ -sphinx_rtd_theme==0.4.3 -recommonmark==0.5.0 -sphinx==2.0.1 -sphinx-autobuild==0.7.1 diff --git a/docs-sources/requirements.txt b/docs-sources/requirements.txt new file mode 100644 index 00000000..23be225b --- /dev/null +++ b/docs-sources/requirements.txt @@ -0,0 +1,5 @@ +sphinx_rtd_theme==1.0.0 +recommonmark==0.7.1 +sphinx==4.2.0 +sphinx-autobuild==2021.3.14 +myst-parser==0.15.2 diff --git a/docs-sources/watch.sh b/docs-sources/watch.sh deleted file mode 100755 index 24c43727..00000000 --- a/docs-sources/watch.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sphinx-autobuild . _build/html diff --git a/generated-docs/out/conf.py b/generated-docs/out/conf.py index 53a552c9..540d5539 100644 --- a/generated-docs/out/conf.py +++ b/generated-docs/out/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# sttp documentation build configuration file, created by +# diffx documentation build configuration file, created by # sphinx-quickstart on Thu Oct 12 15:51:09 2017. # # This file is execfile()d with the current directory set to its @@ -42,7 +42,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = ['myst_parser', 'sphinx_rtd_theme'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -54,8 +54,10 @@ from recommonmark.parser import CommonMarkParser from recommonmark.transform import AutoStructify -source_parsers = { - '.md': CommonMarkParser, +source_suffix = { + '.rst': 'restructuredtext', + '.txt': 'markdown', + '.md': 'markdown', } source_suffix = ['.rst', '.md'] diff --git a/generated-docs/out/flake.lock b/generated-docs/out/flake.lock new file mode 100644 index 00000000..ec82605a --- /dev/null +++ b/generated-docs/out/flake.lock @@ -0,0 +1,128 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "mach-nix": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs", + "pypi-deps-db": "pypi-deps-db" + }, + "locked": { + "lastModified": 1694857725, + "narHash": "sha256-Ob4gMVo5uiSRhdDAD6k85jy5ys7dbc/KC4DPdSZm9Rc=", + "owner": "davhau", + "repo": "mach-nix", + "rev": "0fb2c80ad2a74261315939849e1e8bf4278b7178", + "type": "github" + }, + "original": { + "owner": "davhau", + "repo": "mach-nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1643805626, + "narHash": "sha256-AXLDVMG+UaAGsGSpOtQHPIKB+IZ0KSd9WS77aanGzgc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "554d2d8aa25b6e583575459c297ec23750adb6cb", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1695360818, + "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pypi-deps-db": { + "flake": false, + "locked": { + "lastModified": 1685526402, + "narHash": "sha256-V0SXx0dWlUBL3E/wHWTszrkK2dOnuYYnBc7n6e0+NQU=", + "owner": "DavHau", + "repo": "pypi-deps-db", + "rev": "ba35683c35218acb5258b69a9916994979dc73a9", + "type": "github" + }, + "original": { + "owner": "DavHau", + "repo": "pypi-deps-db", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "mach-nix": "mach-nix", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/generated-docs/out/flake.nix b/generated-docs/out/flake.nix new file mode 100644 index 00000000..071feb85 --- /dev/null +++ b/generated-docs/out/flake.nix @@ -0,0 +1,54 @@ +{ + description = "Python shell flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + + mach-nix.url = "github:davhau/mach-nix"; + }; + + outputs = { self, nixpkgs, mach-nix, flake-utils, ... }: + let + pythonVersion = "python37"; + in + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + mach = mach-nix.lib.${system}; + + pythonEnv = mach.mkPython { + python = pythonVersion; + requirements = builtins.readFile ./requirements.txt; + }; + watchDocs = + let + name = "watchDocs"; + src = pkgs.writeShellScript name '' + sphinx-autobuild . _build/html + ''; + in + pkgs.stdenv.mkDerivation + { + inherit name src; + + phases = [ "installPhase" "patchPhase" ]; + + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/${name} + chmod +x $out/bin/${name} + ''; + }; + in + { + devShells.default = pkgs.mkShellNoCC { + packages = [ pythonEnv watchDocs ]; + + shellHook = '' + export PYTHONPATH="${pythonEnv}/bin/python" + ''; + }; + } + ); +} diff --git a/generated-docs/out/integrations/cats.md b/generated-docs/out/integrations/cats.md index d467696b..b705ef7d 100644 --- a/generated-docs/out/integrations/cats.md +++ b/generated-docs/out/integrations/cats.md @@ -5,7 +5,7 @@ This module contains integration layer between [org.typelevel.cats](https://gith ## sbt ```scala -"com.softwaremill.diffx" %% "diffx-cats" % "0.9.0" % Test +"com.softwaremill.diffx" %% "diffx-cats" % "0.9.0" % Test ``` ## mill @@ -50,4 +50,4 @@ compare(t1, t2) // ) // ) // ) -``` \ No newline at end of file +``` diff --git a/generated-docs/out/integrations/refined.md b/generated-docs/out/integrations/refined.md index 959c3dcf..e8eeb3ee 100644 --- a/generated-docs/out/integrations/refined.md +++ b/generated-docs/out/integrations/refined.md @@ -5,7 +5,7 @@ This module contains integration layer between [eu.timepit.refined](https://gith ## sbt ```scala -"com.softwaremill.diffx" %% "diffx-refined" % "0.9.0" % Test +"com.softwaremill.diffx" %% "diffx-refined" % "0.9.0" % Test ``` ## mill @@ -50,4 +50,4 @@ compare(t1, t2) // ) // ) // ) -``` \ No newline at end of file +``` diff --git a/generated-docs/out/integrations/tagging.md b/generated-docs/out/integrations/tagging.md index b692887d..7f22c8b3 100644 --- a/generated-docs/out/integrations/tagging.md +++ b/generated-docs/out/integrations/tagging.md @@ -43,4 +43,4 @@ compare(t1, t2) // "p2" -> DiffResultValue(left = 1, right = 3) // ) // ) -``` \ No newline at end of file +``` diff --git a/generated-docs/out/requirements.pip b/generated-docs/out/requirements.pip deleted file mode 100644 index cb4b2b97..00000000 --- a/generated-docs/out/requirements.pip +++ /dev/null @@ -1,4 +0,0 @@ -sphinx_rtd_theme==0.4.3 -recommonmark==0.5.0 -sphinx==2.0.1 -sphinx-autobuild==0.7.1 diff --git a/generated-docs/out/requirements.txt b/generated-docs/out/requirements.txt new file mode 100644 index 00000000..23be225b --- /dev/null +++ b/generated-docs/out/requirements.txt @@ -0,0 +1,5 @@ +sphinx_rtd_theme==1.0.0 +recommonmark==0.7.1 +sphinx==4.2.0 +sphinx-autobuild==2021.3.14 +myst-parser==0.15.2 diff --git a/generated-docs/out/usage/ignoring.md b/generated-docs/out/usage/ignoring.md index 02d84a26..5b691a83 100644 --- a/generated-docs/out/usage/ignoring.md +++ b/generated-docs/out/usage/ignoring.md @@ -44,7 +44,7 @@ implicit val conf: DiffConfiguration = DiffConfiguration(makeIgnored = ) // conf: DiffConfiguration = DiffConfiguration(makeIgnored = ) val d = Diff[Person].ignore(_.age) -// d: Diff[Person] = com.softwaremill.diffx.Diff$$anon$1@15be0d90 +// d: Diff[Person] = com.softwaremill.diffx.Diff$$anon$1@32c068ef d(Person("bob", 25), Person("bob", 30)) // res2: DiffResult = DiffResultObject( // name = "Person", diff --git a/generated-docs/out/usage/output.md b/generated-docs/out/usage/output.md index 8ec18179..824d0ac6 100644 --- a/generated-docs/out/usage/output.md +++ b/generated-docs/out/usage/output.md @@ -47,13 +47,13 @@ By default, it is set to an identical function. ```scala implicit val showConfig = ShowConfig.default.copy(transformer = DiffResultTransformer.skipIdentical) // showConfig: ShowConfig = ShowConfig( -// left = com.softwaremill.diffx.ShowConfig$$$Lambda$11343/0x000000080299f5d0@12b00fa1, -// right = com.softwaremill.diffx.ShowConfig$$$Lambda$11343/0x000000080299f5d0@2dd6b795, -// missing = com.softwaremill.diffx.ShowConfig$$$Lambda$11343/0x000000080299f5d0@6e405457, -// additional = com.softwaremill.diffx.ShowConfig$$$Lambda$11343/0x000000080299f5d0@25710eff, -// default = com.softwaremill.diffx.ShowConfig$$$Lambda$11346/0x00000008029a4000@372ec0f7, -// arrow = com.softwaremill.diffx.ShowConfig$$$Lambda$11343/0x000000080299f5d0@2fdca398, -// transformer = com.softwaremill.diffx.DiffResultTransformer$$$Lambda$11335/0x000000080299d5a8@43d2a8d8 +// left = com.softwaremill.diffx.ShowConfig$$$Lambda$11385/0x0000000801da75d0@482f0f0e, +// right = com.softwaremill.diffx.ShowConfig$$$Lambda$11385/0x0000000801da75d0@2f117bce, +// missing = com.softwaremill.diffx.ShowConfig$$$Lambda$11385/0x0000000801da75d0@427879ce, +// additional = com.softwaremill.diffx.ShowConfig$$$Lambda$11385/0x0000000801da75d0@25da3ed0, +// default = com.softwaremill.diffx.ShowConfig$$$Lambda$11388/0x0000000801dac000@153d021a, +// arrow = com.softwaremill.diffx.ShowConfig$$$Lambda$11385/0x0000000801da75d0@3156c478, +// transformer = com.softwaremill.diffx.DiffResultTransformer$$$Lambda$11377/0x0000000801da55a8@30616d95 // ) case class Person(name:String, age:Int) diff --git a/generated-docs/out/watch.sh b/generated-docs/out/watch.sh deleted file mode 100755 index 24c43727..00000000 --- a/generated-docs/out/watch.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sphinx-autobuild . _build/html