Package: scihence
ScihenceHenry's tools for doing science.Table of ContentsScihenceTable of ContentsUsagePipelinesDevelopmentWorkflowSetupUnit and integration testsDocumentationAcceptance testingVersionsNon-release versionsTODOUsageInstallation:pipinstallscihenceImporting:importscihenceNote: PyTorch is not automatically installed since it can be cumbersome depending on which CUDA dependencies are required. You can find out how to install the specific version for you onPyTorch's website.PipelinesTo explore the outputs of a pipeline:In a terminal window, fill in thePATH/TO/DIR_WHERE_PIPELINE_EXECUTED, and run:cdPATH/TO/DIR_WHERE_PIPELINE_EXECUTED&&mlflowuiNavigate to your specified experiment (Defaultif not set), and explore the results.DevelopmentWorkflowgraph 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;SetupEnsurepyenvis installed on your device.Substituting the Python version, run the following code in the terminal at the root of the repository directory:makeenvv=3.a.b&&source.venv/bin/activateUnit and integration testsTo run unit and integration tests, run the following code in the terminal at the root of the repository directory:pytest--junit-xml=docs/source/test-report/local/junit/report.xml
coveragehtml-ddocs/source/test-report/local/coverage
python-mtests.build_junit_report\docs/source/test-report/local/junit/report.xml\docs/source/test-report/local/junit/report.htmlDocumentationThe live version of the documentation can be foundhere.To build documentation, in your environment run the following code in the terminal at the root of the repository directory:makedocsYou can view the built documentation using:opendocs/build/html/index.htmlNote: Documentation building searches for and includes test run artifacts that are produced using scripts similar to the one inTesting. It will still build if not present, but code coverage and the JUnit reports will not be included.Acceptance testingIn your environment, run the following code in the terminal at the root of the repository directory, replacing and including python versions that are supported:pyenvshell3.11.a3.11.b&&toxVersionsNote: Versioning should only occur for the master branch.Before merging, ensure that the version number listed insrc/scihence/__init__.pyis updated.Version numbers are usually given asmajor.minor.patch. This is how the__version__variable in__init__.pyshould be specified when merging fromdevintomaster.Having specified the__version__correctly before merging intomaster,GitLab CIwill 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 asmajor.minor.patch.devNcan be used, for example,0.1.2.dev0would be the first development release of version0.1.2.Similarly, alpha, beta, and release candidate releases can be versioned using the semantic notation0.1.2a0,0.1.2b0,0.1.2rc0respectively (without the 3rd.).Non-release versionsNon-release versions ofscihencethat are in a merge request will automatically have a version created with the GitLab CI job ID appended as metadata. For example, a push of0.1.2.dev12that builds the package in a job with ID987654321would be uploaded to thescihencedevelopment package registryas version0.1.2.dev12+job987654321. This could then be installed locally for testing purposes usingpipinstallscihence==0.1.2.dev12+job987654321The extra index URL for this package registry wherepipwill look should already be configured in the.venv/pip.confprovided your environment was initially created usingmake env.TODOtox -e py311-wheeldoes not use wheelTest everythingDocument everythingSave documentation and packages for individual commitsGeneralise to reinforcement learning pipelineEnsure accepts GNN inputs