Skip to content

🎲 ⛓️ πŸ‘‰ πŸ§ͺ An exemplar project designed to showcase best practices in developing scientific software. Part of the ReCode Project at Imperial College London

License

Notifications You must be signed in to change notification settings

ImperialCollegeLondon/ReCoDE_MCMCFF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

71 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎲 ⛓️ πŸ‘‰ πŸ§ͺ Markov Chain Monte Carlo for fun and profit

Using random numbers to do all the things.

Description

This is an exemplar project designed to showcase best practices in developing scientific software as part of the ReCoDE Project at Imperial College London.

You do not need to know or care about Markov Chain Monte Carlo for this to be useful to you.

Rather this project is primarily designed to showcase the tools and practices available to you when developing scientific software projects. Maybe you are a PhD student just starting, or a researcher just about to embark on a larger scale software project - there should be something interesting here for you.

Learning Outcomes

  • Creating virtual environments using Anaconda
  • Plotting data using Matplotlib
  • Improving code performance with numba and Just-in-time compilation
  • Packaging Python projects into modules
  • Writing a simple Monte Carlo simulation using numba and numpy
  • Using Test Driven Development (TDD) to test your code
  • Creating unittests with pytest
  • Calculating the coverage of your codebase
  • Visualising coarse and detailed views of the coverage in your codebase
  • Creating property-based tests with hypothesis
  • Creating regression tests
  • Using autoformatters like black and other development tools
  • Improving performance using generators and yield
  • Making a reproducible Python environment using Anaconda
  • Documenting your code using sphinx
  • Writing docstrings using a standardised format

Requirements

Academic

Entry level researcher with basic knowledge of Python.

Complementary Resources to the exemplar:

System

Program Version
Python >= 3.7
Anaconda >= 4.1

Getting Started

Take a look at the table of contents below and see if there are any topics that might be useful to you. The actual code lives in src and the documentation in docs/learning in the form of Jupyter notebooks.

When you're ready to dive in you have 4 options:

1. Launch the notebooks in Binder

Binder

NOTE: Performance might be a bit slow.

2. Clone the repo and run the Jupyter notebooks locally

git clone https://github.com/ImperialCollegeLondon/ReCoDE_MCMCFF mcmc
cd mcmc
pip install .[dev]
jupyter lab

NOTE: Better performance but requires you have Python and Jupyter installed.

3. View the Jupyter notebooks non-interactively via the online documentation

You can read all the Jupyter notebooks online and non-interactively in the official Documentation.

4. View the Jupyter notebooks non-interactively on GitHub

Click here to view the individual Jupyter notebooks.

Project Structure

.
β”œβ”€β”€ CITATION.cff # This file describes how to cite the work contained in this repository.
β”œβ”€β”€ LICENSE # Outlines what legal rights you have to use this software.
β”œβ”€β”€ README.md # You are here!
β”œβ”€β”€ docs
β”‚   β”œβ”€β”€ ... #Files to do with making the documentation
β”‚   └── learning
β”‚       └── #The Jupyter notebooks that form the main body of this project
β”‚
β”œβ”€β”€ pyproject.toml # Machine readable information about the MCFF package
β”œβ”€β”€ readthedocs.yaml # Tells readthedocs.com how to build the documentation
β”œβ”€β”€ requirements.txt # What packages MCFF requires
β”œβ”€β”€ setup.cfg # Machine readable information about the MCFF package
β”œβ”€β”€ src
β”‚   └── MCFF # The actual code!
β”‚
└── tests # automated tests for the code

About

🎲 ⛓️ πŸ‘‰ πŸ§ͺ An exemplar project designed to showcase best practices in developing scientific software. Part of the ReCode Project at Imperial College London

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages