Skip to content

Commit

Permalink
Merge pull request #22 from praksharma/development
Browse files Browse the repository at this point in the history
Migrated to Github actions
  • Loading branch information
praksharma committed Jun 20, 2023
2 parents 3e23222 + 1344006 commit 8233818
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: DeepINN CI
run-name: ${{ github.actor }} is testing the code 🚀
on:
push:
branches:
- main
- development
jobs:
push_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]

steps:
#- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
#- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
#- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
#- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
#- run: echo "🖥️ The workflow is now ready to test your code on the runner."
#- name: List files in the repository
# run: |
# ls ${{ github.workspace }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Testing the library
run: |
python test.py
- run: echo "🍏 This job's status is ${{ job.status }}."
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ docs/_build/

# VSCode
.vscode/

# Python virtual environment
.venv/
File renamed without changes.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,36 @@

* The geometry module has been borrowed from [TorchPhysics](https://github.com/boschresearch/torchphysics).


# Contribution
Create a `venv` in the root of the repo. Here the assumption is that the `python` is symlink to `python3`.
```sh
python -m venv .venv
```
Activate the environment.
```sh
source .venv/bin/activate
```
Confirm that the Python path is updated.
```sh
which python
```
The `STDOUT` should point to the .venv directory. Now, upgrade the pip.
```sh
python -m pip install --upgrade pip
```
Install the required packages.
```sh
pip install -r requirements.txt
```
If you want to build the docs using the same environment, then install the relevant dependencies.
```sh
pip install -r docs/requirements.txt
```

# Testing
The testing is very simple. Just run the test.py file in the current Python virtual environment.
```sh
python test.py
```

6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
torch==2.0.1
matplotlib
numpy
scikit-learn
scikit-optimize>=0.9.0
scipy
scikit-optimize
scipy
shapely

0 comments on commit 8233818

Please sign in to comment.