Skip to main content

Henry's tools in Python.

Project description

Scihence

Henry's tools for doing science.

Table of Contents

Usage

Installation:

pip install scihence

Importing:

import scihence

Pipelines

To explore the outputs of a pipeline:

  • In a terminal window, fill in the PATH/TO/DIR_WHERE_PIPELINE_EXECUTED, and run:
    cd PATH/TO/DIR_WHERE_PIPELINE_EXECUTED && mlflow ui
    
  • Navigate to your specified experiment (Default if not set), and explore the results.

Development

Workflow

graph TD;
   master(Master branch):::masterclass-->dev
   dev(Dev branch):::devclass-->feature
   feature(Feature branch):::featclass-->changes
   changes(Make changes):::featclass-->document
   document(Document):::featclass-->test
   test(Test):::featclass-->passing
   passing{Passing?}:::featclass
   passing--No-->changes
   passing--Yes-->push
   push(Push):::featclass-->pr
   pr(Pull request):::featclass
   pr--Contributer-->approved
   pr--CI/CD-->approved
   pr--Reviewer-->approved
   approved{Approved?}:::featclass
   approved--No-->changes
   approved--Yes-->merge
   merge(Dev branch):::devclass-->release
   dev-->merge
   release{Release?}:::devclass
   release--No-->feature
   release--Yes-->pr2
   pr2(Pull request):::devclass
   pr2--CI/CD-->approved2
   pr2--Reviewer-->approved2
   approved2{Approved?}:::devclass
   approved2--Yes-->master2
   approved2--No-->dev
   master2(Master branch):::masterclass
   master-->master2

   classDef masterclass fill:#000035, stroke:#000035, color:#c0c0c0;
   classDef devclass fill:#552777, stroke:#552777, color:#aaddff;
   classDef featclass fill:#aaddff, stroke:#aaddff, color:#000035;

   linkStyle 22 fill:none, stroke:#000035,stroke-width:2px;
   linkStyle 0,14,15,18,19 fill:none, stroke:#552777,stroke-width:2px;
   linkStyle 1,2,3,4,5,8,9,10,11 fill:none, stroke:#aaddff,stroke-width:2px;
   linkStyle 7,13,17,20 fill:none, stroke:#c0c0c0,stroke-width:2px;
   linkStyle 6,12,16,21 fill:none, stroke:#ff0000,stroke-width:2px;

Setup

  1. Ensure pyenv is installed on your device.

  2. Substituting the Python version, run the following code in the terminal at the root of the repository directory:

    make env v=3.a.b && source .venv/bin/activate
    

Documentation

The live version of the documentation can be found here.

To build documentation, in your environment run the following code in the terminal at the root of the repository directory:

make docs

You can view the built documentation using:

open docs/build/html/index.html

Tests

In your environment, run the following code in the terminal at the root of the repository directory, replacing and including python versions that are supported:

pyenv shell 3.a.b 3.c.d && tox

Versions

Note: Versioning should only occur for the master branch.

  • Before merging, ensure that the version number listed in src/scihence/__init__.py is updated.
  • Version numbers are usually given as major.minor.patch. This is how the __version__ variable in __init__.py should be specified when merging from dev into master.
  • Having specified the __version__ correctly before merging into master, GitLab CI will take care of packaging and releasing automatically.
  • When creating a development version that you would like to upload to the package index, version numbers such as major.minor.patchdevN can be used, for example, 0.1.2dev0 would be the first development release of version 0.1.2.
  • Similarly, alpha or beta releases can be versioned using the semantic notation 0.1.2a0 or 0.1.2b0 respectively.

TODO

  • Test everything
  • Document everything
  • Generalise to reinforcement learning pipeline
  • Ensure accepts GNN inputs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

scihence-0.0.dev3-py3-none-any.whl (4.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page