Author: Xuefeng Luo Email: [email protected] Data: June 04, 2021
├── docs
│ ├── build: not uploaded in GitHub, auto-generated by Documenter.jl
│ │ └── ...
│ ├── src: the source code of documentation
│ │ ├── man: manual pages
│ │ │ └── ...: all manual pages
│ │ └── index.md: the index page
│ ├── make.jl: the script to gernerate from src
│ ├── Project.toml
│ ├── Manifest.toml
│ └── pdf_make.jl: the script to gernerate latex format documentation
├── examples: example scripts
│ └── ...
├── src: the source code
│ ├── JudiLing.jl: the entry-point module script
│ └── ...: all other source code scripts
├── test: the test source code
│ ├── data: data for all tests
│ ├── runtests.jl: the entry-point test script
│ └── ...: all other test source code scripts
├── thesis
│ └── (thesis).pdf
├── .gitignore
├── LICENSE
├── Manifest.toml
├── Project.toml
├── README_dev.md
└── README.md
In total, there are three environments. Production environment, development environment and under-construction environment.
Production environment is tagged with version numbers. It should be thoroughly tested, carefully maintained and bug-free (well, at least try it). Normally users can download them through add JudiLing
in pkg mode.
Development environment the master branch in GitHub. It may contain bugs but it is ready to be tested by users.
Under-construction environment is any other branches that haven't been merged into master branch. They can be used for checkpoints for the developments.
Usually, directly cloning JudiLIng from GitHub and writing codes there is not convenient because it is hard to add this into Julia environment. A more sophisticated way to do so is to
- create a working dir, for example
judiling_dev
- add JudiLing in the environment,
add JudiLing
- clone package locally
develop --local Example
- update the package, go to
dev/JudiLing
andgit pull
- write code in
dev/JudiLing
and test it through scripts injudiling_dev
Please see more details in:
https://docs.julialang.org/en/v1/stdlib/Pkg/#Pkg
To develop new functions, please make sure to write corresponding docs and tests for that functions.
To test package, run test JudiLing
in pkg mode ("]").
To make docs, run make.jl
in the docs dir and you can test/verify that docs looks good. On the production side, docs are auto-generate by GitHub action after CI. See .github/workflows/ci.yml
for more details.
- update version number in
Project.toml
( please make sure theProject.toml
file is the one located in the root dir of JudiLing not somewhere else.) - test the functions and docs
- push to GitHub and wait for CI script to complete
- if NOT pass, fix bugs and repeat steps 2 and 3
- if pass, post a new comment under issue "register" with "@JuliaRegistrator register", then wait for Julia registry to pass
- if NOT pass (rarely happened), follow the instruction in the Julia registry threads.
test_combo
function is a huge monster that contains almost 50 parameters. The workflow is:
- prepare datasets in four different modes
- create C matrices
- create S matrices
- calculate/learn F matrices
- calculate/learn G matrices
- predicting Shat
- prediction Chat
- learn_paths
- build_paths
- evaluate
- output
==============================================
- Virtual Environment is very import to modern programming projects specially for packages like JudiLing which requires packages of certain versions.
- To activate a virtual enviroment for JudiLing. Go to pkg mode
]
and then typeactivate .
in Julia repl. - see ref
- In pkg mode
]
, typedevelop --local JudiLing
. - To verify, in pkg modem type
status
. There should be a local path likeJudiLing v0.5.2 dev\JudiLing
under JudiLing version.
- a dev structure shoule like this:
├── some_other_scripts
├── dev
│ ├── JudiLing
├── Manifest.toml
├── Project.toml
- Julia have cache mechanism. Therefore sometimes you need to quit Julia repl to make new changes taking effect.
- write code, write doc, write test units
- test docs
- test test units
- upgrade version in Project.tmol
- push commits online, wait for CI
- add a comment in register issue, "@JuliaRegistrator register" to register in Julia registry.
- a new release will be generated by TagBot