Code Monkey home page Code Monkey logo

architect's Introduction

Python Version Code style: black GitHub repo size GitHub code size in bytes Lines of code Pipeline

Architect

Architect is a general-purpose, extensible, and developer-friendly systems engineering design tool built to support tradeoff analyses for the missions undertaken by the University of Toronto Aerospace Team๐ŸŒŒ.

At its core, it's a library of mathematical models that describe systems across various engineering domains (i.e. optical, electrical, mechanical, thermal, space systems, etc.) whose interactions can be modelled analytically using an object-oriented approach.

Contribution

Instructions for contributing to this project are shown here.

Setup โš™๏ธ

This section will take you through the procedure to take your development environment from zero to hero.

  1. Install Python.

    See the required Python version in the pyproject.toml file.

  2. Install git.

  3. Install poetry.

    The project uses poetry as its package manager. Poetry allows you to run a single command to install all the dependencies for the project. Install it through the Windows Powershell via:

    (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
    

    On Linux/MacOS with:

    curl -sSL https://install.python-poetry.org | python3 -
    

    Once poetry is installed, if it does not say it has automatically add itself to your PATH, add its executible directory to your PATH:

    Windows: %APPDATA%\Python\Scripts

    Linux/MacOS: $HOME/.local/bin

    For instructions on adding directories to your machine's PATH, check out this (Windows) or this (Linux/MacOS). You'll need to close all instances of your terminals for the PATH changes to take effect.

    Confirm poetry was installed correctly by typing the following in your terminal:

    poetry --version
    
  4. Clone the repository.

    It is recommended that you use Github Desktop to clone the project repository.

  5. Install project dependencies

    From a terminal within the cloned repository, run poetry's install command:

    poetry install
    
  6. Configure IDE interpreter virtual environment

    It is recommended you use VSCode as your integrated development environment (IDE). Configure your IDE to use the virtual environment poetry has created.

    In the case of VSCode, enter the command pallet by going to View>Command Palette and search for Python:Select Interpreter. Select the appropriate poetry virtual environment for the repository. Restart VSCode if you do not see it listed. Once the intepreter is changed, restart your terminal by closing the old one and launching it again.

    For Windows Powershell users, you might need to change the PS execution policy to allow the script to run. Run a Powershell terminal as administrator and execute the following:

    Set-ExecutionPolicy -ExecutionPolicy Bypass
    

    VSCode's integrated terminal should now launch the poetry virtual environment.

  7. Install pre-commit hooks

    Install the project's pre-commit hooks using:

    pre-commit install --install-hooks
    

    Pre-commit's cache will be stored at ~/.cache/pre-commit.

  8. Install extensions

    Install the recomended extensions by opening the command pallet using CMD + shift + P. Type Show Reccomended Extensions and install the extensions listed.

  9. Setup verification

    To verify your environment is set up correctly, run the project's unit tests by navigating to VSCode's Testing tab and hitting Run Tests. The tests should be found and run without issue.

You're now ready to start contributing!

Adding Packages ๐Ÿ“ฆ

To add a new package to the poetry virtual environment, install it via:

poetry add <package>

This is poetry's version of pip install <package>.

Testing ๐Ÿงช

This repo uses pytest for unit testing. To run all unit tests, go to the Testing tab in VSCode and hit Run Tests.

This is also a good check to make sure your environment is properly set up. If the tests fail to run, check to confirm you followed the setup instructions correctly.

Pre-Commit โœ…

This project is configured to use pre-commit hooks. A hook is a script that performs some operation on the repository before every commit. Hooks are used to autoformat and lint code. Pre-commit will not let you push your commit until all hooks pass. When a hook fails, they can be run manually to delint using:

pre-commit run --all-files

Hooks can be updated using:

pre-commit autoupdate

Branches ๐ŸŒฟ

Branches are organized as follow:

  1. main: the branch containing the most recent working release. All code in this branch should run perfectly without any known errors.

  2. <feature>: branched off of main; a feature branch. Features must be tested thoroughly before being merged into main.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.