Coder Social home page Coder Social logo

pabrod / ci_for_science Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ci-for-research/example-python-monte-carlo-pi

0.0 1.0 0.0 186 KB

Continuous Integration and Continuous developement for scientific applications

License: Apache License 2.0

Python 72.53% CMake 14.59% C++ 12.89%

ci_for_science's Introduction

image

image

image

๐Ÿ‘ฉโ€๐Ÿš€ ๐Ÿ“ก ๐Ÿ”ฌ Continuous Integration for Scientific Applications

This repository contains a brief example of Continuous integration for scientific applications, using miniconda and Python3.

Overview

Continuous Integration (CI) helps to automate the testing and delivery of scientific software tools. A CI is just a workflow that runs automatically ๐Ÿค– as a result of a certain action taken in the source code (e.g. a push, pull-request, etc.).

This repository contains 3 different configuration files for Github Actions, Travis and Gitlab CI. These configuration files encode the actions to perform with the code on a given architecture, like installing the library from scratch in a Ubuntu machine.

๐Ÿ› ๏ธ Setting up a CI workflow

GitHub actions

The Github actions configuration can be found at Python actions file. There is comprehensive documentation of what Github actions are and how to use them.

Travis CI

The Travis configuration file contains the configuration to call a CI workflow using Travis. See Travis tutorial.

GitLab CI ******* The `GitLabCI configuration file <.gitlab-ci.yml>`_ contains the configuration to call aCI** workflow using the Gitlab CI. A comprehensive documentation is available for the GitLab CI tool.

Azure pipelines

If you want to use Azure pipelines, have a look at Tania Allard's great tutorial.

๐Ÿš€ Running on your own infrascture

Sometimes you want to have more control over the hardware infrascture, compilers, etc. when performing continuous integration. GitHub Actions and GitLab CI/CD allow you to set up your infrascture. The following links contains a guide to help you run a CI workflow on your own infrascture:

๐ŸŽฎ Running the package examples

This package contains a toy example to estimate the value of ฯ€ using the Monte Carlo method. To run the Monte Carlo calculator, you will need to have python install. We recommend you create a conda virtual environment by following the instructions below,

  1. Get a copy of miniconda
  2. Create a new environment by running the following command:

    conda create --name ci_for_science python=3.7 -y -q

  3. Activate the environment:

    conda activate ci_for_science

Now to install this package,

  1. Fork and clone this repo
  2. install cython:

    pip install cython

  3. install the library from the repo root folder:

    cd ci_for_science && pip install -e .

7. run the command line interface like:

compute_pi -n 1000

The previous command will estimate ฯ€ using 1000 random points.

Contributing

If you want to contribute to the development of ci_for_science, have a look at the contribution guidelines.

License

Copyright (c) 2019-2020,

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Credits

This package was created with Cookiecutter and the NLeSC/python-template.

ci_for_science's People

Contributors

felipez avatar

Watchers

 avatar

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.