Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Permit profile creation in existing directory #37

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

Closed
rpanderson opened this issue May 5, 2020 · 0 comments · Fixed by #38
Closed

Permit profile creation in existing directory #37

rpanderson opened this issue May 5, 2020 · 0 comments · Fixed by #38

Comments

@rpanderson
Copy link
Member

Profile creation fails if pathlib.Path.home() / 'labscript-suite' exists.

~/labscript-suite$ labscript-profile-create
Traceback (most recent call last):
  File "/home/rpanderson/labscript-suite/.venv/bin/labscript-profile-create", line 11, in <module>
    load_entry_point('labscript-utils==2.16.0.dev3', 'console_scripts', 'labscript-profile-create')()
  File "/home/rpanderson/labscript-suite/.venv/lib/python3.7/site-packages/labscript_profile/create.py", line 41, in create_profile
    raise FileExistsError(LABSCRIPT_SUITE_PROFILE)

This proposal is to permit existence of pathlib.Path.home() / 'labscript-suite', but:

  1. not if any files of the same name as those in DEFAULT_PROFILE_CONTENTS exist; or, alternatively
  2. not if directories of the same name as those in DEFAULT_PROFILE_CONTENTS exist.

This would permit–at least–installing a virtual environment and/or a local install of the suite in pathlib.Path.home() / 'labscript-suite'.

For (1) above, the dirs_exist_ok parameter of shutil.copytree could be used, but this requires python_version >= '3.8'.

chrisjbillington added a commit to chrisjbillington/labscript_utils that referenced this issue May 8, 2020
Still errors if any of its contents exist, however.

This allows developers to use the labscript profile directory as their
development space if they like.

Also fix failure to use actual home directory in default shared drive
path in Unix (a literal '$HOME' string was used instead).

Closes labscript-suite#37
rpanderson added a commit to rpanderson/labscript-suite that referenced this issue Jun 25, 2020
... and other perfunctory edits.
rpanderson added a commit to rpanderson/labscript-suite that referenced this issue Jun 25, 2020
rpanderson added a commit to labscript-suite/labscript-suite that referenced this issue Jun 25, 2020
philipstarkey added a commit to labscript-suite/labscript-suite that referenced this issue Jun 25, 2020
commit 76e7b63
Author: Phil Starkey <[email protected]>
Date:   Thu Jun 25 20:09:18 2020 +1000

    Update dependencies in setup.cfg

    Bumped all labscript-suite dependencies to `>=3.0.0`

commit 1567faa
Merge: 17f02fe e0ac239
Author: Russell Anderson <[email protected]>
Date:   Thu Jun 25 15:48:24 2020 +1000

    Merge pull request #50 from rpanderson/labscript-profile-dir-docs

    Clarify note about labscript-suite/labscript-utils#37

commit e0ac239
Author: Russell Anderson <[email protected]>
Date:   Thu Jun 25 15:43:26 2020 +1000

    Clarify note about labscript-suite/labscript-utils#37

commit 17f02fe
Merge: 907619d 90330ba
Author: Russell Anderson <[email protected]>
Date:   Mon Jun 22 18:08:23 2020 +1000

    Merge pull request #49 from philipstarkey/master

    fix docs conf bugs identified in labscript-suite/labscript-utils#57

commit 90330ba
Author: philipstarkey <[email protected]>
Date:   Sat Jun 20 18:14:39 2020 +1000

    fix docs conf bugs identified in labscript-suite/labscript-utils#57

commit 907619d
Author: Russell Anderson <[email protected]>
Date:   Fri Jun 19 16:50:41 2020 +1000

    64x64 icons per other styling, and https doi badge

commit 25fe511
Merge: fadeab2 3b8377d
Author: Phil Starkey <[email protected]>
Date:   Fri Jun 19 16:43:34 2020 +1000

    Merge pull request #48 from philipstarkey/master

    Added links to other component docs

commit 3b8377d
Author: philipstarkey <[email protected]>
Date:   Fri Jun 19 15:57:44 2020 +1000

    Addressing latest review comments

commit d5e175b
Author: philipstarkey <[email protected]>
Date:   Fri Jun 19 10:56:52 2020 +1000

    Simplified sphinx conf by moving logic into template

commit 6abe116
Author: philipstarkey <[email protected]>
Date:   Thu Jun 18 19:14:25 2020 +1000

    Moved auto generated components.rst to a jinja2 template

commit 8159129
Author: philipstarkey <[email protected]>
Date:   Thu Jun 18 16:43:21 2020 +1000

    Updated .gitignore with latest GitHub defaults

commit d697cb9
Author: philipstarkey <[email protected]>
Date:   Thu Jun 18 16:40:30 2020 +1000

    Relocated custom sphinx gitignore rules (and restored the original)

commit 42172f5
Author: philipstarkey <[email protected]>
Date:   Thu Jun 18 16:32:45 2020 +1000

    reversed order of sections in .gitignore

    This is so that custom rules added by git tools will be in the right section when they are appended to the file

commit cb399ec
Author: philipstarkey <[email protected]>
Date:   Thu Jun 18 16:09:49 2020 +1000

    Split out metapackage link in generalised config
    (hidden in docs built for this project)

    * also removed metapackage table from components page (since I realised I shouldn't have really added it)

commit a00526b
Author: philipstarkey <[email protected]>
Date:   Thu Jun 18 13:06:16 2020 +1000

    Fixed bug where component docs URLs were alsways using "latest".

    * Now use the intersphinx mapping URL already generated
    * Also added entry for metapackage

commit 58ed4fd
Author: philipstarkey <[email protected]>
Date:   Thu Jun 18 12:31:24 2020 +1000

    Added dynamic generation of labscript suite component table

commit b3087a6
Author: philipstarkey <[email protected]>
Date:   Thu Jun 18 11:10:54 2020 +1000

    Implemented some review changes

    * fixed typo in labscriptsuite.org URLs
    * Updated to use `pathlib`
    * Updated .gitignore to delineate custom and generic ignore rules
    * renamed component_docs.rst -> components.rst

commit fadeab2
Author: Russell Anderson <[email protected]>
Date:   Wed Jun 17 11:38:48 2020 +1000

    README.md badges and edits

commit e419ce1
Author: Russell Anderson <[email protected]>
Date:   Tue Jun 16 21:03:32 2020 +1000

    Populated README.md with styling, iconogrpahy, prose, and badges

commit 8e5ea93
Author: philipstarkey <[email protected]>
Date:   Tue Jun 16 18:08:33 2020 +1000

    black formatting

commit 0f0da2e
Author: philipstarkey <[email protected]>
Date:   Tue Jun 16 18:06:02 2020 +1000

    Added links to other component docs

Co-authored-by: Russell Anderson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant