Code Monkey home page Code Monkey logo

Comments (5)

vchendrix avatar vchendrix commented on August 23, 2024

@emilyarobles I am using < 100

See https://github.com/NGEET/ngt-archive/blob/main/archive_api/serializers.py#L149-L151

       # Make sure description has at least 100 words
        if 'description' in data.keys() and data['description'] and len(data['description'].split()) < 100:
            errors["description"] = "Description must be at least 100 words."

from ngt-archive.

vchendrix avatar vchendrix commented on August 23, 2024

@emilyarobles can you give me some text that your entered which I can used to reproduce the issue you are seeing?

from ngt-archive.

emilyarobles avatar emilyarobles commented on August 23, 2024

@vchendrix This description is 100 words but the error is appearing:

Revising to add text and meet 100 word limit, error message appeared as expected: This dataset contains raw output from the data logger connected to 9 sapflow and 5 soil moisture sensors are provided in the file xxx.dat. The metadata file (BR-Ma2 E-field log_20160501.xls) has additional information on locations where the sensors were installed, as well as other installation/maintenance details. No data processing or QA/QC was done on the raw datasets. Additional processed datasets will be uploaded separately and added to the Dataset References section. Please contact [email protected] if you need to use this dataset for additional information.

from ngt-archive.

vchendrix avatar vchendrix commented on August 23, 2024

@emilyarobles I using a very simple way to count words with split(). Here is how that text appears

>>> text = """Revising to add text and meet 100 word limit, error message appeared as expected: This dataset contains raw output from the data logger connected to 9 sapflow and 5 soil moisture sensors are provided in the file xxx.dat. The metadata file (BR-Ma2 E-field log_20160501.xls) has additional information on locations where the sensors were installed, as well as other installation/maintenance details. No data processing or QA/QC was done on the raw datasets. Additional processed datasets will be uploaded separately and added to the Dataset References section. Please contact [email protected] if you need to use this dataset for additional information."""
>>> len(text.split())
98
>>> text.split()
['Revising', 'to', 'add', 'text', 'and', 'meet', '100', 'word', 'limit,', 'error', 'message', 'appeared', 'as', 'expected:', 'This', 'dataset', 'contains', 'raw', 'output', 'from', 'the', 'data', 'logger', 'connected', 'to', '9', 'sapflow', 'and', '5', 'soil', 'moisture', 'sensors', 'are', 'provided', 'in', 'the', 'file', 'xxx.dat.', 'The', 'metadata', 'file', '(BR-Ma2', 'E-field', 'log_20160501.xls)', 'has', 'additional', 'information', 'on', 'locations', 'where', 'the', 'sensors', 'were', 'installed,', 'as', 'well', 'as', 'other', 'installation/maintenance', 'details.', 'No', 'data', 'processing', 'or', 'QA/QC', 'was', 'done', 'on', 'the', 'raw', 'datasets.', 'Additional', 'processed', 'datasets', 'will', 'be', 'uploaded', 'separately', 'and', 'added', 'to', 'the', 'Dataset', 'References', 'section.', 'Please', 'contact', '[email protected]', 'if', 'you', 'need', 'to', 'use', 'this', 'dataset', 'for', 'additional', 'information.']
>>> 

from ngt-archive.

vchendrix avatar vchendrix commented on August 23, 2024

Closing.

from ngt-archive.

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.