Coder Social home page Coder Social logo

Comments (5)

kdm9 avatar kdm9 commented on July 24, 2024 1

@Midnighter hmm, I did check the version of taxprofiler was up-to-date, but I had initially installed v0.2.3 and so it is possible that I checked the version e.g. in a different conda env from the jobs that rm'd the files.

Given that this was a recently fixed bug, I suspect that is what happened. I've recreated all conda envs to update taxprofiler, so we'll see if the issues recur.

In the mean time I'm happy to close this issue, and will reopen if I find this happening again with v0.3.0 or higher.

from taxpasta.

kdm9 avatar kdm9 commented on July 24, 2024

I should have made this clear: this doesn't happen every single time I ctrl-c taxpasta. I'd estimate about a quarter of the times

from taxpasta.

Midnighter avatar Midnighter commented on July 24, 2024

It indeed sounds like an upstream issue in taxopy to me. Not sure why this would happen when only reading content. @maxibor do you have some capacity to investigate?

from taxpasta.

apcamargo avatar apcamargo commented on July 24, 2024

I'm not exactly sure how taxopy is called within taxpasta, but this is the part of the code that controls the deletion of the files: https://github.com/apcamargo/taxopy/blob/437f94be6b592cc5638e45c10804760191ddffc8/taxopy/core.py#L128-L129

If nodes.dmp or names.dmp are manually supplied, the files shouldn't be deleted.

from taxpasta.

Midnighter avatar Midnighter commented on July 24, 2024

The taxopy.TaxDb is created in this piece of code:

class TaxopyTaxonomyService(TaxonomyService):
    """Define the taxonomy service based on taxopy."""

    def __init__(self, *, tax_db: taxopy.TaxDb, **kwargs) -> None:
        """Initialize a taxonomy service instance with a taxopy database."""
        super().__init__(**kwargs)
        self._tax_db = tax_db

    @classmethod
    def from_taxdump(cls, source: Path) -> TaxopyTaxonomyService:
        """Create a service instance from a directory path containing taxdump info."""
        merged = source / "merged.dmp"
        return cls(
            tax_db=taxopy.TaxDb(
                names_dmp=str(source / "names.dmp"),
                nodes_dmp=str(source / "nodes.dmp"),
                merged_dmp=str(merged) if merged.is_file() else None,
                keep_files=True,
            )
        )

So I don't see why the files should ever get deleted. Unless, @kdm9 you were using an earlier version of taxpasta which indeed had a bug in this code.

from taxpasta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.