-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up dev environment and/or install paths and/or scripts for hsp2 tinkering #6
Comments
Looked into this a little bit, perhaps venv is the optimal method?
|
@jdkleiner thanks for doingsome leg work on this. Do you have time to meet up and discuss this one sometime today? |
@rburghol sure thing, looking forward to diving into this |
@gcambridge at your earliest convenience, can you please push the branch that you have been developing on? We want to preserve the progress that you made and see the locations and prototype functions for us to build on. Thanks! |
Soln. use virtual environments: #55 |
Overview
hsp2
to enable us to break things inspecl
development without screwing up other modelers project work.$HOME/.local/lib
directory which then becomes the first thing that python checks when running the package. For info on overcoming this see: Install HSP2 Python on Linux #9Trees and branches:
/opt/model/HSPsquared
: this is the sole place for development where we can run the model on deq2develop
: exact duplicate of upstream respec repo. This is the branch we should use as the master to run our models on for the time being since it has the IWAT fix (which fixes many uci defaults)master
: exact duplicate of upstream respec repo. Should be the one to run production on after they merge the IWAT fix to master.specl
: current special actions development branch. Consider it to be a "psuedo" main branch, that is, it is our place for the current functioning special actions code, and we should branch from it and do pull requests against it when we make code changes.specl
branch to make it a copy of the respec master for starters.git remote add upstream https://github.com/respec/HSPsquared
setup.py
forpip install HSPsquared
respec/HSPsquared#55Options
specl
are defined in the UCI, or optionally in a separate file (we will code this), we can perhaps avoid much of this by simply not enabling spec-actions unless we are testing. In other words, our base scenario for modeling is nowhsp2_2022
, we can create a scenario calledspecl_2022
.hsp2
executableentry points
:pip
and the concept of entry points to do this. (see below)/usr/local/bin/hsp2
has this:load_entry_point('HSPsquared', 'console_scripts', 'hsp2')
:HSPsquared
name of the packageconsole_scripts
the hsp2 installer uses theconsole_scripts
argument, which says that this should be a command line executablehsp2
name of the executable to createsetup.py
/opt/model/HSPsquared/HSPsquared.egg-info/entry_points.txt
.gitignore
so it does not appear until after you run thepip
setup (see Install HSP2 Python on Linux #9 )Code 1: Python install script created when we run
pip install -e
(see #9), which creates a scripthsp2
that runs the model. This is stored in /usr/local/bin/hsp2 (so everyone can run it), and it's contents looks like:Ideally, I think we'd have a script called
hsp2dev
that if called, would be able to seamlessly integrate with our existing hspf workflows, since the configuration files for our models we can specify the executable we want (hspf or hsp2, or hsp2dev for example) and it should work automatically. This will allow us to just set up a separate scenario for dev testing, indicate the executable we want, and blammo, break stuff to our hearts content.The text was updated successfully, but these errors were encountered: