MilesCranmer commited on
Commit
3c4ee8e
1 Parent(s): fd7b323

Fix edgecase related to always setting julia_project

Browse files
Files changed (2) hide show
  1. pysr/sr.py +8 -1
  2. setup.py +1 -1
pysr/sr.py CHANGED
@@ -327,8 +327,15 @@ def pysr(X=None, y=None, weights=None,
327
 
328
 
329
  pkg_directory = kwargs['pkg_directory']
 
 
 
 
 
 
330
  kwargs['need_install'] = False
331
- if not (pkg_directory / 'Manifest.toml').is_file():
 
332
  kwargs['need_install'] = (not user_input) or _yesno("I will install Julia packages using PySR's Project.toml file. OK?")
333
  if kwargs['need_install']:
334
  print("OK. I will install at launch.")
 
327
 
328
 
329
  pkg_directory = kwargs['pkg_directory']
330
+ manifest_file = None
331
+ if kwargs['julia_project'] is not None:
332
+ manifest_filepath = Path(kwargs['julia_project']) / 'Manifest.toml'
333
+ else:
334
+ manifest_filepath = pkg_directory / 'Manifest.toml'
335
+
336
  kwargs['need_install'] = False
337
+
338
+ if not (manifest_filepath).is_file():
339
  kwargs['need_install'] = (not user_input) or _yesno("I will install Julia packages using PySR's Project.toml file. OK?")
340
  if kwargs['need_install']:
341
  print("OK. I will install at launch.")
setup.py CHANGED
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
 
6
  setuptools.setup(
7
  name="pysr", # Replace with your own username
8
- version="0.5.16",
9
  author="Miles Cranmer",
10
  author_email="miles.cranmer@gmail.com",
11
  description="Simple and efficient symbolic regression",
 
5
 
6
  setuptools.setup(
7
  name="pysr", # Replace with your own username
8
+ version="0.5.16-1",
9
  author="Miles Cranmer",
10
  author_email="miles.cranmer@gmail.com",
11
  description="Simple and efficient symbolic regression",