If you want to make changes to MARC source, or contribute new functionalities back to the community, this is the page for you! MARC is developed via GitHub, and this page will describe how to get started. There is also a list of open topics available for contribution if you’re looking for ideas to get started.
As a developer, you’ll want to fork MARC to your personal account. This creates a copy of the whole MARC repository, including all past versions, inside your GitHub account. Generally, you’ll want to start from the develop branch, but you can check with the developers if you think it would be more appropriate to work on a feature branch.
Development is done on separate branches. Basically, there are three types of branches.
master – stable, latest release and fixes
develop – current development, generally the branch for you to start with
feature-* – feature specific branches, using names with underscores, check with the developer email list if you think this a better place to contribute
MARC merges new code contributions through pull requests. As you make changes to your copy of MARC, you’ll upload them to your GitHub fork, and then when they’re ready for review you’ll submit them for merge via pull request.
MARC is built on a slightly modified PEP8 style guide, with changes made to implement a data-oriented view of the code. To help support discovering code, the MARC folder structure explicitly mirrors the package structure. Flexibility of the package structure is important, so in general all objects live in their own file, with the same file name as the object name. In order to maintain a separation between Analysis and Data structures, there are often parallel package trees inside the main branches of the package, like MARC.Methods.Aerodynamics and MARC.Analysis.Aerodynamics. Where possible the names of fields that live in the MARC package are written out verbosely, avoiding jargon built on mathematical variable names or acronyms.
Below are the packages that MARC expects in order to run the tutorial cases. These are pip, numpy, scipy, matplotlip, plotly, scikit-learn, sklearn, pandas, geopy and kaleido. You can install the dependent packages separately in the terminal of your machine.
python3 get-pip.py
pip install numpy
pip install scipy==1.7.3
pip install matplotlib
pip install sklearn
pip install plotly
pip install kaleido
pip install pandas
pip install scikit-learn
pip install geopy
Alternatively, you can use a scientific python distribution like Anaconda. All the package dependencies like scipy and numpy will come pre-packaged and stuff will just work.
Once you’ve downloaded the code and prepared the software requirements, you’re ready to install it into python!
First, download the repository. There are two options:
In your terminal, run the following command: git clone https://github.com/mitleads/MARC.git.
Download directly from GitHub and extract the release archive.
Navigate to the trunk folder of MARC in the terminal by running the following command: cd MARC/trunk
Run this command: python3 setup.py develop. You may need to run a sudo (super user do) command to install MARC when working on linux or mac systems: sudo python3 setup.py develop
Change to any other folder to test your installation - you can simply navigate to the previous folder i.e. MARC by running the following command: cd ..
Open a python shell by running the following command: python3
Test your MARC installation
In the command line, run >>> import MARC
Then, run >>> print (MARC.__file__)
This should print the file path to the MARC package init.py file in your trunk directory.
The same strategies for dealing with write access can be used here, by simply replacing any install keywords with develop
To uninstall the developer version, run the command python3 setup.py develop --uninstall
You shouldn’t need this part of the guide, unless you are unable to write-access the python site-packages directory. In that case, you can try these approaches to install MARC.
This involves the user install option
python3 setup.py develop --user