Skip to content

Commit

Permalink
update to symbolica 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnbr committed Dec 31, 2024
2 parents ee75ea2 + 69e0cfc commit 28e3bac
Show file tree
Hide file tree
Showing 44 changed files with 2,491 additions and 399 deletions.
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Cargo.lock
target/
flake.lock
flake.nix
#flake.lock
#flake.nix
.envrc
.direnv/
.direnv/# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name = "symbolica"
readme = "Readme.md"
repository = "https://github.com/benruijl/symbolica"
rust-version = "1.73"
version = "0.13.0"
version = "0.14.0"

[profile.release]
codegen-units = 1
Expand Down
6 changes: 2 additions & 4 deletions examples/series.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ use symbolica::atom::{Atom, AtomCore, Symbol};

fn main() {
let x = Symbol::new("x");
let a = Atom::parse("(1-cos(x))/sin(x)+log(x+x^2+2)").unwrap();
let a = Atom::parse("(1-cos(x))/sin(x)").unwrap();

let out = a
.series(x, Atom::new_num(0).as_view(), 4.into(), true)
.unwrap();
let out = a.series(x, Atom::new_num(0), 4.into(), true).unwrap();

println!("{}", out);
}
80 changes: 80 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
description = "Description for the project";

inputs = {
devenv-root = {
url = "file+file:///dev/null";
flake = false;
};
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
devenv.url = "github:cachix/devenv";
nix2container.url = "github:nlewo/nix2container";
nix2container.inputs.nixpkgs.follows = "nixpkgs";
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
};

nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};

outputs = inputs@{ flake-parts, devenv-root, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devenv.flakeModule
];
systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];

perSystem = { config, self', inputs', pkgs, system, ... }: {
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.

# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
packages.default = pkgs.hello;

devenv.shells.default = {
devenv.root =
let
devenvRootFileContent = builtins.readFile devenv-root.outPath;
in
pkgs.lib.mkIf (devenvRootFileContent != "") devenvRootFileContent;

name = "my-project";

imports = [
# This is just like the imports in devenv.nix.
# See https://devenv.sh/guides/using-with-flake-parts/#import-a-devenv-module
# ./devenv-foo.nix
];

# https://devenv.sh/reference/options/
# packages = [ config.packages.default ];


packages = [config.packages.default
pkgs.gnum4
pkgs.gmp
pkgs.mpfr
pkgs.gnumake
pkgs.diffutils
pkgs.glibc
];

languages.rust.enable = true;
languages.cplusplus.enable = true;


processes.hello.exec = "hello";
};

};
flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.

};
};
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ keywords = ["math", "algebra", "polynomial", "expression", "manipulation"]
license = {file = "License.md"}
name = "symbolica"
readme = "Readme.md"
version = "0.13.0"
version = "0.14.0"

classifiers = [
"Development Status :: 4 - Beta",
Expand Down
Loading

0 comments on commit 28e3bac

Please sign in to comment.