Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: 2.1

commands:
set_up_build_environment:
steps:
- checkout
- run:
name: Installing SUDO
command: 'apt-get update && apt install -y sudo && rm -rf /var/lib/apt/lists/*'
- run:
name: Run INSTALL DEPENDENCIES
command: bash install_dependencies.sh
- run:
name: Install DSMC
command: pip3 install .

run_unit_tests:
steps:
- run:
name: Run UNIT TESTS
command: cd tests/unit/ && python3 main.py -v

executors:
docker-jammy:
docker:
- image: "ubuntu:jammy"

jobs:
unit_tests:
executor: docker-jammy
steps:
- set_up_build_environment
- run_unit_tests

workflows:
build-and-run-tests:
jobs:
- unit_tests
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.0] - 2022-09-15
### Added
- unit test environment
- cirlce ci integration
- dependency installation script
- dsmc module installation file
Empty file added dsmc/__init__.py
Empty file.
7 changes: 7 additions & 0 deletions dsmc/dsmc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import math
import numpy
from numba import njit

@njit
def test():
return 1.0
17 changes: 17 additions & 0 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

sudo apt update

sudo apt install -y python3
sudo apt install -y python3-pip
sudo apt install -y python3-dbg

pip3 install --upgrade pip setuptools wheel

pip3 install numpy
pip3 install llvmlite
pip3 install scipy
pip3 install numba
pip3 install pytest

echo "INSTALLATION COMPLETE"
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from setuptools import setup
setup(
name='dsmc',
version='0.1.0',
author='Leo Basov',
python_requires='>=3.6, <4',
packages=["dsmc"],
install_requires=[
'numpy',
'llvmlite',
'scipy',
'numba'
],
)
8 changes: 8 additions & 0 deletions tests/unit/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env python3

import unittest

from test_dsmc.dsmc import *

if __name__ == '__main__':
unittest.main()
Empty file.
6 changes: 6 additions & 0 deletions tests/unit/test_dsmc/dsmc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import unittest
from dsmc import dsmc

class TestDSMC(unittest.TestCase):
def test_test(self):
self.assertEqual(1.0, dsmc.test())