Comments (11)
Thank you very much!
Regarding your issue, we do actually have a fallback in that PyCUTEst will default to using the current working directory to store the cache if the ${PYCUTEST_CACHE} environment variable is not defined (see the end of system_paths.py
), although I realise that we have probably not documented this anywhere and we should really make this behaviour clear in the README and documentation.
from pycutest.
I see that default now, good to know! I'll have a bit of time in the next couple of weeks where I can probably document that and PR it.
What would you think of pycutest
adding the contents of the ${PYCUTEST_CACHE}
variable to the python path automatically? (or at least providing a function to do it automatically). Would you be interested in a PR doing that?
(sorry for the slow response btw)
from pycutest.
No worries, a documentation PR for the default cache handling would be much appreciated, many thanks!
Regarding pycutest
automatically adding the contents of ${PYCUTEST_CACHE}
to the python path, I will have to ask my co-author who wrote the environment variable handling code. @lindonroberts do you think this would be a good idea?
from pycutest.
I think adding PYCUTEST_CACHE to the Python path automatically would be a nice feature. This would simplify the installation a little bit too (only needing to set PYCUTEST_CACHE and not PYTHONPATH). Happy for a PR on this
from pycutest.
Because I had to deal with this today, a code snippet I needed to update the Python path at runtime to include PYCUTEST_CACHE:
import os, sys
try:
sys.path.index(os.environ['PYCUTEST_CACHE'])
except ValueError:
sys.path.append(os.environ['PYCUTEST_CACHE'])
In our case it would be similar, but with get_cache_path()
instead of os.environ['PYCUTEST_CACHE']
, so
import sys
try:
sys.path.index(get_cache_path())
except ValueError:
sys.path.append(get_cache_path())
It would make sense for this to go at the end of __init__.py
, since that also does things like check existence of environment variables.
from pycutest.
Sounds good to me, would be great to have this feature if you're able to add it?
from pycutest.
Reopening as a reminder to mention the "if environment variable not available use the current directory" behavior in the documentation
from pycutest.
Many thanks! I guess we should probably think about a new release with updated docs soon?
from pycutest.
I agree - to this end in commit f0b5427 I have updated:
- Increased version number to 1.1
- Documentation to include simplified installation (remove any reference to updating PYTHONPATH), updated version history. I set the release date to 14 Feb to give @jfowkes time to check things over
- Misc documentation changes: updated index.rst to use my homepage rather than (old) email, updated link for Windows/WSL info
from pycutest.
Fantastic, thank you very much @lindonroberts for this addition and for the comprehensive docs update. This looks great to me, please release the new release!
from pycutest.
@jfowkes - I've tagged release v1.1 and made it available on pyPI (https://pypi.org/project/pycutest/)
from pycutest.
Related Issues (20)
- I want to specify the dimension of the unconstrained optimization problem, how do I set that? HOT 8
- PyCUTEst v1.5.0 breaks existing cached problems HOT 12
- module 'pycutest_cache_holder.X' has no attribute 'setup' HOT 1
- error when Installing on Linux HOT 10
- Better handling of incompatible Fortran compilers
- System state isn't restored after loading failure (`FileNotFoundError`) HOT 2
- How to find problems with equality constraints only? HOT 5
- Support for ARM-based Mac HOT 2
- import_problem HOT 5
- Release of memory HOT 6
- Facing error when attempting to run the given example HOT 2
- Conversion of an array with ndim > 0 to a scalar is deprecated and will error in future
- Pycutest with Knitro solver HOT 1
- Add new CUTEst routines for the John function HOT 2
- Add missing sparse routines (sobj, sgrad)
- Compilation in parallel on macOS does not work HOT 5
- Setuptools not installed by default HOT 3
- Switch to `pyproject.toml`
- Python Headers on Ubuntu HOT 3
- Inconsistency in problem dimensions between description and problem HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycutest.