Comments (5)
at which point? if in collector -- probably not worth it... In the IO -- again not sure since we would need a custom structure from all the references based on desired output: e.g. currently nested hierarchy, but could be more flat (than such separation could be the natural way to re-present)
from duecredit.
so, atm we are storing the citations referenced by the entry key, but this is not optimal because we can have the same entry for different functions/modules/packages (see #30). I think we should refactor the Collector or the citations so that they are referenced according to the path and not to the entry key. What do you think?
EDIT: what I meant is that in DueCreditCollector we store everything referenced by the path, and we store a set of citations for each path
from duecredit.
you are 100% correct. indeed storing by entry key leads to collisions. But the same by path alone -- multiple citations per each path would collide. May be by a tuple (entry_key, path)
then? ;) or citations could be a dict (by key) of dicts (by path). This way we could still quickly determine the correct citation, either it was hit before etc. May be the simplest just to make compound key (entry, path)
and see how implementation holds and if you feel that dict of dicts would be better -- reimplement that way
from duecredit.
I was thinking of implementing __eq__
for the Citation class, so that we can use sets on those, and store for each path key a set of citations, so we automatically avoid any duplicate. But a tuple as key seems good to me too.
from duecredit.
On Fri, 31 Jul 2015, Matteo Visconti di Oleggio Castello wrote:
I was thinking of implementing eq for the Citation class, so that we
can use sets on those, and store for each path key a set of citations, so
we automatically avoid any duplicate. But a tuple as key seems good to me
too.
sets operate only on immutable hashable objects, so even with
eq I think that would not work. that immutable aspect might be the
one which would forbid us to make sets of them etc
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
from duecredit.
Related Issues (20)
- Integration with citepy CSL data classes HOT 3
- References are not deduplicated in a bibtex summary HOT 3
- Ci testing fails
- How to cite duecredit? HOT 5
- Use DueCredit for data files HOT 2
- Deprecation warning for due credit. HOT 3
- [wishlist] interface to templating engines (e.g. ninja) to provide users a flexible way to render reports
- [wishlist] option (env var) to not load existing .duecredit.p upon start
- Help adding duecredit HOT 20
- Enable duecredit by default, but without injections
- SciPy injection is outdated HOT 3
- Switch from WARNING to DEBUG for outdated injections etc
- Best practices for integrating conditional dcite decorators into Nipype workflows? HOT 2
- DueCredit internal failure while running <function DueSwitch.dump ... on Windows 10 HOT 5
- Improve usage in Jupyter HOT 2
- Internal error: Both inactive and active collectors should be provided HOT 1
- [wishlist] Can duecredit be exported as codemeta? HOT 1
- DueCredit `cite()` doesn't work and `dcite()` works, but not always HOT 5
- Duecredit API HOT 1
- inactively `@due.dcite`-decorated classes become unpicklable
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 duecredit.