README.md 5.98 KB
Newer Older
Lily Romano's avatar
Lily Romano committed
1
2
# Chemics

Lily Romano's avatar
Lily Romano committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
## Steps to releasing a new version

- [ ] Run Code Inspection
- [ ] Ensure all code is pushed to master branch
- [ ] Ensure any temporary or testing code is disabled or removed
- [ ] Bump the version *(change **patch** to **minor** or **major** if neccessary)*
  - Dryrun (run from the configs folder in the CLI):  
  `bumpversion patch --config-file .bumpversion.cfg --verbose --allow-dirty --dry-run`
  - Actual (run from the configs folder in the CLI):  
  `bumpversion patch --config-file .bumpversion.cfg`
- [ ] Create windows exe file
   - Windows (run from the configs folder in the CLI):  
   `pyinstaller chemics_win.spec --workpath ../chemics/build --distpath ../chemics/dist --clean`
- [ ] Update Code documentation website
- [ ] Ensure master branch is up to date
- [ ] Push changes to remote
- [ ] Update [Gitlab tag description](https://gitlab.bucknell.edu/nrr004/Chemics/tags) with Changelog comments

21
22
23
24
25
## Steps for testing dead code

This uses the [vulture package](https://github.com/jendrikseipp/vulture).

- [ ] From the CLI while in the top level folder, execture `vulture chemics/ configs/vulture_whitelist.py`
26
    
Lily Romano's avatar
Lily Romano committed
27
## Programming Environment
28
29
30

- [ ] Create Programming Environment
- [ ] Create fast_dp file specific to your os.  Run from the chemics package folder `python fast_dp_setup.py build_ext --inplace`
31
    
Lily Romano's avatar
Lily Romano committed
32
### Using requirements.txt
33
    
Lily Romano's avatar
Lily Romano committed
34
#### Conda
35
    
Lily Romano's avatar
Lily Romano committed
36
##### Linux
37
    
Lily Romano's avatar
Lily Romano committed
38
```bash
39
conda create --name Chemics37 --file requirements-linux64.txt
Lily Romano's avatar
Lily Romano committed
40
```
41
    
Lily Romano's avatar
Lily Romano committed
42
43
44
45
<!--
##### Windows

 TODO -->
46
    
Lily Romano's avatar
Lily Romano committed
47
48
### Manually installing packages

Lily Romano's avatar
Lily Romano committed
49
50
If using Anaconda, ensure the `conda-forge` channel has been added.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Python version: **3.6.8**

#### Basic Packages required to run Chemics
- [ ] Cython:  0.29.12
- [ ] matplotlib:  3.1.1
- [ ] numpy:  1.16.4
- [ ] pandas:  0.24.2
- [ ] PySide:  1.2.4 
- [ ] scipy:  1.3.0

#### Dev Specific [May also depend on IDE Choice]:
##### Code Developement
- [ ] ipykernel:  5.1.1
- [ ] jupyter:  1.0.0
- [ ] python-language-server:  0.28.0
- [ ] vulture:  1.0
- [ ] xlwt:  1.3.0
##### Code Documentation
Lily Romano's avatar
Lily Romano committed
69
- [ ] m2r:  0.2.1
70
71
- [ ] pycallgraph:  1.0.1 ***(pip install pycallgraph)***
- [ ] sphinx:  2.1.2
72
- [ ] sphinx_rtd_theme:  0.4.3
73
##### Executable Creation
74
- [ ] bumpversion:  0.5.3
75
- [ ] pyinstaller:  3.4
Lily Romano's avatar
Lily Romano committed
76

77
78
79
80
81
82
83
84
85
## Creating an environment for LILAC on MacOS on Ubuntu using Conda
- [ ] tl;dr
    - `conda create --name Lilac36 bumpversion=0.5.3 cython=0.29.12 ipykernel=5.1.1 
      jupyter=1.0.0 m2r=0.2.1 matplotlib=3.1.1 mkl=2019.4 numpy=1.16.4 pandas=0.24.2 
      pyinstaller=3.4 PySide2=5.9.0a1 python=3.6.8 python-language-server=0.28.0 
      scipy=1.3.0 sphinx=2.1.2 sphinx_rtd_theme=0.4.3 vulture=1.0 xlwt=1.3.0 -c conda-forge`
    - `conda activate Lilac36`
    - `pip install pycallgraph`
    - From the `\chemics` folder from within the repo run `python fast_dp_setup.py build_ext --inplace`
86
    - From the `\chemics` folder from within the repo run `python main.py`
87
88
89
90
91
92
93
94
95
96
97
98
99

## Creating an environment for LILAC on Windows using Conda
- [ ] Install Miniconda
    - Downloaded install exec: `https://repo.anaconda.com/miniconda/Miniconda3-py39_4.9.2-Windows-x86_64.exe`
    - Ran install exec:
        - [Can determine the options I used if you need it]
    - Install `Build Tools for Visual Studio` (Tools for Visual Studio -> Build Tools) 
      `https://visualstudio.microsoft.com/downloads/`
      - Select Desktop development with C++
    - Restarted the "computer"
- [ ] Install git and pip - make ssh key for gitlab
    - `conda install -c anaconda git`
    - `conda install -c anaconda pip`
100
    - `ssh-keygen` and all that
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
- [ ] Using `-c` inline Channel command
    - Commands are entered using the Anaconda Prompt (miniconda3) [Not the powershell version]
    - Create the environment
    - `conda create --name Lilac36 bumpversion=0.5.3 cython=0.29.12 ipykernel=5.1.1 
      jupyter=1.0.0 m2r=0.2.1 matplotlib=3.1.1 mkl=2019.4 numpy=1.16.4 pandas=0.24.2 
      pyinstaller=3.4 PySide2=5.9.0a1 python=3.6.8 python-language-server=0.28.0 
      scipy=1.3.0 sphinx=2.1.2 sphinx_rtd_theme=0.4.3 vulture=1.0 xlwt=1.3.0 -c conda-forge`
    - Activate
        - `conda activate Lilac36`
    - Install pycallgraph
        - `pip install pycallgraph`
    - Clone
        - `git clone git@gitlab.bucknell.edu:lilac/LILAC.git`
        - `cd LILAC`
    - Build the cython file
        - From the `\chemics` folder from within the repo run python `fast_dp_setup.py build_ext --inplace`
    - Run chemics
        - From the `\chemics` folder from within the repo run `python main.py`
    
## Install redo 6/11 due to weird pyinstaller things
## Using `c` inline Channel command
- [ ] Install new environment - same as before but with new packages
- [ ] Adding all the following makes it work:
    - m2w64-gcc-libs=5.3.0
    - msys2-conda-epoch=20160418
    - numpy-base=1.16.4
    - asn1crypto=0.24.0
    - smmap2=2.0.5
    - mkl_fft=1.0.12 (6)
    - mkl_random=1.0.2 (7)
    - gitdb2=2.0.5
    - gitpython=3.0.2
    - python-gitlab=1.12.1
- [ ] `conda create --name Lilac36Test9 bumpversion=0.5.3 cython=0.29.12 ipykernel=5.1.1 
  jupyter=1.0.0 m2r=0.2.1 matplotlib=3.1.1 mkl=2019.4 numpy=1.16.4 pandas=0.24.2 
  pyinstaller=3.4 PySide2=5.9.0a1 python=3.6.8 python-language-server=0.28.0 scipy=1.3.0 
  sphinx=2.1.2 sphinx_rtd_theme=0.4.3 vulture=1.0 xlwt=1.3.0 -c conda-forge`
    
- [ ] Activate
    - `conda activate Lilac36Test9`
  
- [ ] Install pycallgraph
    - `pip install pycallgraph`
  
- [ ] Assuming already cloned and cython file has already been built
    
- [ ] Run chemics
    - `cd LILAC\chemics`    
    - From the `\chemics` folder from within the repo run `python main.py`
    
- [ ] Build EXE
    - `cd ..\configs` 
    - `pyinstaller chemics_win.spec --workpath ../chemics/build --distpath ../chemics/dist --clean`

155
156
157
158
159
160
## Problems?
### Problems building fast_dp_calculator
#### cl.exe missing [Windows]

- [ ] Install [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/) (Tools for Visual Studio -> Build Tools)
- [ ] Restart the computer.  This should add cl.exe into your `PATH`, otherwise you may need to manually add it.