Comments (7)
pybliometrics-dev/pybliometrics@b15ad45
from nbstata.
I'm not familiar with Arch Linux or how it relates to other platforms. Is this XDG Base Directory spec universal?
I guess I'm also not clear on what you're requesting. A pull request would be the most direct way to show me. Otherwise, can you explain what we'd be doing different if we're "still reading from the old path"? How is that consistent with the request to "move nbstata.conf
"?
from nbstata.
I'm not familiar with Arch Linux or how it relates to other platforms. Is this XDG Base Directory spec universal?
Yes
https://en.wikipedia.org/wiki/Freedesktop.org#Base_Directory_Specification
I guess I'm also not clear on what you're requesting.
move ~/.nbstata.conf
to ~/.config/nbstata/nbstata.conf
Otherwise, can you explain what we'd be doing different if we're "still reading from the old path"?
We would read from the new folder in addition to the old one, for backwards compatibility
How is that consistent with the request to "move nbstata.conf"?
If ~/.config/nbstata/nbstata.conf
doesn't exist, you try the old ~/.nbstata.conf
.
The point is that people rely on this standard to administer their system, for example they backup ~/.config
instead of the entire home folder.
from nbstata.
Thank you, that clears it up for me.
I would have thought to move it to ~/.config/nbstata.conf
. Just to double check, you'd prefer putting it within a nbstata
directory, right?
Also, when checking the XDG spec path, we should actually use the environment variable $XDG_CONFIG_HOME/nbstata/nbstata.conf
rather than $HOME/.config/nbstata/nbstata.conf
, right?
The current code is here and here.
from nbstata.
I would have thought to move it to ~/.config/nbstata.conf. Just to double check, you'd prefer putting it within a nbstata directory, right?
We may want other files in the future.
For example, a ~/.config/nbstata/nbstata.d
directory which contains user-defined STATA scripts to be run at startup. For instance to initialize the environment, or define variables or functions that the user frequently uses.
Or in the future we may want to support multiple STATA versions, so have a config file for each version.
Or the user may want to backup an old config file, keeping it in the same directory.
Also, when checking the XDG spec path, we should actually use the environment variable $XDG_CONFIG_HOME/nbstata/nbstata.conf rather than $HOME/.config/nbstata/nbstata.conf, right?
We check if XDG_CONFIG_HOME
is defined. If it isn't, we define XDG_CONFIG_HOME=$HOME/.config
. Then we always use $XDG_CONFIG_HOME/nbstata/nbstata.conf
.
from nbstata.
Ok, that sounds good. If you know of another Python project that handles a configuration file in a similar way (the simpler, the better), that would be helpful to see. Otherwise, I think this is enough to go on.
from nbstata.
Hmm, this code example doesn't do anything with XDG_CONFIG_HOME
, which is the part I was most looking for sample code for. But co-pilot or the like can probably help me with that, anyway.
from nbstata.
Related Issues (20)
- Kernel crashes with certain comments HOT 1
- Request: conda-forge package HOT 1
- invalid config options HOT 2
- `%help` triggers an unhandled error
- Ease setting figure dimensions in-line HOT 3
- %head fails with "head failed. must be real number, not str" HOT 7
- New animated gif, specific to nbstata HOT 1
- Tabs vs Spaces HOT 8
- Add config file location to %status magic output
- Add a Stata Quarto tutorial HOT 5
- Improve ability to initialize Stata automatically HOT 1
- Display config file errors in notebook HOT 7
- Config file saved at custom location (by `install --prefix`) ignored
- Add docs about using as alternative to 'stata_setup' package
- nbstata compiles document but does not work in interactive mode in quarto documents (in RStudio) HOT 5
- Broken link in documentation HOT 1
- Stata 18.5/Now support
- RStudio + Quarto Error HOT 3
- Can't find the stata installation path HOT 1
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 nbstata.