Skip to content

Commit

Permalink
working on nix shell
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed Jan 30, 2024
1 parent 11f3cf3 commit b763f5c
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 11 deletions.
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
all: test format doc rep

.PHONY: test format doc rep clean

test:
@echo -e "\e[0;35m\033[1mTesting Julia package...\e[0;30m\033[0m"
@julia --depwarn=yes --project --color=yes -e 'using Pkg; Pkg.test(coverage=true)'

format:
@echo -e "\e[0;35m\033[1mFormatting Julia package...\e[0;30m\033[0m"
@julia --project --color=yes -e 'using JuliaFormatter; format(".")'

doc:
@echo -e "\e[0;35m\033[1mMaking Julia documentation...\e[0;30m\033[0m"
@cd docs && julia --project=".." --color=yes make.jl

rep:
@echo -e "\e[0;35m\033[1mRunning replication files...\e[0;30m\033[0m"
@cd replication && make

clean:
@echo -e "\e[0;35m\033[1mCleaning up Julia package...\e[0;30m\033[0m"
@rm -r docs/build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ display(est.ucb)

## Paper replication

Please refer to the
Please refer to the
[replication README](https://github.com/WGUNDERWOOD/DyadicKDE.jl/tree/main/replication/README.md).
2 changes: 1 addition & 1 deletion docs/src/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Pages = ["estimation.jl", "kernels.jl"]

```@autodocs
Modules = [DyadicKDE]
Pages = ["counterfactual.jl, parametric_counterfactual.jl"]
Pages = ["counterfactual.jl", "parametric_counterfactual.jl"]
```

## Helper functions
Expand Down
9 changes: 9 additions & 0 deletions replication/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
all:
@julia --project=".." --color=yes make_distribution_plot.jl
@julia --project=".." --color=yes make_outcome_plot.jl
@julia --project=".." --color=yes make_table.jl
@julia --project=".." --color=yes make_trade_table.jl
@julia --project=".." --color=yes make_trade_plot.jl
@julia --project=".." --color=yes make_trade_histogram.jl
@julia --project=".." --color=yes make_trade_plot_parametric.jl
@julia --project=".." --color=yes logo.jl
2 changes: 1 addition & 1 deletion replication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ of the DOTS data used for the empirical studies.

## Julia scripts

The Julia scripts can be run by executing the shell script `RUNME.sh`.
The Julia scripts can be run using the `Makefile`.

### `make_distribution_plot.jl`

Expand Down
8 changes: 0 additions & 8 deletions replication/RUNME.sh

This file was deleted.

8 changes: 8 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
let
pkgs = import <nixpkgs> { };
in pkgs.mkShell {
buildInputs = with pkgs; [
julia
python3
];
}

0 comments on commit b763f5c

Please sign in to comment.