From b6bf089a90e11e224fdbdfb1c127d80976d4b47f Mon Sep 17 00:00:00 2001 From: jejodesty Date: Mon, 15 Jun 2020 14:32:46 -0400 Subject: [PATCH 1/7] ssh --- CONTRIBUTING.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index adea4eeb..33475dd9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,13 +10,16 @@ Use your best judgment, and feel free to propose changes to this document in a p Pull Request (PR) presented as "->". General Template: -user/branch -> BlockScience/staging + +`user/branch -> BlockScience/staging` Contributing a new feature: -user/feature -> BlockScience/staging + +`user/feature -> BlockScience/staging` Contributing to an existing feature: -user/feature -> BlockScience/feature + +`user/feature -> BlockScience/feature` ### General Advise for Forked Repositories: 1. `git pull fork master` From 8f99b0c24a6892fea33c350f3bc06a9317955a42 Mon Sep 17 00:00:00 2001 From: Jonny Dubowsky Date: Wed, 20 May 2020 10:39:55 -0700 Subject: [PATCH 2/7] correct spelling in documentation --- documentation/Policy_Aggregation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/Policy_Aggregation.md b/documentation/Policy_Aggregation.md index f9b24bf4..7a6a65a9 100644 --- a/documentation/Policy_Aggregation.md +++ b/documentation/Policy_Aggregation.md @@ -1,7 +1,7 @@ Policy Aggregation == -For each Partial State Update, multiple policy dictionaries are aggregated into a single dictionary to be imputted into +For each Partial State Update, multiple policy dictionaries are aggregated into a single dictionary to be inputted into all state functions using an initial reduction function and optional subsequent map functions. #### Aggregate Function Composition: From ebce7a3f25714a8a709c60dcc2dba24ee03ecf2c Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 26 May 2020 21:47:10 -0400 Subject: [PATCH 3/7] contribution guide draft --- CONTRIBUTING.md | 20 ++++++++++++++++---- README.md | 4 +++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 479711a4..31acb0f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: -The following is a set of guidelines for contributing to cadCAD. These are mostly guidelines, not rules. +The following is a set of guidelines for contributing to cadCAD. Use your best judgment, and feel free to propose changes to this document in a pull request. ### Pull Requests: @@ -10,12 +10,24 @@ Use your best judgment, and feel free to propose changes to this document in a p Pull Request (PR) presented as "->". General Template: -fork/branch -> BlockScience/staging +user/branch -> BlockScience/staging Contributing a new feature: -fork/feature -> BlockScience/staging +user/feature -> BlockScience/staging Contributing to an existing feature: -fork/feature -> BlockScience/feature +user/feature -> BlockScience/feature + +### General Advise for Forked Repositories: +1. `git pull fork master` +2. `git checkout -b feature` (new feature) +3. Apply your awesomeness (Commit Often) +4. `git push fork feature` +5. Apply a merge strategy you're comfortable with. I suggest a merge path to `master` is similar to whats stated above. +6. Submit PR into `BlockScience:staging` from `user:master` (the `master` branch from `fork` remote `user/cadCAD`) +7. PR is queued for review +8. PR Reviewed (Update necessary if rejected) +9. PR Approved (There may be circumstances delaying the merge.) +10. Your contribution merged into next feature release on `BlockScience:master` Thanks! :heart: diff --git a/README.md b/README.md index 12357da8..391636e2 100644 --- a/README.md +++ b/README.md @@ -46,5 +46,7 @@ Familiarize yourself with some system modelling concepts and cadCAD terminology. * [Policy Aggregation](documentation/Policy_Aggregation.md) * [System Model Parameter Sweep](documentation/System_Model_Parameter_Sweep.md) -## 4. Connect +## 4. [Contribution Guidelines](CONTRIBUTING.md) + +## 5. Connect Find other cadCAD users at our [Discourse](https://community.cadcad.org/). We are a small but rapidly growing community. From d9ffa25abb9f097ac41d96172ea0c20b8316a9f6 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 26 May 2020 21:48:56 -0400 Subject: [PATCH 4/7] contribution guide draft --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 391636e2..f807410b 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Familiarize yourself with some system modelling concepts and cadCAD terminology. * [Policy Aggregation](documentation/Policy_Aggregation.md) * [System Model Parameter Sweep](documentation/System_Model_Parameter_Sweep.md) -## 4. [Contribution Guidelines](CONTRIBUTING.md) +## 4. [Contribution](CONTRIBUTING.md) ## 5. Connect Find other cadCAD users at our [Discourse](https://community.cadcad.org/). We are a small but rapidly growing community. From 893e87fd7d0f53bee072d34c2ac8d77dd2b43fd6 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 26 May 2020 21:51:28 -0400 Subject: [PATCH 5/7] contribution guide draft --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 31acb0f9..b6dd7902 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,8 +23,8 @@ user/feature -> BlockScience/feature 2. `git checkout -b feature` (new feature) 3. Apply your awesomeness (Commit Often) 4. `git push fork feature` -5. Apply a merge strategy you're comfortable with. I suggest a merge path to `master` is similar to whats stated above. -6. Submit PR into `BlockScience:staging` from `user:master` (the `master` branch from `fork` remote `user/cadCAD`) +5. Apply a merge strategy you're comfortable with. I suggest a merge path to `master` similar to what's stated above. +6. Submit PR from `user:master` into `BlockScience:staging` 7. PR is queued for review 8. PR Reviewed (Update necessary if rejected) 9. PR Approved (There may be circumstances delaying the merge.) From 0cd0cfb2b3df41d75a56fb1ae4e0f3af58154230 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 26 May 2020 21:52:26 -0400 Subject: [PATCH 6/7] contribution guide draft --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6dd7902..adea4eeb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,9 +21,9 @@ user/feature -> BlockScience/feature ### General Advise for Forked Repositories: 1. `git pull fork master` 2. `git checkout -b feature` (new feature) -3. Apply your awesomeness (Commit Often) +3. Apply your awesomeness! (Commit Often) 4. `git push fork feature` -5. Apply a merge strategy you're comfortable with. I suggest a merge path to `master` similar to what's stated above. +5. Apply a merge strategy you're comfortable with. I suggest a merge path to `master` similar to what's above. 6. Submit PR from `user:master` into `BlockScience:staging` 7. PR is queued for review 8. PR Reviewed (Update necessary if rejected) From 8fab1cd9359258686772972c798aa1bc64b54b3d Mon Sep 17 00:00:00 2001 From: jejodesty Date: Mon, 15 Jun 2020 15:08:39 -0400 Subject: [PATCH 7/7] ssh --- .gitignore | 4 +++- README.md | 7 +++++++ default.nix | 45 +++++++++++++++++++++++++++++++++++++++++++++ shell.nix | 4 ++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore index 495decf2..bf8a5d02 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,6 @@ testing/udo_test.py Simulation.md -monkeytype.sqlite3 \ No newline at end of file +monkeytype.sqlite3 + +result diff --git a/README.md b/README.md index f807410b..68c4e133 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,13 @@ python3 setup.py sdist bdist_wheel pip3 install dist/*.whl ``` +**Option C: Using [Nix](https://nixos.org/nix/)** +1. Run `curl -L https://nixos.org/nix/install | sh` or install Nix via system package manager +2. Run `nix-shell` to enter into a development environment, `nix-build` to build project from source, and `nix-env -if default.nix` to install + +The above steps will enter you into a Nix development environment, with all package requirements for development of and with cadCAD. + +This works with just about all Unix systems as well as MacOS, for pure reproducible builds that don't dirty your local environment. ## 2. Learn the basics **Tutorials:** available both as [Jupyter Notebooks](tutorials) diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..55d9fc0f --- /dev/null +++ b/default.nix @@ -0,0 +1,45 @@ +{ pkgs ? import { }, stdenv ? pkgs.stdenv, fetchPypi ? pkgs.fetchPypi +, pythonPkgs ? pkgs.python36Packages +, buildPythonPackage ? pythonPkgs.buildPythonPackage }: + +buildPythonPackage rec { + pname = "cadCAD"; + version = "0.4.15"; + + # Nix allows fetching the project source from different locations + #src = fetchPypi { + # inherit pname version; + # sha256 = "4f2a4d39e4ea601b9ab42b2db08b5918a9538c168cff1c6895ae26646f3d73b1"; + #}; + # src = builtins.fetchGit { + # url = "git@github.com:BlockScience/cadCAD.git"; + # ref = "master"; + # }; + src = ./.; + + # In future, when tests are introduced, this can be updated to 'true' + doCheck = false; + + buildInputs = with pythonPkgs; [ + wheel + pytest + parameterized + ]; + checkInputs = [ ]; + propagatedBuildInputs = with pythonPkgs; [ + pandas + pathos + fn + funcy + tabulate + ]; + + meta = with stdenv.lib; { + description = + "Design, test and validate complex systems through simulation in Python"; + homepage = "https://github.com/BlockScience/cadCAD"; + license = licenses.mit; + # maintainers = with maintainers; [ benschza ]; + platforms = platforms.unix; + }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..e0599a09 --- /dev/null +++ b/shell.nix @@ -0,0 +1,4 @@ +with import { }; + +(let cadCAD = pkgs.callPackage ./default.nix { inherit (pkgs) ; }; +in pkgs.python36.withPackages (ps: [ cadCAD ps.pandas ])).env