aps-8id-dys / ipython-8idiuser

8-ID-I ipython configuration for bluesky (and other)
1 stars 1 forks source link

directory cleanup #226

Closed prjemian closed 4 years ago

prjemian commented 4 years ago

More folders that we can remove from the repository:

prjemian commented 4 years ago

reference:

For single file use this command

git rm --cached mylogfile.log

For single directory

git rm  --cached -r mydirectory
qzhang234 commented 4 years ago

@prjemian Do we want to remove the file only from the repo and not the local system? Won't it be easier to remove from local and push to master? I assume all the folders can still be found in the push history and we are certain we don't need those files any more, right?

qzhang234 commented 4 years ago

I think it might be a good practice for Kacper. @Kacperswitalski when the scan is finished/interrupted next time, could you ping me on Teams to see if I'm around? I'll show you how to do a GitHub push and then you could close this issue.

@prjemian We could delete the 4 folders you identified and do a push from local to master, right?

qzhang234 commented 4 years ago

The new master branch crashed while loading Bluesky with the following error:

Error from terminal ``` quartz% bluesky8IDI Python 3.8.2 (default, Mar 26 2020, 15:53:00) Type 'copyright', 'credits' or 'license' for more information IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help. IPython profile: bluesky Activating auto-logging. Current session state plus future input saved. Filename : /home/beams10/8IDIUSER/.ipython-bluesky/.logs/ipython_console.log Mode : rotate Output logging : True Raw input log : False Timestamping : True State : active I Mon-18:55:28 - ############################################################ startup I Mon-18:55:28 - logging started I Mon-18:55:28 - logging level = 10 I Mon-18:55:28 - /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/collection.py I Mon-18:55:28 - /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/mpl/console.py I Mon-18:55:29 - bluesky framework I Mon-18:55:29 - /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/framework/check_python.py I Mon-18:55:29 - /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/framework/check_bluesky.py I Mon-18:55:30 - /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/framework/initialize.py [TerminalIPythonApp] WARNING | Unknown error in handling startup files: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~/.conda/envs/bluesky_2020_9/lib/python3.8/site-packages/IPython/core/shellapp.py in _exec_file(self, fname, shell_futures) 347 else: 348 # default to python, even without extension --> 349 self.shell.safe_execfile(full_filename, 350 self.shell.user_ns, 351 shell_futures=shell_futures, ~/.conda/envs/bluesky_2020_9/lib/python3.8/site-packages/IPython/core/interactiveshell.py in safe_execfile(self, fname, exit_ignore, raise_exceptions, shell_futures, *where) 2727 try: 2728 glob, loc = (where + (None, ))[:2] -> 2729 py3compat.execfile( 2730 fname, glob, loc, 2731 self.compile if shell_futures else None) ~/.conda/envs/bluesky_2020_9/lib/python3.8/site-packages/IPython/utils/py3compat.py in execfile(fname, glob, loc, compiler) 166 with open(fname, 'rb') as f: 167 compiler = compiler or compile --> 168 exec(compiler(f.read(), fname, 'exec'), glob, loc) 169 170 # Refactor print statements in doctests. /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/00-instrument.py in 4 """ 5 ----> 6 from instrument.collection import * 7 8 # show_ophyd_symbols() /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/collection.py in 11 logger.info("bluesky framework") 12 ---> 13 from .framework import * 14 from .devices import * 15 from .plans import * /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/framework/__init__.py in 2 from .check_bluesky import * 3 ----> 4 from .initialize import * 5 from .user_dir import * 6 from .metadata import * /home/beams10/8IDIUSER/.ipython-bluesky/profile_bluesky/startup/instrument/framework/initialize.py in 123 # set default timeout for all EpicsSignal connections & communications 124 import ophyd --> 125 ophyd.EpicsSignalBase.set_default_timeout(timeout=10, connection_timeout=5) 126 AttributeError: module 'ophyd' has no attribute 'EpicsSignalBase' ```

As a result I checked out master one commit before this: https://github.com/aps-8id-dys/ipython-8idiuser/commit/422f2c6c4d0b2d541799c17e81188b38977e5130

And currently Bluesky loads fine.

But I'm very curious what could have caused the crash at the startup. @prjemian Any suggestions?

prjemian commented 4 years ago

ophyd.signal.EpicsSignalBase

On Mon, Oct 5, 2020, 7:16 PM Qingteng Zhang notifications@github.com wrote:

Assigned #226 https://github.com/aps-8id-dys/ipython-8idiuser/issues/226 to @prjemian https://github.com/prjemian.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/aps-8id-dys/ipython-8idiuser/issues/226#event-3842909629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMBIBNIKU57VC4NLSX3SJJOVXANCNFSM4RNNZ6ZQ .

qzhang234 commented 4 years ago

@prjemian What do you think that is and why rolling back to old commit avoided the crash?

prjemian commented 4 years ago

I made this change about the same time. Roll back undid that change.

On Mon, Oct 5, 2020, 8:30 PM Qingteng Zhang notifications@github.com wrote:

@prjemian https://github.com/prjemian What do you think that is and why rolling back to old commit avoided the crash?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aps-8id-dys/ipython-8idiuser/issues/226#issuecomment-703976285, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMHQ5H63DNORNDSYNEDSJJXMXANCNFSM4RNNZ6ZQ .